Presentation
Separate and number slides, with an expand/restore viewer and keyboard navigation.
Separated slides and presentation mode
open System
open FSharp.ViewEngine
open Acme.Components
open type Html
open type Svg
open type Datastar
let defaultSlide =
fveSlide {
fveSlideHeader {
fveSlideTitle { "One frame. Your content." }
fveSlideSubtitle { "A consistent title, content region and footer for every slide." }
}
fveSlideContent {
div {
_class "grid grid-cols-2 gap-[2cqw]"
div { h3 { _class "m-0 text-[length:2cqw] font-semibold"; "Structure" }; p { "Compose ordinary F# HTML inside the content region." } }
div { h3 { _class "m-0 text-[length:2cqw] font-semibold"; "Consistency" }; p { "Keep spacing and typography in the shared frame." } }
}
}
fveSlideFooter { "Prepared for discussion" }
}
let coverSlide =
fveSlide {
_variant SlideVariant.Cover
fveSlideHeader {
fveSlideTitle { "Make the next decision clear." }
fveSlideSubtitle { "A cover uses the same canvas, header and footer regions." }
}
fveSlideContent {
p { _class "max-w-[50cqw] text-[length:2.5cqw]"; "Use the space for one idea, not a smaller font." }
}
}
let presentationExample =
fvePresentation {
_label "A two-slide presentation"
coverSlide
defaultSlide
}Build a presentation and print or save it as PDF.
On this page
Installation
Copy this component and its required dependencies into the consumer-owned Components project.
dotnet fve add presentation --config src/Acme.Components/fve.jsonAdd to src/Acme.Web/js/app.js once, alongside your other component imports:
import '../../Acme.Components/Components/Assets/button.js';
import '../../Acme.Components/Components/Assets/presentation.js';The CLI resolves dependencies and preserves consumer-authored files. See Installation for project initialization, Tailwind, the shared runtime, and building/loading your app entry.
Usage
open System
open FSharp.ViewEngine
open Acme.Components
open type Html
open type Svg
open type Datastar
let defaultSlide =
fveSlide {
fveSlideHeader {
fveSlideTitle { "One frame. Your content." }
fveSlideSubtitle { "A consistent title, content region and footer for every slide." }
}
fveSlideContent {
div {
_class "grid grid-cols-2 gap-[2cqw]"
div { h3 { _class "m-0 text-[length:2cqw] font-semibold"; "Structure" }; p { "Compose ordinary F# HTML inside the content region." } }
div { h3 { _class "m-0 text-[length:2cqw] font-semibold"; "Consistency" }; p { "Keep spacing and typography in the shared frame." } }
}
}
fveSlideFooter { "Prepared for discussion" }
}
let coverSlide =
fveSlide {
_variant SlideVariant.Cover
fveSlideHeader {
fveSlideTitle { "Make the next decision clear." }
fveSlideSubtitle { "A cover uses the same canvas, header and footer regions." }
}
fveSlideContent {
p { _class "max-w-[50cqw] text-[length:2.5cqw]"; "Use the space for one idea, not a smaller font." }
}
}
let presentationExample =
fvePresentation {
_label "A two-slide presentation"
coverSlide
defaultSlide
}API reference
module PresentationDsl =
val fvePresentation : ComponentElementBuilder