Theme resources
A theme is a style that's applied to your entire app, activity or view hierarchy rather than an individual view. By default, Sendbird UIKit for React provides two themes: Light
and Dark
. Customized themes that fit your brand identity can also be created by changing the style and color set.
Set up the theme
UIKit for React provides two themes: Light
and Dark
. Its themes can be applied using the App
and SendbirdProvider
components.
Light theme
This is the default Light
theme for UIKit if another theme hasn't been specified.
Background color
The background color of each component in Light
theme ranges from Background-50
to Background-300
.
Texts and other element colors
The following image shows the color scheme used for texts and other elements on light backgrounds.
UI elements and status colors
Primary-main
and Secondary-main
colors are used to highlight UI elements such as icon buttons, outgoing message bubbles, and read receipt icons. Error-main
is used for warnings and Information-light
is currently used for a status banner indicating frozen channels.
Dark theme
A dark theme is a user interface designed for low-light environments, featuring primarily dark surfaces. It serves as an alternative option to the default light theme, presenting dark-colored surfaces throughout much of the interface.
The Dark
theme is as shown below:
Note : The global theme should be configured prior to setting the view controller or creating a chat view.
Background color
The background color of each component in Dark
theme ranges from Background-400
to Background-700
.
Texts and other element colors
The following image shows the color scheme used for texts and other elements on dark backgrounds.
UI elements and status colors
Primary-light
and Secondary-light
colors are used to highlight UI elements such as icon buttons, outgoing message bubbles, and read receipt icons. Error-light
is used for warnings and Information-light
is currently used for a status banner indicating frozen channels.
Theme anatomy
The images below show the combination of background and text colors used in the Light
and Dark
themes.
Light theme
Dark theme
States
The images below show the various colors used to indicate different states in the Light
and Dark
themes. For Pressed
and Selected
states, the background color is either Primary-light
or one level higher than that of the Enabled
state.