Radius
Use Honest UI's radius scale for consistent corners, pills, and circular shapes.
Radius tokens keep corner decisions consistent across components and let a product change its overall character without rewriting component classes. Honest UI provides seven roles, from subtle rounding to a full pill or circle.
The scale applies wherever the theme is loaded. There is no attribute to set: controls are clearly rounded, and cards are large and calm.
Earlier styles
Honest UI used to offer modern, traditional, and soft values for data-style. They are merged into the one style above. Existing data-style attributes are ignored, so you can remove them when convenient. honestui/theme.css now includes the style, and honestui/soft.css remains as a copy so existing imports keep building.
For denser screens, use a compact density scope instead of a smaller radius scale.
Tailwind usage
<article className="overflow-clip rounded-[var(--hui-radius-3)]">
<img
alt=""
className="rounded-[var(--hui-radius-2)]"
src="/project-cover.jpg"
/>
<span className="rounded-[var(--hui-radius-full)]">Active</span>
</article>To round a product differently, override the radius tokens on :root after the theme. Component classes do not need to change.
Practical guidance
- Pick a token by the element's role and reuse it. Similar controls should not have slightly different corners.
- Keep nested radii visually related. An inner element normally uses the same or a smaller token than its container.
- Use
--hui-radius-fullfor pills and circles rather than choosing an arbitrarily large number. - Radius does not make an element interactive. Preserve visible boundaries, affordances, labels, and focus indicators.
- Test clipped focus rings and content near rounded corners. Use the focus-ring offset tokens documented in Effects when a container would otherwise cut the indicator off.