Styling and Theming
<SchematicStyles /> injects one stylesheet for every drop-in component. It is driven by --schematic-* custom properties, follows your color-scheme for light and dark, and never wins a cascade against your own tokens. schematicStylesCss is the same stylesheet as a string, for a shadow root or a <style> you place yourself.
Tokens
Light and dark
The components follow color-scheme. Declare it wherever your theme is decided and they come with it, with no attribute of ours to toggle:
That is the whole contract. It works with a class-based switcher, with color-scheme: light dark to follow the OS, and with a page that is only ever one of the two. A host that themes without declaring color-scheme gets the light palette.
Overriding a token
Set it anywhere, on :root, an ancestor, inside a cascade layer, at any specificity:
The defaults are not declared in a rule; they are var() fallbacks inlined at each use. A fallback applies only when the property is set nowhere, so your value cannot lose a cascade to ours. A default declared on :root would beat a host’s own @layer base { :root } tokens outright, because layer order resolves before specificity, and nothing about that failure would be visible.
The cost is that --schematic-* is undefined until you set it, so your own CSS cannot read our defaults. schematicTokensCss is the palette as a :root block if you want them globally; import it deliberately, and put it where your own tokens can still win. SCHEMATIC_TOKENS is the same data as an object.
Overriding background and text alone leaves a card looking half-themed; card-divider, shadow, and border carry the rest.
One card or several
Each component draws its own card, so components stacked in a column read as separate cards. Wrap them in schematic-card-group to merge them into one:
The group draws one card with a card-divider line between its components, and between the per-row cards Metered Features and Credit Usage draw. The components must be its direct children, or the line between them does not draw.
Styling the class names
Skip the stylesheet and write your own against the class names. They are API, and each component’s page shows the tree it renders.
The stylesheet carries the Schematic icon font inlined as a data: URL, for feature and credit icons, the brand marks on payment methods, the dialog’s close control, the tooltips’ info trigger, the current plan’s check, and the chevrons. If your Content Security Policy sets font-src, add data: to it, or the glyphs render empty. Every glyph is aria-hidden; the dialog’s close control, a payment method’s remove control, and a tooltip’s info trigger are icon-only, so a blocked font leaves them empty.
A sheet of your own has to bring the icon font too. Render <style>{iconsCss}</style> once, exported from the same entry as SchematicStyles, or the glyphs render empty. The icon package’s own stylesheet names its rules differently and does not light them up.
A component’s root keeps the same class list in every state, and data-state is pending, error, or ready. Unsubscribe Button sets data-state only on a failed read.
In the dashboard
The Theming page under Components in the dashboard lists every token with its light and dark default and what it paints.