Skip to Content
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:

  1. icon actions
  2. pin
  3. overflow
  4. the primary action
  5. the panel toggle

The name of the view is in its tab. Never repeat it as a heading.

One 38px bar, then contentThe tab names the view; the header holds where it is and its actions.
Open the example ↗
A title bar and a toolbarThe view's name again at 26px, actions in a row of their own: two bars before the first issue.
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.
  • fill makes it use a box that a grid gives it, and the body takes the height. A RowList scrolls inside it and an EmptyState centres in it. A card with one Stat keeps its label and figure at the top. The figure is 32px in a tall box, and its chart takes the rest.
  • title, count and action put a SectionHeading inside.
  • padding="none" is for media or tables that reach the edges.
  • href or onClick make the whole card one link.
  • A card inside a card, or a list in a card, does not add a second padding.
Sized to content
Open the example ↗
Filling a fixed boxEach box is 180px high, as a grid cell would be. The list scrolls inside; a stat keeps its label and figure at the top and its chart takes the rest; a meter, a progress bar and their captions sit at the bottom.
Open the example ↗
A list set into its cardvariant="inset": the titles start on the card's text edge, under the property labels, and the selection fill is 6px from the card's edge.
Open the example ↗
A list padded twiceThe same list without its variant: the card's padding and the list's own inset add up, so the titles sit 12px in from everything else and the fill floats inside the content.
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.

  • footer is only for totals or pagination.
  • fill works as for Card.
  • flush is for a table or a terminal.
Header, flush body and the frameA 38px header holding the title, the state and the actions. Footers only for pagination or totals.
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.

  • count is a total in text-3.
  • One action goes at the right. It is a ghost Button size="sm", an IconButton size="sm", a link or a State.
  • 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.
Count, link, button and state
Open the example ↗
One section heading, everywhereSectionHeading: 13px semibold in a 24px row, a total in text-3, one action at the right.
Open the example ↗
Each module its own headingA 20px title from one module, a 16px one from another, a capitalised label from a third: the page reads as three apps.
Open the example ↗

Layout parts

  • AppShell holds the sidebar, the top bar, the status bar and the phone drawer. The sidebar is on bg-0, and content is in bg-1 frames with radius 8 and an 8px gap.
  • Frame has a TabStrip header.
  • Split and SplitGroup have dividers you can drag. A divider is a focusable separator. The arrow keys, Home and End move it. A double click resets it.
  • Dialog is centred, bare, near the top, or a bottom sheet.
  • LinkProvider sends NavItem and Button links through your router.
Sidebar and two framesThe status bar holds only what is out of the ordinary: here, a dropped connection.
Open the example ↗
HorizontalDrag the divider, or focus it and use the arrow keys, Home and End. Double-click resets.
Open the example ↗
The layout parts in the gallery ↗
Edit on GitHub

Last updated on

On this page