Utility classes for changing an element's border radius property. Includes omni-directional, single corner, and directional corner variants.

Unity does not support rem/em units, or allow calc() methods in USS files. All border-radius classes use px values, and follow the default increment stated unless changed by you. Learn more about Customizing Utility Classes.

Classes for border radius are named using the format: [br]-[corner(s)]-[value]. Corner is optional, and if omitted, will be applied on all 4 corners.

Where corner includes:

  • nothing - for border-radius on all 4 corners
  • tl - for border-top-left-radius
  • tr - for border-top-right-radius
  • br - for border-bottom-right-radius
  • bl - for border-bottom-left-radius
  • top - for border-top-left-radius and border-top-right-radius
  • bottom - for border-bottom-left-radius and border-bottom-right-radius
  • left - for border-top-left-radius and border-bottom-left-radius
  • right - for border-top-right-radius and border-bottom-right-radius

Where value includes:

  • # - px value for that border-radius property. By default, border radius classes start at 0px, and increment by 5px until stopping at 25px.
  • full - 1000px value for the border-radius property.
ClassContents

Note that border-radius: 0px is the default value for border radius in Unity. Unless needed for a special case, the br-0 class is not needed.

br-5
br-15
br-25

UXML

br-tl-5
br-tr-10
br-br-15
br-bl-20

UXML

br-left-10
br-right-20

UXML

br-top-10
br-bottom-20

UXML