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.
| Class | Value |
|---|---|
rounded-xs | 2px |
rounded-sm | 4px |
rounded-md | 6px |
rounded-lg | 8px |
rounded-xl | 12px |
rounded-2xl | 16px |
rounded-3xl | 24px |
rounded-4xl | 32px |
rounded-full | Fully 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.