Theming
Style Riff components with CSS custom properties and @layer overrides.
Every component reads the same short list of CSS custom properties. Define them and the components follow your palette, in light and dark. Leave them out and each falls back to a system colour, so nothing renders unreadable in a bare project or in forced-colours mode.
Properties
shadcn projects already define most of these names, so components installed there pick up the theme with no extra work. The video player keeps its own dark chrome so its controls stay legible over any frame.
Map your tokens
If your tokens use other names, alias them once at the root:
For dark mode, change the values, not the names. light-dark() keeps both themes in one declaration:
Override a component
The rules live in @layer components. Any unlayered rule, or a rule in a later layer, wins without !important:
Many components expose their own --riff-* properties for sizes like this; each page’s Usage section names them. Because the files are yours, you can also edit them directly. Prefer the custom properties for colour, so a later reinstall keeps your theme.
Motion
Components animate to explain a change: a folder unfolds to its height, the reading trail follows the sections on screen, a new theme spreads from the toggle. Transitions stay short on a strong ease-out curve, and prefers-reduced-motion turns travel off.