package page→ /design/design.md
pages/design/design.md
28 lines, 1.4 KB. As a page.
- ---
- type: Page
- title: "Design"
- description: "The project's design choice: which style, component libraries and lens layout it uses."
- icon: "🎨"
- style: ""
- libraries: []
- layout: ""
- ---
- # Design
- The project's choice is in the header of this page:
- - `style` is the id of the style package whose tokens the project uses. The style lays its tokens in `/design/<style>/`
- (`tokens.css` is the built file). A style package sets this field on install when it is empty. Empty means no style is chosen yet.
- - `libraries` is the list of ids of the component libraries the project uses (HTML, React). Every library takes the chosen style
- through [the token contract](contract.md), so changing `style` changes the look of all of them.
- - `layout` is the id of the [lens layout](/design/conventions/layout.md) package. A layout can select itself on install
- when the field is empty. Lenses use the built-in frame when no layout is selected.
- The check [DTK-R03](/norms/rules/design-tokens/DTK-R03.md) reads `style` and judges `/design/<style>/tokens.css` against
- the contract. The viewers (the style specimen, the component catalog) read the style and libraries.
- To swap the style: install the other style package, set `style:` here to its id, run `shtuk check`.
- To swap the layout, install the other layout package, set `layout:` here, run `shtuk run design-components sync` and rebuild with `shtuk run lenses build`.