Skip to main content
  1. Docs
  2. Components
  3. 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
panel.tsx
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

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

04

Sides

paddingInline and paddingBlock override padding on those sides, in logical directions.

8px top and bottom, 24px at the start and end

05

Another element

render: a <section>, an <aside>, a <li>, with the same surface.

Next — BoxUsage