Guides
One topic at a time, with live examples. Each guide covers what Firelight adds to Lit and links to the Lit docs for the rest.
- Templates: plain HTML in F# interpolated strings, with bindings, conditionals, lists, directives and static values.
- Properties and attributes: reactive properties, attributes, change detection with F# values, reflection and internal state.
- Events: listen with typed handlers, raise custom events with typed details, and how far events travel through shadow DOM.
- Styling: scoped styles, theming with custom properties, parts, shared styles and the safe way to pass values from F#.
- Lifecycle: connecting, updating and cleaning up, and which lifecycle method to override for what.
- Controllers: state and lifecycle that any component can reuse.
- Prerendering components at build time: Lit SSR at build time, declarative shadow DOM, hydration and prerender-safe components.
- Component communication: properties down, events up, and context, signals or Elmish across.
- Using web component libraries: Web Awesome, Shoelace, Fluent UI or Carbon tags in F# templates.
- Using JavaScript libraries: npm libraries in components, with imports, bindings, loading on demand and lifecycle.
- App architecture and loading: structure a larger app, place its state, and load it fast without SSR.