Which part for what
Overview
The part to use for each thing a view shows.
Build every view from these parts. Views then look and behave alike, however many teams or modules write them.
Do not restyle a part for one view. If a part lacks something, add a variant to it.
Sizes are the tokens in src/styles/tokens.css: --control-*, --row-*, --header, --space-* and --radius-*.
On a phone each part takes the phone scale by itself, see Phones.
| You are showing | Use | Page |
|---|---|---|
| The frame of a view | ViewLayout, ViewHeader | Views |
| A box of content | Card | Views |
| A tool region with a header | Panel | Views |
| The heading of a section | SectionHeading | Views |
| A list of things | RowList and ListRow | Lists |
| Records in lanes | Board, BoardLane, BoardCard | Records |
| A table of records | DataTable | Records |
| Records edited in place | DataList | Records |
| An action | Button | Actions |
| An action shown as an icon | IconButton | Actions |
| Text edited in place | InlineField | Forms |
| A form field | TextField, TextArea, Select, Switch, SchemaForm | Forms |
| A number | NumberField | Forms |
| A bounded value, roughly | Slider, RangeSlider | Forms |
| Label and value pairs | PropertyList | Forms |
| Search and filters | FilterBar | Filters |
| Filters over the fields of a list | QueryBuilder | Filters |
| The state of an item | State | Status |
| A kind, category or count | Badge, LabelChip, Count | Status |
| Facts about an item | MetaLine | Status |
| Nothing to show | EmptyState | Status |
| Text that may not fit | Truncate | Status |
| A figure | Stat, StatCard | Figures |
| A live value | Widget | Figures |
| A page of widgets | WidgetGrid | Figures |
| A conversation with the assistant | ChatMessage, Composer | Conversation and code |
| Code and changes | CodeBlock, DiffView | Conversation and code |
The rules for focus, contrast, colour and spacing hold for every part. See Focus, Colour and Sizes.
Open the example ↗
Edit on GitHub
Last updated on