Corners that stay in proportion as elements grow.
The smallest and largest size, for padding, margin or font size.
The screen widths where the value starts and stops growing.
The clamped value will be between 0.5rem and 1.5rem, applied linearly between viewports of 24rem and 120rem.
Cards, images and sections get much larger on a desktop than on a phone. A fixed radius that suits one size looks off at the other. The preview applies the clamp() value to the radius of a large panel, so you can find a range that looks right at every width.
From 8px to 24px between 384px and 1920px, the value is clamp(0.5rem, 0.25rem + 1.042vw, 1.5rem).
Pick Tailwind v4 under the result to get a --radius-fluid token, which creates a rounded-fluid utility. The Tailwind CSS clamp() guide covers theme tokens in more detail.
Yes. border-radius accepts lengths, so a value like clamp(0.5rem, 0.25rem + 1.042vw, 1.5rem) works in every current browser, including for the individual corner properties.
A radius that looks right on a small card on a phone looks too sharp on a large card on a desktop, and the other way around. A fluid radius keeps the corners in proportion to the element as it grows.
Give the inner element the outer radius minus the padding between them: border-radius: calc(var(--radius) - var(--padding)). With fluid values for both, the nested corners stay concentric at every width. Wrap it in max(0px, …) so it never goes negative.
A percentage radius depends on the width and height of the element, so it turns into an ellipse on rectangles. A clamp() value keeps the corners circular while still scaling with the screen.