| Token | Position in the scale |
|---|---|
--uit-corner-radius-xxsmall | Tightest rounding; small indicators and inset artwork. |
--uit-corner-radius-xsmall | Compact surfaces and media inset inside a larger surface. |
--uit-corner-radius-small | Small tiles and controls. |
--uit-corner-radius-medium | Ordinary content surfaces. |
--uit-corner-radius-large | Larger panels and cards. |
--uit-corner-radius-xlarge | Prominent, near-full-width surfaces. |
--uit-corner-radius-2xlarge | Very large surfaces where the curve is part of the shape’s character. |
--uit-corner-radius-3xlarge | The largest fixed step; surfaces that read as nearly capsule-shaped. |
--uit-corner-radius-full | Pill and circular shapes, whatever the element’s size. |
full for pills and circles. Use the ordinal steps for everything else, choosing the step that matches the surface’s weight in the hierarchy. The radius steps do not correspond one-to-one to the spacing steps of the same name, and a component that already owns a radius is the authority on which step it uses.2xlarge and 3xlarge as CSS tokens and XXLARGE and XXXLARGE as CornerRadius members; they are the same two steps under two spellings.| Enum | Members | Used by |
|---|---|---|
SurfaceCornerRadius | XXSMALL, XSMALL, SMALL, MEDIUM, LARGE, XLARGE | Surface |
ShimmerItemCornerRadius | SQUARE, XXSMALL, XSMALL, SMALL, MEDIUM, LARGE, XLARGE | ShimmerItem |
CornerRadius | XXSMALL, XSMALL, SMALL, MEDIUM, LARGE, XLARGE, XXLARGE, XXXLARGE, FULL | RoundedRectangleShapeProvider and TailShapeProvider |
Surface and ShimmerItem already default to a step — SurfaceCornerRadius.XSMALL and ShimmerItemCornerRadius.MEDIUM respectively — so pass a radius only when the shape has to differ from that default.import { Surface, SurfaceCornerRadius, TextStyle, TextView } from '@wearables-ui-toolkit/mrbd';
<Surface cornerRadius={SurfaceCornerRadius.MEDIUM}>
<TextView textStyle={TextStyle.BODY2}>Signal acquired</TextView>
</Surface>
ShimmerItemCornerRadius.SQUARE is the only unrounded option in the system, and it exists so a loading placeholder can match an unrounded element it stands in for.CornerRadius is a branded numeric type: its members are the only values a shape provider accepts, so an arbitrary number will not type-check. The generated CSS custom properties and TypeScript geometry values come from the same token definitions, keeping CSS fallbacks and smooth paths on one fixed scale. Use the custom properties in application CSS, but do not redefine them.CornerRadius member and memoize it, so the cached geometry stays valid across renders.import { useMemo, type ReactNode } from 'react';
import { Container, CornerRadius, RoundedRectangleShapeProvider } from '@wearables-ui-toolkit/mrbd';
function Tile({ children }: { children: ReactNode }) {
const shapeProvider = useMemo(
() => new RoundedRectangleShapeProvider(CornerRadius.LARGE),
[],
);
return <Container shapeProvider={shapeProvider}>{children}</Container>;
}
full for a pill instead of an arbitrarily large fixed step.border-radius to reproduce smooth corners, tails, avatar cutouts, panel shapes, or focus outlines.