The purpose of this Style Guide is to establish a unified and cohesive design language that ensures a consistent user experience across all DataHub products. By adhering to these guidelines, we can maintain a high standard of design quality and improve the usability of our applications.
You can import the theme object into any component or file in your application and use it to style your components. The theme object is a single source of truth for your application's design system.
```tsx
import { typography, colors, spacing } from '@components/theme';
```
### Colors
Colors are managed via the `colors.ts` file in the `theme/foundations` directory. The colors are defined as a nested object with the following structure:
<Source code={colorsSource} />
By default, all `500` values are considered the "default" value of that color range. For example, `gray.500` is the default gray color. The other values are used for shading and highlighting. Color values are defined in hex format and their values range between 25 and 1000. With 25 being the lighest and 1000 being the darkest.
Font styles are managed via the `typography.ts` file in the `theme/foundations` directory. The primary font family in use is `Mulish`. The font styles are defined as a nested object with the following structure:
<Source code={typographySource} />
### Borders
A set of border values defined by the border key.
<Source code={borderSource} />
### Border Radius
A set smooth corner radius values defined by the radii key.
<Source code={radiusSource} />
### Shadows
A set of shadow values defined by the shadows key.
<Source code={shadowsSource} />
## Sizes
A set of size values defined by the sizes key.
<Source code={sizesSource} />
### Spacing
A set of spacing values defined by the spacing key.
<Source code={spacingSource} />
### Transitions
A set of transition values defined by the transition key.
<Source code={transitionSource} />
### Z-Index
A set of z-index values defined by the zindex key.