Button
Primary buttons
open System
open FSharp.ViewEngine
open Acme.Components.Primitives
open Acme.Components.Application
open type Html
open type Svg
open type Datastar
let primaryButtons =
div {
_class "flex flex-wrap items-center justify-center gap-4"
for size in [ ControlSize.Small; ControlSize.Medium; ControlSize.Large ] do
Button.create "Create account"
|> Button.withVariant ButtonVariant.Primary
|> Button.withSize size
|> Button.render
}Secondary buttons
open System
open FSharp.ViewEngine
open Acme.Components.Primitives
open Acme.Components.Application
open type Html
open type Svg
open type Datastar
let secondaryButtons =
div {
_class "flex flex-wrap items-center justify-center gap-4"
for size in [ ControlSize.Small; ControlSize.Medium; ControlSize.Large ] do
Button.create "View reports"
|> Button.withVariant ButtonVariant.Secondary
|> Button.withSize size
|> Button.render
}Ghost buttons
open System
open FSharp.ViewEngine
open Acme.Components.Primitives
open Acme.Components.Application
open type Html
open type Svg
open type Datastar
let ghostButtons =
div {
_class "flex flex-wrap items-center justify-center gap-4"
for size in [ ControlSize.Small; ControlSize.Medium; ControlSize.Large ] do
Button.create "Cancel"
|> Button.withVariant ButtonVariant.Ghost
|> Button.withSize size
|> Button.render
}Destructive buttons
open System
open FSharp.ViewEngine
open Acme.Components.Primitives
open Acme.Components.Application
open type Html
open type Svg
open type Datastar
let destructiveButtons =
div {
_class "flex flex-wrap items-center justify-center gap-4"
for size in [ ControlSize.Small; ControlSize.Medium; ControlSize.Large ] do
Button.create "Delete account"
|> Button.withVariant ButtonVariant.Destructive
|> Button.withSize size
|> Button.render
}Pending buttons
open System
open FSharp.ViewEngine
open Acme.Components.Primitives
open Acme.Components.Application
open type Html
open type Svg
open type Datastar
let pendingSyncButton =
Button.create "Sync accounts"
|> Button.withVariant ButtonVariant.Primary
|> Button.pending
|> Button.renderDisabled buttons
open System
open FSharp.ViewEngine
open Acme.Components.Primitives
open Acme.Components.Application
open type Html
open type Svg
open type Datastar
let disabledDeleteButton =
Button.create "Delete account"
|> Button.withVariant ButtonVariant.Destructive
|> Button.disabled
|> Button.render