CodeSnap

Theme Configuration

Learn how to customize the theme of your application

Theme Configuration

Learn how to customize the theme of your application.

Theme Options

Color Schemes

const theme = {
  light: {
    primary: '#007AFF',
    secondary: '#5856D6',
    background: '#FFFFFF',
    text: '#000000'
  },
  dark: {
    primary: '#0A84FF',
    secondary: '#5E5CE6',
    background: '#000000',
    text: '#FFFFFF'
  }
}

Custom Themes

You can create custom themes by extending the base theme:

const customTheme = {
  ...baseTheme,
  colors: {
    ...baseTheme.colors,
    accent: '#FF2D55'
  }
}

Theme Properties

PropertyTypeDescription
modestring'light' or 'dark'
primaryColorstringMain brand color
secondaryColorstringSecondary brand color
backgroundColorstringBackground color
textColorstringText color

Usage Example

import { ThemeProvider } from '@your-package-name'
 
function App() {
  return (
    <ThemeProvider theme={customTheme}>
      <YourApp />
    </ThemeProvider>
  )
}

On this page