Skip to main content

Design System

A design system is a collection of reusable components, guided by clear standards, that can be assembled together to build any number of applications.

Dyte's UI Kit uses Atomic design as a principle to bring logic and structure to individual screens. Read this blog post to get a complete overview of how we're using design tokens and atomic design principles to create a multi-brand, multi-device Design System.

Let's look at how you can customize your UI with Dyte's UI Kit.

Dyte provides the provideDyteDesignSystem() utility to programmatically configure the design system of UI Kit components with a few lines of code.

import { useDyteMeeting } from '@dytesdk/react-native-core';
import { DyteMeeting, DyteUIProvider } from '@dytesdk/react-native-ui-kit';

function Example() {
const { meeting } = useDyteMeeting();

useEffect(() => {
// provideDyteDesignSystem(designTokens)
provideDyteDesignSystem({
// sets light background colors
theme: 'light',
colors: {
danger: '#ffac00',
brand: {
300: '#00FFE1',
400: '#00FFFF',
500: '#00E1D4',
600: '#007B74',
700: '#00655F',
},
text: '#071428',
textOnBrand: '#ffffff',
videoBg: '#E5E7EB',
},
});
}, []);

return (
<DyteUIProvider>
<DyteMeeting meeting={meeting} />
</DyteUIProvider>
);
}

Read on to learn more about each token in detail.

Design Tokens

React Native UI Kit uses design tokens for it's design system.

Design tokens are the design related values which are used to maintain a design system, which provides flexibility in customizing the overall design of a system with values such as: typography, colors etc.

Typography

fontfamily: 'Inter';

You can tweak the font family used in your UI Kit components easily with this token.

You can edit this value in two ways with the provideDyteDesignSystem utility.

Usage

const designTokens = {
fontFamily: 'Custom Font';
}

Set this value in your design tokens.

With fontFamily 🪡 - Use a custom font family, you'll have to load the font manually.

Colors

colors: {
'brand': {
300: '#497CFD',
400: '#356EFD',
500: '#2160FD',
600: '#0D51FD',
700: '#0246FD',
},
/* ... rest of the shades */
}

Here are all the color tokens, along with their default values.

Brand
300
#497CFD
400
#356EFD
500
#2160FD
600
#0D51FD
700
#0246FD
Background
1000
#080808
900
#1A1A1A
800
#1E1E1E
700
#2C2C2C
600
#3C3C3C
Text
1000
rgb(255 255 255)
900
rgb(255 255 255 / 0.88)
800
rgb(255 255 255 / 0.76)
700
rgb(255 255 255 / 0.64)
600
rgb(255 255 255 / 0.52)
Text On Brand
1000
rgb(255 255 255)
900
rgb(255 255 255 / 0.88)
800
rgb(255 255 255 / 0.76)
700
rgb(255 255 255 / 0.64)
600
rgb(255 255 255 / 0.52)
Singular Colors
video-bg
#181818
success
#83D017
warning
#FFCD07
danger
#FF2D2D

Usage

info

Note the exception of text and textOnBrand colors, you only specify a single color even though there are the following shades: 1000 - 600.

This is because the provideDyteDesignSystem() utility sets the color you pass to text-1000 and calculates lighter shades and sets them as well.

Only pass objects for brand and background colors.

A set of commonly used background shades are available by default with the theme property.

Theme values are: light, dark, darkest.

Edit color tokens like this. Only the colors you specify will be set.

const designTokens = {
theme: 'darkest',
colors: {
brand: { 500: '#0D51FD' },
background: { 1000: '#080808' },
text: '#ffffff',
textOnBrand: '#ffffff',
videoBg: '#181818',
},
};