BeagleProvider.
Theme Modes
Beagle supports two theme modes:- Light: Optimized for bright environments with light backgrounds
- Dark: Optimized for low-light environments with dark backgrounds
Setting the Theme
Configure the theme using thetheme prop on BeagleProvider:
BeagleProvider Props
TheBeagleProvider component accepts the following props:
If you don’t specify a theme, Beagle defaults to
'light' mode.Theme Structure
Beagle’s theme system includes colors for all UI elements:Light Theme Colors
Dark Theme Colors
The dark theme only overrides specific colors. Unspecified colors fall back to the light theme values.
Color Categories
Beagle’s theme colors are organized into logical categories:- Layout Colors
- Text Colors
- Interactive Colors
- Card Colors
- Search Colors
- JSON Colors
- Status Colors
background: Main app backgroundheader: Header backgrounddivider: Border and divider linesoverlay: Modal overlay background
Dynamic Theme Switching
You can dynamically switch themes based on the device’s color scheme:Complete Example
Here’s a complete setup with theme configuration:Theme Context
Beagle uses aThemeContext internally to provide theme values to all components:
ThemeContext directly—just set the theme prop on BeagleProvider, and all Beagle components will automatically use the appropriate colors.