Content
Card
A card lifts one object off the paper, such as today's focus, a project's payments or a single payment, so the person reads it as one thing.
In kanso-ui as Card
Anatomy
- Container:
surfacefill,shadow-1,radius-2xl(24px) on phones orradius-xl(20px) on the web. - Inset:
space-lg(16px) padding. A flush card has none; its rows bring their own 16px. - Header row (flush cards):
k-card__head, 48px tall, with the title (k-card__title, 15px semibold) and an optional count (k-card__count, mono,ink-muted). - Content: a meter, a figure, a short list or a line of text.
Measurements
From the design’s stylesheet, each design token with the value kanso-ui gives it in light.
| Class | Property | Value |
|---|---|---|
k-card | border-radius | 24px (radius-2xl) |
box-shadow | shadow-1 | |
padding | 16px (space-lg) | |
min-width | 0 | |
k-card--web | border-radius | 20px (radius-xl) |
k-card--flush | padding | 0 |
k-card--flat | box-shadow | none |
border | 1px solid #e3e3e3 (divider) |
Tokens used
| Design token | In kanso-ui | Light | Dark |
|---|---|---|---|
surface | --kui-color-kanso-surface | #ffffff | #1c1c1c |
ink | --kui-color-ink | #1a1a1a | #ececec |
ink-muted | --kui-color-ink-muted | #5c5c5c | #b3b3b3 |
divider | --kui-color-divider | #e3e3e3 | #333333 |
shadow-1 | --kui-shadow-kanso-1 | 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04) | 0px 1px 2px 0px rgba(0, 0, 0, 0.5) |
radius-2xl | --kui-radius-kanso-2xl | 24px | 24px |
radius-xl | --kui-radius-kanso-xl | 20px | 20px |
space-lg | --kui-spacing-kanso-lg | 16px | 16px |
space-md | --kui-spacing-kanso-md | 12px | 12px |
size-control-lg | --kui-sizing-kanso-control-lg | 48px | 48px |
size-control-sm | --kui-sizing-kanso-control-sm | 32px | 32px |
font-plain | --kui-typography-font-family-plain | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif | 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif |
font-mono | --kui-typography-font-family-mono | 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace | 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace |