collection/design/components.md
Components
The components of the design, by level: primitive, composite, block, page. One record per component id; the HTML and the React implementations are joined on it.
Page fields (7)
| icon | 🧩 |
| itemType | Component |
| items | {mode: path,path: /design/components,recursive: false} |
| writeTo | /design/components |
| sources | |
| properties | {level: {kind: select,label: Level,options: [{name: primitive,label: Primitive (registry:ui),color: blue},{name: composite,label: Composite (registry:component),color: green},{name: block,label: Block (registry:block),color: orange},{name: page,label: Page (registry:page),color: purple}]},uses: {kind: relation,collection: /design/components,multiple: true,label: Uses},parts: {kind: text,label: Parts (data-slot names)},states: {kind: text,label: Interaction states},status: {kind: text,label: Data states (data-status)},html: {kind: text,label: HTML implementation},react: {kind: text,label: React implementation},source: {kind: text,label: Source file with the header}} |
| views | [{id: components--by-level,name: By level,layout: board,fields: {},board: {preview: page-content,cardSize: small,wrap: true},grouping: {by: level,colorBy: level},properties: [{name: title,visible: true},{name: states,visible: true},{name: html,visible: false}]},{id: components--table,name: All components,layout: table,fields: {},properties: [{name: title,visible: true,width: 260},{name: level,visible: true},{name: uses,visible: true},{name: states,visible: true},{name: status,visible: true},{name: html,visible: true},{name: react,visible: true}]}] |
The components of the design. A component is described once, in the header of its code file (see the component header); the action sync of the package design-components turns every header into one page here. Do not edit the header of these pages: edit the header in the code file and run shtuk run design-components sync. The text under the header of a page is yours: write there what the component is for and when to use it.
sources: in the header of this page lists extra folders that hold component files, besides /design/<library>/components/.