Skip to content

DocsDisplayCard, panel and tile

PT

Display

Card, panel and tile

The three surface layers: shell, panel and tile. Depth comes from them, not from shadow.

CSS only

Example

Recurring revenue
$48,300 this month
+14.8%
1,240 active accounts

Monthly summary

Shell, panel and tile, no shadow.

Installation

Card, panel and tile ships in the full package, in unslop.css:

curl -fsSL unslop.leallabs.dev/i | sh

No build It's just CSS: with unslop.css on the page, the classes already work.

Classes and variants

ClassWhat it does
u-cardShell: --card, --line border, radius 28, padding 12.
u-panelPanel: --panel, radius 16. 28 = 16 + 12, so the curves stay parallel.
u-tileTile: --tile, radius 14, inside the panel.
u-headHeader row: text on the left, control on the right.
u-labelSmall label in --fg-2.
u-bigBig number, with tabular figures. A small inside it becomes the unit.
u-numTabular figures only, without changing the size.
u-card__foot, u-card__title, u-card__descTitle and description outside the panel.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
articleelementUse article when the card makes sense on its own; div everywhere else.

Type to search. Arrows pick, Enter opens.