Skip to main content

Theme configuration

Each project can store a theme configuration as JSON. Fetch it server-side with fetchStoreThemeConfig:
Use the returned values to set CSS custom properties or pass them to your component library.

CSS variables

The @colossal/ui-kit components and hosted checkout use CSS custom properties for theming: Set these on your root element to apply your brand:

UI Kit

The @colossal/ui-kit package provides primitive React components styled with the CSS variables above.

Available components

Button example

Variants: primary, secondary, ghost, outline.

Classname utility

The UI kit exports a cn() function that merges class names using clsx and tailwind-merge:

Custom styling

Override any component styling by targeting the CSS variables or by wrapping components with your own styles. The UI kit uses Tailwind CSS classes internally, so tailwind-merge prevents class conflicts when you add your own Tailwind classes.

Next steps