Skip to main content

Card

An independently installable component. Its content and surrounding layout remain consumer-owned.

Default

Consumer-authored content.

On this page
dotnet fve add card --config src/Acme.Components/fve.json
open FSharp.ViewEngine
open Acme.Components
open type Html

let card = Card.create (p { _class "text-sm"; "Consumer-authored content." }) |> Card.render

The action variants additionally compose Button. Install button when copying those examples; the component itself accepts ordinary consumer-authored HTML.

Header and footer

Account review

September close

Review the account before publishing the report.

Consumer-authored media

FSharp.ViewEngine — Typed HTML views for F#

Social card

Repository-owned social artwork.

type CardSize =
    | Regular
    | Small

type CardConfig

module Card =
    val create : content:HtmlElement -> CardConfig
    val withHeader : header:HtmlElement -> config:CardConfig -> CardConfig
    val withMedia : media:HtmlElement -> config:CardConfig -> CardConfig
    val withFooter : footer:HtmlElement -> config:CardConfig -> CardConfig
    val withSize : size:CardSize -> config:CardConfig -> CardConfig
    val withAttributes : attributes:HtmlAttribute list -> config:CardConfig -> CardConfig
    val render : config:CardConfig -> HtmlElement