Example
An independently installable component. Its content and surrounding layout remain consumer-owned.
Preview and code
Greeting
Hello
On this page
dotnet fve add example --config src/Acme.Components/fve.jsonopen FSharp.ViewEngine
open Acme.Components
open type Html
let example = Example.gallery "nested-example" "Greeting" "fsharp" "p { \"Hello\" }" (p { "Hello" })Include CodeBlock.assets once in your document head with the URLs of your Prism stylesheet and language scripts. Layout.fs in each template demonstrates the complete setup.
module Example =
val previewFirst : id:string -> label:string -> language:string -> source:string -> preview:HtmlElement -> HtmlElement
val codeFirst : id:string -> label:string -> language:string -> source:string -> preview:HtmlElement -> HtmlElement
val lead : id:string -> label:string -> language:string -> source:string -> preview:HtmlElement -> HtmlElement
val gallery : id:string -> label:string -> language:string -> source:string -> preview:HtmlElement -> HtmlElement