Skip to content
Browse documentation
whisk/ui

Borders and radii

Use border and radius scales to make surfaces legible without one-off CSS values.

Border width

Border width tokens control how much a boundary weighs.

borderWidth="xs"

0.5px

borderWidth="sm"

1px

borderWidth="md"

2px

borderWidth="lg"

4px

borderWidth="xl"

8px

Border style

Border style tokens change the visual language of a boundary.

borderStyle="solid"
borderStyle="dashed"
borderStyle="dotted"
borderStyle="double"

Radii

Radius tokens control the corners of surfaces and controls.

0px

none

1px

2xs

2px

xs

4px

sm

6px

md

8px

lg

12px

xl

16px

2xl

24px

3xl

32px

4xl

9999px

full

2px

rounded="l1"

Same as xs

4px

rounded="l2"

Same as sm

6px

rounded="l3"

Same as md

Composition

Establish hierarchy with surfaces first, add a border when an edge needs to be clear, and use a radius consistently across related controls and surfaces.

Release panel

A bordered Stack containing a bordered Box.

import { Box, Stack, Text } from "@smoothie-framework/whisk-react";

<Stack gap={3} background="surface1" rounded="lg" border="sm" borderColor="borderSubtle" padding={4}>
  <Box background="surface2" rounded="md" border="sm" borderColor="border" padding={3}>
    <Text textStyle="caption">Release panel</Text>
    <Text textStyle="body" color="subtle">A bordered Stack containing a bordered Box.</Text>
  </Box>
</Stack>

Props

PropTypeDefaultDescription
borderBorderTokennoneApply a combined border width and style from the theme.
borderWidth / borderStyleBorderWidthToken / BorderStyleTokennone / solidControl the stroke independently when the combined token is not enough.
borderColorColorTokenborderChoose the semantic color for the boundary.
roundedRadiusTokennoneApply a theme radius to the corners.