Skip to content

Radius

Choosing a Tailwind CSS radius class that matches the design value.

Dify UI does not define its own radius tokens. Corners use Tailwind CSS's default rounded-* scale.

Match the value, not the name

Check the actual radius value in Figma before choosing a rounded-* class; matching token names do not imply matching values. For example, radius/sm = 6px requires rounded-md, not rounded-sm (4px). Prefer a standard Tailwind class with the matching value; use an arbitrary value only when none matches, such as rounded-[10px] for 10px.

ClassValue
rounded-xs2px
rounded-sm4px
rounded-md6px
rounded-lg8px
rounded-xl12px
rounded-2xl16px
rounded-3xl24px
rounded-4xl32px
rounded-fullFully round

Prefer component variants

Use semantic Dify tokens and existing component variants before hard-coded values or repeated primitive classes. Use an important modifier only for a tightly scoped compatibility override after the owning variant, data attribute, and selector structure cannot express the state.