Skip to content
brix.v2.15.0+b120c49

Search documentation

Loading search…

    Documentation menu
    Docs / Pages and UIRead Markdown
    On this page

    Styling

    Brix builds Panda CSS 2 into full-stack Preact applications, UI libraries, component tests, and managed Storybook. You write styles in TypeScript; Brix generates typed utilities and extracts only the CSS your source uses.

    There is nothing to install or wire up: Brix pins Panda and runs its native Vite and Rollup plugins for brix dev, brix build, brix test, and Storybook. Do not add PostCSS or a second Panda version. Managed React applications do not use this integration and keep their own CSS approach.

    Three conventions cover most styling work:

    • Configuration lives in one optional root panda.config.ts that default-exports definePandaConfig(...) from brix/panda.
    • Generated utilities live in the ignored styled-system/ directory and are imported through #brix/panda/*, for example import { css } from "#brix/panda/css".
    • Styled libraries publish their compiled styles and metadata; an application inherits one by naming it in designSystem.
    #
    1. To style a component in an existing application, go straight to component styling. The default tokens and any theme the project already has are available immediately.
    2. To establish shared colors, spacing, typography, dark mode, or breakpoints, configure the theme.
    3. To share components across applications, publish a styled UI library and extend it through brand layers.