ShtukbaseStandard
package page→ /design/design.md

pages/design/design.md

28 lines, 1.4 KB. As a page.

  1. ---
  2. type: Page
  3. title: "Design"
  4. description: "The project's design choice: which style, component libraries and lens layout it uses."
  5. icon: "🎨"
  6. style: ""
  7. libraries: []
  8. layout: ""
  9. ---
  10. # Design
  11. The project's choice is in the header of this page:
  12. - `style` is the id of the style package whose tokens the project uses. The style lays its tokens in `/design/<style>/`
  13. (`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.
  14. - `libraries` is the list of ids of the component libraries the project uses (HTML, React). Every library takes the chosen style
  15. through [the token contract](contract.md), so changing `style` changes the look of all of them.
  16. - `layout` is the id of the [lens layout](/design/conventions/layout.md) package. A layout can select itself on install
  17. when the field is empty. Lenses use the built-in frame when no layout is selected.
  18. The check [DTK-R03](/norms/rules/design-tokens/DTK-R03.md) reads `style` and judges `/design/<style>/tokens.css` against
  19. the contract. The viewers (the style specimen, the component catalog) read the style and libraries.
  20. To swap the style: install the other style package, set `style:` here to its id, run `shtuk check`.
  21. 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`.