Theme Customization
Docsta comes with a clean, minimal default theme—but it's designed to be fully customizable. You can adjust colors, fonts, spacing, and component styles to match your brand or product identity using Tailwind CSS and your own custom components.
1. Tailwind Configuration
All styling in Docsta is powered by Tailwind CSS, allowing you to customize your theme quickly via tailwind.config.js.
Example: Updating Theme Colors
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
primary: '#2563eb', // Custom primary color
accent: '#eab308', // Custom accent color
},
},
},}You can now use these in your components like:
<button className="bg-primary text-white hover:bg-primary/80">
Get Started
</button>2. Custom Fonts
To add custom fonts, import them in globals.css or directly in your layout and extend Tailwind’s fontFamily settings:
/* styles/globals.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
// tailwind.config.js
module.exports = {
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
},
},
},
}3. Layout Customization
Global layout components like Layout.tsx, Sidebar.tsx, and Header.tsx live in the /components folder. You can customize these to:
- Add logos
- Modify navigation behavior
- Change layout spacing
- Inject announcements or search
Example:
// components/Layout.tsx
export default function Layout({ children }) {
return (
<div className="min-h-screen bg-white dark:bg-zinc-900 text-zinc-800 dark:text-white">
<Sidebar />
<main className="p-6">{children}</main>
</div>
)
}4. Dark Mode Styling
If you’ve enabled dark mode, use Tailwind’s dark: prefix to apply styles conditionally:
<div className="bg-white text-black dark:bg-zinc-900 dark:text-white">
Welcome to Docsta!
</div>You can also style components using dark:bg-* and dark:text-* classes for full theming support.
5. Component Variants
You can extend or override default components like buttons, alerts, or cards using Tailwind utility classes or custom components.
Example:
export default function Alert({ type = 'info', children }) {
const styles = {
info: 'bg-blue-100 text-blue-800',
warning: 'bg-yellow-100 text-yellow-800',
danger: 'bg-red-100 text-red-800',
}
return (
<div className={`rounded-md p-4 ${styles[type]}`}>
{children}
</div>
)
}6. Advanced Customization
For deeper design changes, you can:
- Create a
theme.tsfile to centralize values - Use CSS variables for light/dark theming
- Integrate Tailwind plugins like
@tailwindcss/typography
With Docsta, you’re not locked into a fixed design system. Everything is flexible, extensible, and built to scale—whether you're customizing styles for a single page or branding an entire product suite.
👉 Next Up: Learn how to structure content using Markdown/MDX or fetch data dynamically from Sanity.
What did you think of this content?
It was helpful
It was not helpful
I have a feedback