siddcn

Themes

Customize the look and feel of siddcn components with themes.

Themes

Siddcn comes with 6 beautiful built-in themes and supports custom theming.

Built-in Themes

ThemeDescription
Tokyo NightDark theme with purple and cyan accents
CatppuccinWarm pastel theme with soft colors
DraculaClassic dark theme with vibrant accents
NordCool, arctic-inspired color palette
GruvboxRetro groove theme with warm colors
One DarkAtom-inspired dark theme

Switching Themes

In the CLI

Press t while in the CLI to cycle through themes, or navigate to the Theme Selector from the main menu.

Programmatically

App.tsx
import { ThemeProvider, useTheme } from 'siddcn';

function App() {
  return (
    <ThemeProvider theme="tokyo-night">
      <YourComponent />
    </ThemeProvider>
  );
}

// Access theme in components
function YourComponent() {
  const theme = useTheme();
  
  return (
    <Text color={theme.primary}>
      Hello, themed world!
    </Text>
  );
}

Theme Structure

Each theme provides these color values:

theme.ts
interface Theme {
  // Base colors
  background: string;
  foreground: string;
  
  // Accent colors
  primary: string;
  secondary: string;
  accent: string;
  
  // State colors
  success: string;
  warning: string;
  error: string;
  info: string;
  
  // UI colors
  border: string;
  muted: string;
}

Creating Custom Themes

Create your own theme by defining the color values:

custom-theme.ts
import { defineTheme } from 'siddcn';

export const myTheme = defineTheme({
  name: 'my-theme',
  colors: {
    background: '#1a1b26',
    foreground: '#c0caf5',
    primary: '#7dcfff',
    secondary: '#bb9af7',
    accent: '#9ece6a',
    success: '#9ece6a',
    warning: '#e0af68',
    error: '#f7768e',
    info: '#7aa2f7',
    border: '#414868',
    muted: '#565f89',
  },
});

Use your custom theme:

App.tsx
import { ThemeProvider } from 'siddcn';
import { myTheme } from './custom-theme';

function App() {
  return (
    <ThemeProvider theme={myTheme}>
      <YourComponent />
    </ThemeProvider>
  );
}