Skip to main content

exportThemeToCSSVariablesOnly()

function exportThemeToCSSVariablesOnly(theme): string[]

Exports the theme to CSS Variables on the root element

Parameters

ParameterTypeDescription
themeColorThemeThe theme to export

Returns

string[]

The CSS code for the theme

Example

const theme = generateTheme({ baseColor: '#ff0000', expandPalette: true });
exportThemeToCSSVariablesOnly(theme);
// returns ['--color-primary-500: #ff0000;']

Defined in

tailwind/tailwind.ts:132