Styling the application
Learn how to style your supastarter application.
To build the user interface supastarter comes with Tailwind CSS and Radix UI pre-installed.
Why Tailwind CSS and Radix UI
The combination of Tailwind CSS and Radix UI allows gives ready-to-use, complex UI components that can be fully customized to match your brands design.
Theme configuration
In the packages/tooling/tailwind/theme.css file you can configure the Tailwind CSS theme. Next to the default Tailwind CSS
theme configuration you will also find two color variable objects in the file for light and dark mode. These color variables
will be passed into the Tailwind CSS theme configuration and are used across the UI of the application.
Change fonts
Per default supastarter uses next/font to load the fonts. In the apps/web/modules/shared/components/Document.tsx file you can configure the fonts used.
The font is initialized here and then we pass the variable class to the html element:
The --font-sans variable will then be used directly by Tailwind CSS to apply the font to the text.
Read more about how to use next/font in the offical Next.js documentation.
shadcn/ui
supastarter is also fully compatible with shadcn/ui, which is an amazing tool to quickly build your own component library with Radix UI and Tailwind CSS.
To use the shadcn/ui CLI in your supastarter project simply run the following command from your projects root:
For example to add the skeleton component you would run: