Default Theme
The theme object is where you define your application's color palette, type scale, font stacks, breakpoints, border radius values, and more.
Theming in NativeBase is based on the Styled System Theme Specification
Colors#
You can add a theme.colors object to provide colors for your project. By default these colors can be referenced by the color, borderColor, backgroundColor, etc.. props.
We recommend adding a palette that ranges from 50 to 900. Tools like Smart Swatch, Palx are available to generate these palettes.
Singletons
Rose
Pink
Fuchsia
Purple
Violet
Indigo
Blue
LightBlue
Cyan
Teal
Emerald
Green
Lime
Yellow
Amber
Orange
Red
WarmGray
TrueGray
Gray
Dark
CoolGray
BlueGray
Typography#
To manage Typography options, the theme object supports the following keys:
fonts(font families)fontSizesfontWeightslineHeightsletterSpacings
- xxs
- xs
- sm
- md
- lg
- xl
- 2xl
- 3xl
- 4xl
- 5xl
- 6xl
- 7xl
- 8xl
- 9xl
Size#
The size key allows you to customize the global spacing and sizing scale for your project. By default these spacing value can be referenced by the padding, margin, and top, left, right, bottom props.
| Value | Pixels | Representation |
|---|---|---|
| 1 | 4px | |
| 2 | 8px | |
| 3 | 12px | |
| 4 | 16px | |
| 5 | 20px | |
| 6 | 24px | |
| 7 | 28px | |
| 8 | 32px | |
| 9 | 36px | |
| 10 | 40px | |
| 12 | 48px | |
| 16 | 64px | |
| 20 | 80px | |
| 24 | 96px | |
| 32 | 128px | |
| 40 | 160px | |
| 48 | 192px | |
| 56 | 224px | |
| 64 | 256px | |
| 72 | 288px | |
| 80 | 320px | |
| 96 | 384px | |
| px | 1px | |
| 0.5 | 2px | |
| 1.5 | 6px | |
| 2.5 | 10px | |
| 3.5 | 14px |
Shadows#
The shadow key allows you to customize the global box shadow for your project.
Still confused? You can always explore here.