Radius

Set data-dn-radius to give a surface consistent corners. It accepts none, 2xs, xs, sm, md, lg, xl, 2xl, 3xl, or full. Use full for pill and circular controls.

Radius values

none
2xs
xs
sm
md
lg
xl
2xl
3xl
full
import { View } from "density-base-ui";

export default function RadiusExample() {
  return (
    <View align="start" gap="sm" orientation="horizontal" padding={false} wrap>
      <div data-dn-radius="none" data-dn-depth="4" style={{ padding: "12px" }}>
        none
      </div>
      <div data-dn-radius="2xs" data-dn-depth="4" style={{ padding: "12px" }}>
        2xs
      </div>
      <div data-dn-radius="xs" data-dn-depth="4" style={{ padding: "12px" }}>
        xs
      </div>
      <div data-dn-radius="sm" data-dn-depth="4" style={{ padding: "12px" }}>
        sm
      </div>
      <div data-dn-radius="md" data-dn-depth="4" style={{ padding: "12px" }}>
        md
      </div>
      <div data-dn-radius="lg" data-dn-depth="4" style={{ padding: "12px" }}>
        lg
      </div>
      <div data-dn-radius="xl" data-dn-depth="4" style={{ padding: "12px" }}>
        xl
      </div>
      <div data-dn-radius="2xl" data-dn-depth="4" style={{ padding: "12px" }}>
        2xl
      </div>
      <div data-dn-radius="3xl" data-dn-depth="4" style={{ padding: "12px" }}>
        3xl
      </div>
      <div data-dn-radius="full" data-dn-depth="4" style={{ padding: "12px" }}>
        full
      </div>
    </View>
  );
}

Use data-dn-radius instead of custom surface border-radius declarations.