Guides
From the first component to a whole app: start here, build an app, then make it yours.
Start
Install lit-material, render it on the server, use it from a framework, and see how it compares.
- Install: Link the design tokens once, install the components you use, and use them as HTML elements.>
- Server rendering: Every element renders on the server with Lit SSR and hydrates in the browser without changing what it shows. CI checks all of them on every change.>
- React, Vue and Angular: lit-material components are custom elements, so they work in any framework as they are. Every component package also ships React wrappers, JSX and Vue typings, and editor metadata, generated from its custom elements manifest.>
- Languages and RTL: Components speak the language of the page: the nearest lang attribute, or <html lang>. Their own text (button names, announcements, counts) comes from message catalogs, dates and numbers from Intl, and every layout mirrors under dir="rtl".>
- Security and CSP: lit-material runs under a strict Content-Security-Policy with Trusted Types enforced, and every published package carries an SBOM and npm provenance.>
- Versions and support: Every lit-material package is released at the same version and follows semantic versioning; the previous major gets security fixes for a year.>
- Compared with others: lit-material is for consoles and admin UIs: Material 3 components plus the parts those apps need that Material Web leaves out (data tables, log viewers, charts, navigation shells, forms), each its own npm package, all rendering on the server.>
- From @material/web: lit-material reads the same Material 3 system tokens as @material/web, so a theme carries over as it is. A codemod rewrites elements, attributes, slots and imports, and lists by file and line what it left for you.>
- From Angular Material: Angular Material's components are Angular directives and services; lit-material's are custom elements, which Angular templates use with the schema for them. Here is each component's counterpart, the binding and forms patterns, and what replaces the services.>
- Static sites: @lit-material/site-kit holds the pieces of a prerendered site that have to work before any script runs: plain HTML templates, one stylesheet, and small scripts that add behaviour. This site and rws8.tech are built with it.>
Build an app
Scaffold an app and build it out: routing, state, data, forms, testing.
- Create an app: npm create lit-material-app: scaffold a client-rendered app, a server-rendered site or a SaaS console with lit-material.>
- Building apps: How to build a whole app with lit-material: routing, state, data fetching, forms, theme and locale, and how the packages fit together.>
- Router: @lit-material/router: nested routes, guards, redirects, lazy pages and data loaders for Lit apps.>
- Store: @lit-material/store: app state for Lit components, with devtools.>
- Task: @lit-material/task: async data for Lit components with a keyed cache and loading and error states.>
- Form: @lit-material/form: a form controller for lit-material fields: values, validation, errors and submit.>
- Data and forms: Fetch with @lit-material/http, cache and refresh with TaskController, validate with FormController: three small pieces that fit together without a framework.>
- Testing and devtools: Test your app the way a user meets it, by role and label through every shadow root, and watch its store and routes while you build it.>
- Core: @lit-material/core: theme, colour scheme and locale context shared by a lit-material app.>
Theming
Match your brand: colour tokens from a seed colour, and the type scale.
- Theme builder: The lit-material theme builder: pick a seed colour and get Material 3 colour tokens for light and dark mode as CSS.>
- Typography: Material 3 type scale tokens in lit-material, and how to set your own fonts.>