---
title: "Shape"
description: "A radius ladder derived from one value, concentric nesting, and squircle corners where the browser supports them."
url: "https://opsinjs.pensievelabs.org/docs/foundations/shape"
source: "https://opsinjs.pensievelabs.org/docs/foundations/shape.md"
section: "Foundations"
kind: "foundation"
aliases: ["corners", "border radius", "radius ladder", "concentric corners", "squircle", "corner-shape", "superellipse", "radius tokens"]
---

> Elements written as `<PascalCase … />` below are opsinjs documentation
> components. Their attributes are the content: the values they render are
> generated from `tokens/*.json` and `registry/catalogue.ts` and are
> published separately at https://opsinjs.pensievelabs.org/r/index.json and under the Reference
> section.
> Nothing is missing from this page. The data simply does not live in
> the prose.

Shape decides how big a corner is and which curve draws it. It never carries meaning, so a rounder card is not a friendlier result.

## Radius scale [#radius-scale]

Every rung is a fixed multiple of one root, `--opsin-radius-base`. Rungs are named for the object, not the size, and `rounded-opsin-<rung>` applies them.

| Rung   | Use it for                                                                                                                                                                             |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `none` | Full-bleed media and anything that meets a screen edge                                                                                                                                 |
| `xs`   | Inline marks and small indicators, and the floor for a nested corner                                                                                                                   |
| `sm`   | Small controls and a well inside a card                                                                                                                                                |
| `md`   | The default for a bounded surface: [Card](../components/card.mdx), a tile, a callout, a field, a list row                                                                              |
| `lg`   | A card nearly the width of a phone screen, and a banner                                                                                                                                |
| `xl`   | Sheets and dialogs                                                                                                                                                                     |
| `full` | Capsules and circles: a [Button](../components/button.mdx), a chip, a segmented control, a status pill. Use `rounded-full`, because a capsule is a different object, not a bigger rung |

* Things a reader presses are capsules, and things a reader reads are squircles.
* Match the rung to the object. When two adjacent rungs both seem right, take the smaller.
* A different character is a change to the root in your theme, never to one component's radius.
* Never square a corner for emphasis, and never animate a radius.

## Nesting [#nesting]

When one rounded box sits inside another, the inner radius is the outer radius minus the padding between them, and never less than `xs`.

```text
inner = max(outer - gap, radius-xs)
```

Only this keeps the two curves parallel. An equal inner radius pinches the gap on the diagonal, and a larger one bulges. Compute it from tokens, since a hard-coded `8px` fits exactly one padding.

## Squircle [#squircle]

Card, [Dialog](../components/dialog.mdx), [Sheet](../components/sheet.mdx), [Callout](../components/callout.mdx), [Field](../components/field.mdx), [Accordion](../components/accordion.mdx), [MetricTile](../components/metric-tile.mdx), [ResultCard](../components/result-card.mdx) and [AlertBanner](../components/alert-banner.mdx) carry `[corner-shape:var(--opsin-corner-shape)]` beside their radius. The token holds `superellipse(2)`, the same curve as the CSS keyword `squircle`, which eases curvature into the straight edge instead of pinching where an arc meets it. The argument is a power of two, so `superellipse(4)`, which the token held until 2026-11, drew a nearly square corner. A browser without `corner-shape` drops the declaration and draws an ordinary rounded corner at the same radius, so no `@supports` guard is needed and nothing depends on it.

* Opt in on surfaces the system draws, never on images, embeds or video.
* Do not shrink the radius to compensate, or the nesting arithmetic differs between browsers.
* Do not fake it with a clip path or an SVG mask, which clip focus rings and shadows.

## Accessibility [#accessibility]

* Small controls do not take large rungs, because a radius takes tappable area from the 44pt floor in [Space and layout](./space.mdx).
* A parent with a smaller radius can clip a child's focus ring, so the ring is drawn outside the box with an offset.
* Assistive technology announces no corner, which is why shape may not carry information.

This site's chrome takes the same shapes at desk density, so its sheets, capsules and focus rings follow the rules on this page.

## Tokens [#tokens]

<TokenTable scope="shape" />
