Native Solid 2 fork. Original documentation and designs © WorkOS; historical posts retain their original context.
Breakpoints
Built-in breakpoints allow you to easily build adaptive layouts.
Available sizes
Each breakpoint matches a fixed screen width. Values are min-width based and apply when the screen width is equal or greater.
Usage
Most component size and layout props will accept an additional Responsive object shape for modifying the given prop across breakpoints.
Each size maps to a corresponding key, the value of each will be applied when the screen size is greater than or equal to the named breakpoint.
PostCSS plugins
The package's CSS files are compiled, so importing them needs no PostCSS setup. The postcss-breakpoints and postcss-whitespace plugins are only for teams that build their own responsive rt-r- classes the way Themes does. postcss is an optional peer dependency, so install it when you use a plugin:
CommonJS configs can require("@wsagency/radix2solid-themes/postcss-breakpoints"). The plugin expands each @breakpoints block into one @media rule per breakpoint and prefixes the rt-r- classes inside it with the breakpoint name, for example .xs\:rt-r-size-2.