Get started
Get started
Kanso is one set of decisions shared by every Kanso Labs product, and Kanso UI is where those decisions become components. This page says where to begin, whoever you are.
Designers
- Read the overview and the Principles section. Everything else follows from them.
- Design with the tokens, never with raw values: colours by role (
kui-color-ink,kui-color-kanso-surface,kui-color-accent), type by style (t-headline,t-body,t-figure), space by step (kui-spacing-kanso-lg), corners by step (kui-radius-kanso-2xl). - Start each screen with its one job. If it needs the person now, it is the spotlight; leave the rest in ink and paper.
- Check both themes before you hand anything over. The Colors view shows every token in light and dark, with the contrast it was built for in its note.
- Pick components from this system before drawing a new one. Each component's page says what it does today; where Kanso designs something the library does not have yet, the brand book's table of what is built and what is coming says so.
Developers
- Install
@kanso-labs/kanso-uifor React, or@kanso-labs/react-native-kanso-uifor React Native. The web package imports its own stylesheet; there is no provider to wrap the app in. - Paint the page in
--kui-color-paperwith--kui-color-inktext, and wrap the app inI18nProviderwith the person's locale. - Never put a colour, a size or a font in a stylesheet when a token exists: write
var(--kui-color-kanso-surface),var(--kui-spacing-kanso-lg),var(--kui-typography-font-family-mono). - Let the theme follow the reader, or pin it:
colorScheme.lightorcolorScheme.darkon<html>, orThemeScopewithschemefor part of a page. Every colour has both values. - Give the product its colour with
productThemeorThemeScope'sproduct; see Product colours. - Run the checklist on the Accessibility page before a release.
Agents building with Kanso UI
- Read the brand book first and use the files as it says. Each component's README is its contract: the props, the states and what the product provides.
- Import the components from
@kanso-labs/kanso-ui, or@kanso-labs/react-native-kanso-uion phones, and the placeholder copy the Voice section names:Headline,First item,Ada Lovelace. - Never invent a brand colour. A product's accent comes from the Product colours section, and the base has none.
What Kanso is not
- It is not a theme of Material Design. Kanso UI keeps Material Design's structure where a family has not moved yet, and its components read Material Design's role names, but the colours, type, shapes and voice are Kanso's.
- It is not a set of screens. The patterns in this system are examples of the rules, not templates to copy.