Looking for documentation on gluestack-ui v2 with NativeWind? Refer to this
link.
Colors
primary
secondary
tertiary
rose
pink
fuchsia
purple
violet
indigo
blue
lightBlue
darkBlue
cyan
teal
emerald
green
lime
yellow
amber
orange
red
warmGray
trueGray
coolGray
blueGray
error
success
warning
info
light
textLight
textDark
borderDark
borderLight
backgroundDark
backgroundLight
backgroundLight100
#F1F1F1
backgroundLight200
#DBDBDB
backgroundLight300
#D4D4D4
backgroundLight400
#A3A3A3
backgroundLight500
#8C8C8C
backgroundLight600
#737373
backgroundLight700
#525252
backgroundLight800
#404040
backgroundLight900
#262626
backgroundLight950
#171717
others
backgroundLightError
#FEF1F1
backgroundDarkError
#422B2B
backgroundLightWarning
#FFF4EB
backgroundDarkWarning
#412F23
backgroundLightSuccess
#EDFCF2
backgroundDarkSuccess
#1C2B21
backgroundLightInfo
#EBF8FE
backgroundDarkInfo
#1A282E
backgroundLightMuted
#F6F6F7
backgroundDarkMuted
#252526
Typography
To manage Typography options, the tokens object supports the following keys:
import { createConfig } from '@gluestack-ui/themed';
import {config as defaultConfig } from '@gluestack-ui/config';
const config = createConfig({
...defaultConfig.tokens.fontSizes,
Space
The space 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. You can refer to
this to see the aliases for the spacing props.
Tokens
Value (Pixels)
Representation
Opacity
You can define your opacity tokens or override existing ones using the createConfig function under the tokens section.
Shadows
In @gluestack-ui/themed there are two types of shadows provided by default.
Note: In the context of dark mode design, it's important to recognize that elevation serves as the primary tool for expressing hierarchy. Unlike in light mode, where shadows are used for this purpose, dark themes prioritize surface illumination. The higher the elevation, the lighter the surfaces become, ultimately improving visibility and clarity.
Borders
border widths
borderWidths tokens are used to define the border radius of an element. You can define your radii tokens or override existing ones using the createConfig function under the tokens section.
border radius
radii tokens are used to define the border radius of an element. You can define your radii tokens or override existing ones using the createConfig function under the tokens section.