@neynar/ui
Version:
React UI component library built on shadcn/ui and Tailwind CSS
25 lines (16 loc) • 641 B
Markdown
# ThemePreference
**Type**: type
Theme preference options for the theme system Controls how the application determines the active theme: - `"system"` - Automatically follows the user's OS preference - `"light"` - Forces light theme regardless of system preference - `"dark"` - Forces dark theme regardless of system preference
## Type Definition
```typescript
import { ThemePreference } from '@neynar/ui';
type ThemePreference = "system" | "light" | "dark"
```
## Examples
```tsx
const { preference, setPreference } = useTheme();
// Switch to dark mode
setPreference("dark");
// Follow system preference
setPreference("system");
```