Which part for what
Views
The frame of a view, cards, panels, section headings and the layout parts.
The frame of a view
Use ViewLayout and ViewHeader.
The header is 38px.
Header actions come in one order:
- icon actions
- pin
- overflow
- the primary action
- the panel toggle
The name of the view is in its tab. Never repeat it as a heading.
Open the example ↗
Open the example ↗
Card
A Card is a box of content.
It has 12px padding (--nc-pad), radius 8, a line-soft edge and a bg-1 fill.
A nested card is bg-2.
- A card is as tall as its content.
fillmakes it use a box that a grid gives it, and the body takes the height. ARowListscrolls inside it and anEmptyStatecentres in it. A card with oneStatkeeps its label and figure at the top. The figure is 32px in a tall box, and its chart takes the rest.title,countandactionput aSectionHeadinginside.padding="none"is for media or tables that reach the edges.hreforonClickmake the whole card one link.- A card inside a card, or a list in a card, does not add a second padding.
Open the example ↗
Open the example ↗
Open the example ↗
Open the example ↗
Panel
A Panel is a tool region with a header.
The header is 38px, with the title, a state and actions.
The body has 12px padding.
footeris only for totals or pagination.fillworks as forCard.flushis for a table or a terminal.
Open the example ↗
Section heading
SectionHeading is the one treatment for a section inside a view or card.
It is 13px semibold text-1, in a 24px row.
countis a total intext-3.- One
actiongoes at the right. It is a ghostButton size="sm", anIconButton size="sm", a link or aState. - It is never 16, 20 or 26px.
- Group labels in a sidebar or menu are the nav label, 11px in
text-3. They are not section headings.
Open the example ↗
Open the example ↗
Open the example ↗
Layout parts
AppShellholds the sidebar, the top bar, the status bar and the phone drawer. The sidebar is onbg-0, and content is inbg-1frames with radius 8 and an 8px gap.Framehas aTabStripheader.SplitandSplitGrouphave dividers you can drag. A divider is a focusable separator. The arrow keys, Home and End move it. A double click resets it.Dialogis centred, bare, near the top, or a bottom sheet.LinkProvidersendsNavItemandButtonlinks through your router.
Open the example ↗
Open the example ↗
Edit on GitHub
Last updated on