Generic selectors

Exact matches only

Search in title

Search in content

Post Type Selectors

Corner Radius

Corner radius helps make UI personable, easier to process, and recognizable at a glance, while also building consistent visual vocabulary and narrative, directing attention, communicating state, and expressing brand.

  • Overview
  • Specs
  • Guidelines

Compose Design allows allows you to round off the corners of a variety of components, with corner radius metric values ranging from 999, 24, 16, 12, eight, and four for easy reference. The specific radius metric used depends on the size of the component to which it is applied.


Flexibility

To enhance the usability and versatility of corner radius values, we’ve selected a set of standardized values. This minimizes discrepancies between developers and designers, ensuring smoother collaboration and implementation.


Usage

The size of a component determines its radius values, with larger components containing other components being able to have a larger corner radius. Each component in Compose comes preset with the appropriate corner radius. This guide provides an understanding of how radius values are implemented in the Compose library.

In most cases, corner radiuses on rectangle shapes are four pixels by default.

corner_radius_usage
Corner Radius guide

Corner Radius Values

By default, every component is mapped to one of the seven shape styles.
Use these radius tokens to change the corner radius on elements.

TokenUsageValue
X-SmallButtons, text fields, checkboxes4 pixels
SmallDate picker, dropdowns8 pixels
Medium12 pixels
Large16 pixels
X-Large24 pixels
RoundedSwitch, radio button, avatar999 pixels

Four Pixels Radius (Default)

The most commonly used number for the corner radius is four pixels. Medium-sized components like buttons, text fields and checkboxes use this value by default. 

Rounded

The number we use to achieve full rounded corners is 999px. Small-sized components like switch, radio button, avatar use this value by default. 

corner_radius_rounded
Corner Radius full rounded Version

Symmetry

Components can have either symmetric or asymmetric corner shapes. Symmetric shapes have the same value for all corners, while asymmetric shapes can have corners with different values. Components such as button groups and split buttons are always asymmetric .


Nested Components

For components with a default corner radius of four pixels, their corner radius will remain four pixels when nested inside other components. This choice was made to maintain consistency with the the parent component.


FAQ

Are off-scale corner radius increments allowed?

No, deviating from the spacing scales should be avoided whenever possible.

Related

Não foram encontrados artigos.

Token Mapping

TokenUsageValue
x-small-radius (default)Buttons, textfields, checkboxes4 pixels
small-radiusDatepicker, dropdowns8 pixels
medium-radius12 pixels
large-radius16 pixels
x-large-radius24 pixels
roundedSwitch, radio button, avatar999 pixels

Applying radius

For easy identification, token names inherently convey their purpose, aiding in their correct application. The initial segment of a token name indicates the designated radius size for the UI element, such as sx-mall or larger-radius.

border-radius: var(--Border-Radius-x-small-radius);
border-radius: var(--Border-Radius-small-radius);
border-radius: var(--Border-Radius-medium-radius);
border-radius: var(--Border-Radius-large-radius);
border-radius: var(--Border-Radius-x-large-radius);
border-radius: var(--Border-Radius-rounded);

When to avoid rounded corners

In certain cases, it’s preferable not to have rounded corners on a component by default, especially when doing so would lead to awkward gaps.

Be sure to exclude space between multiple UI elements in a single container. For example, both parts of a button group.

Rounded corners are not necessary for components that reach the edge of the screen.


Corner Radius Scale

Use only values inside the scale.

Deviating outside the scope of the scale is to be avoided.


Corner Radius Components

Use the respective corner radius for each component.

Changing the corner radius values that are attributed to components is to be avoided.


Case Studies

Why Web Accessibility Matters - And How to Start

Why Web Accessibility Matters – And How to Start

Web accessibility is about designing inclusive digital experiences that benefit everyone, guided by four key principles and driven by the …
Writing for Everyone

Writing for Everyone: Every Word Counts in Accessibility

Writing for everyone is an essential part of any digital product. It can and does make a big difference to …

Release v1.4

Overview Compose Design has recently undergone some important updates, which means it’s time for another release note. In addition to …

Outline