Theming

Sona UI is built with Tailwind CSS, making theming straightforward and flexible. We support dark mode out of the box using next-themes.

Dark Mode

Sona UI components are designed to look great in both light and dark modes. We use CSS variables (custom properties) to handle color schemes, which makes it easy to switch themes without rewriting styles.

Setting up next-themes

If you initialized your project with our CLI, next-themes is already configured. If you're setting it up manually, you need to wrap your application in a ThemeProvider.

TypeScript
src/app/providers.tsx

Then use it in your layout:

TypeScript
src/app/layout.tsx

Customizing Colors

You can customize the color palette by overriding the Tailwind CSS configuration in your global.css file. Sona UI uses standard variable names like --background, --foreground, --primary, etc.

global.css

Styling Components

Since Sona UI gives you the source code, you can style individual components directly in the TSX files using standard Tailwind classes.

TypeScript