Skip to content

Radius

Tokens

Components never use a literal rounded-* value. Controls (buttons, badges, inputs, chips) use --radius-lg, larger controls use --radius-xl, and containers (Card, Dialog, Popover) use --radius-panel. --radius-sm is for small details such as swatches and skeleton bars. The radius preset in your theme sets --radius-lg, --radius-xl and --radius-panel; --radius-sm stays at 0.25rem.

Preset--radius-sm--radius-lg (controls)--radius-xl (large controls)--radius-panel (containers)
None
0.25rem
0px
0px
0px
Small
0.25rem
0.25rem
0.375rem
0.5rem
Mediumdefault
0.25rem
0.5rem
0.75rem
1rem
Large
0.25rem
0.75rem
1rem
1.5rem
Full
0.25rem
9999px
9999px
1.5rem

Concentric radius

When a rounded element sits inside a padded, rounded container, its corners should follow the container's curve. Shavin computes the inner radius as:

R_inner = max(floor, R_outer − P)
floor   = min(--radius-lg, --radius-panel / 2)

R_outer is the container's radius and P is its padding. The floor keeps the inner corner from going square unless the theme radius is 0.

Containers write the result to --radius-panel-inner. Elements with radius="concentric" read it. A wrapper with no background, border or padding passes the value through. If no container sets it, it falls back to --radius-panel.

Landscape inside a card, corners following the card
Image with radius='concentric' inside a Card
<Card padding="md">
  <Image
    src="/photo.jpg"
    alt="Concentric demo"
    ratio="16/9"
    radius="concentric"
  />
</Card>
Landscape inside a card, corners rounder than the card allows
Without concentric: the image uses the full panel radius
<Card padding="md">
  {/* default: radius="inherit" uses --radius-panel */}
  <Image src="/photo.jpg" alt="" ratio="16/9" />
</Card>
Landscape inside a Flex inside a card

Flex has no background or padding here, so the image still reads the Card's value.

A transparent Flex passes the value through
<Card padding="md">
  <Flex direction="column" gap="4">
    <Image
      src="/hero.jpg"
      alt="Concentric through Flex"
      ratio="16/9"
      radius="concentric"
    />
    <Text size="sm" color="subtle">
      Caption
    </Text>
  </Flex>
</Card>
Landscape inside a square-cornered box, with square corners
data-concentric-reset sets the inner radius to 0px
<Card padding="md">
  {/* background, no radius: sharp corners */}
  <div className="bg-surface-hover p-4" data-concentric-reset>
    <Image
      src="/photo.jpg"
      alt="Sharp boundary reset"
      ratio="16/9"
      radius="concentric"
    />
  </div>
</Card>

Which components take part

Containers that set the value

Card, StatCard, Calendar and CheckboxCards, plus Box, Flex, Grid and Section when translucent is set. Card always uses --radius-panel; it has no radius prop.

Elements that read it

Image, Video, Avatar, Badge, Slider and RadioGroup accept radius="concentric". On any other element, use the rounded-panel-inner class.

Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font