- Docs
- Components
- Layout
Box
A token-only surface: padding, a background, a border and corners. No margin: space between siblings is the parent's gap.
- Import
- @qeetrix/react
- Status
- StableSince 0.0.2
- Renders
<div>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
Payroll portal
Padding
Background
Border
Corners
import { Box, Text } from "@qeetrix/react";
<Box
padding="lg"
background="raised"
border="default"
radius="surface"
>
<Text>Payroll portal</Text>
</Box>02
A surface
padding from the inset tokens, a background, a border and corners: the sanctioned way to give a region a surface.
Payroll portalOIDC · 642 users
<Box padding="lg" background="raised" border="default" radius="surface">
<Text weight="semibold">Payroll portal</Text>
<Text size="sm" tone="subtle">OIDC · 642 users</Text>
</Box>03
Backgrounds
A surface or a tint from the tokens; inverse sets the inverse text colour too.
canvas
default
raised
sunken
neutral
brand
selected
inverse
<Box background="sunken" padding="md">…</Box>
<Box background="inverse" padding="md">…</Box>04
Sides
paddingInline and paddingBlock override padding on those sides, in logical directions.
8px top and bottom, 24px at the start and end
<Box padding="sm" paddingInline="xl" background="sunken" radius="control">…</Box>05
Another element
render: a <section>, an <aside>, a <li>, with the same surface.
<Box render={<aside />} padding="md" background="sunken" radius="surface" aria-label="Tips">…</Box>