Can you review the September close?
Message
Compose sender identity, message content, metadata, and contextual actions.
Default
On this page
Installation
Copy this component and its required dependencies into the consumer-owned Components project.
dotnet fve add message --config src/Acme.Components/fve.jsonThe CLI resolves dependencies and preserves consumer-authored files. See Installation for project initialization and Tailwind source detection.
Usage
open System
open FSharp.ViewEngine
open Acme.Components
open type Html
open type Svg
open type Datastar
let defaultMessage =
Message.create "Jordan Lee" (p { "Can you review the September close?" })
|> Message.renderSender and receiver
Metadata and actions without an avatar
API reference
type MessageSide =
| Sender
| Receiver
type MessageConfig
module Message =
val create : sender:string -> content:HtmlElement -> MessageConfig
val withSide : side:MessageSide -> config:MessageConfig -> MessageConfig
val withAvatar : avatar:HtmlElement -> config:MessageConfig -> MessageConfig
val withMetadata : metadata:string -> config:MessageConfig -> MessageConfig
val withStatus : status:string -> config:MessageConfig -> MessageConfig
val withActions : actions:HtmlElement -> config:MessageConfig -> MessageConfig
val withAttributes : attributes:HtmlAttribute list -> config:MessageConfig -> MessageConfig
val render : config:MessageConfig -> HtmlElement