CornerRadiusInput

Components/Form

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/cornerradiusinput

Overview

Copy

Corner radius inputs enable users to adjust the border radius for different elements, such as boxes or images.

Do

  • Use to edit border radius of elements.

Don't

  • Don't use to edit other interconnected values, such as margins or paddings. Use <NumberInput/> instead.

Feature examples

Size

Adjust the size of the input using the size prop. It supports 3 sizes:

  • Use large to emphasize input.
  • Use medium (default) for most common cases.
  • Use small for more dense and compact layouts.
Copy

Status

Below the input, include text explaining the status.

To add an inline error message wrap the component in a <FieldSet/> and add the statusMessage to it.

Copy

Edit mode

Corners can be adjusted individually or collectively by toggling between the "Edit individually" and "Apply to all corners" options in the lock and unlock toggle.

Copy

Suffix

Specify the unit used to adjust corner radius of an element using suffix. The default unit is pixels (px).

Copy

Min and max values

Define the range of the corner radius values using min and max.

Copy

Invalid value

Use onInvalid callback function to notify users when they enter invalid inputs. Explain why it's invalid using the statusMessage prop of a <FieldSet/>.

Copy

Common use case examples

Change units

Allow users to change units of corner radius by adding dropdown selection to the suffix area.

Copy

Design panel

Use corner radius input to control the design of elements, such as button or box.

Copy

Accessibility examples

Screen reader support

Assign each input of the control with an ariaLabel value to specify which corner it represents, for example:

  • ariaLabel = "Top left corner"
  • ariaLabel = "Top right corner"
  • ariaLabel = "Bottom left corner"
  • ariaLabel = "Bottom right corner"

When the user is applying changes to all corners, use linkedValuesChangedMessage to pass a message indicating that all corners have been updated.

Copy

Code

Copy

Props

NameTypeDefaultDescription
bottomLeftCornerProps—Properties for the bottom left corner input.
bottomRightCornerProps—Properties for the bottom right corner input.
dataHookstring—Applies a data-hook HTML attribute that can be used in tests.
linkedboolean—When set to true, linked mode is initially enabled on the component.
linkedValuesChangedMessagestring—When all corners have been modified in linked mode, this message is announced to screen readers.
linkingButtonLabels (required){ pressed: string; unpressed: string; }—Specifies the labels displayed when hovering over the link button. The pressed key defines the label shown when link mode is active (or pressed), while the unpressed key defines the label for when link mode is inactive (or unpressed).
maxnumber999Max value for all corners.
minnumber—Min value for all corners.
onLinkedToggle(isLinked: boolean) => void—Callback function that is called when the linked mode is toggled on or off.
size"small" | "tiny" | "medium" | "large"—Specifies the size of the component.
topLeftCornerProps—Properties for the top left corner input.
topRightCornerProps—Properties for the top right corner input.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
isLinkedreturns if linking functionality is enabled
getSizereturns the size of component
getCornerInputReturns the testkit of the input of the specified corner
linkingButtonReturns linking button testkit
getLinkingButton—
getLinkedValuesChangedMessage—
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.326.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.272.0 (2026-04-27) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
  • 1.242.0 (2025-12-19) — maintenance release, no component-specific changes
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.118.0 (2024-07-30) — feat: controlled mode for linked state (#13982)
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.101.0 (2024-04-12) — maintenance release, no component-specific changes
  • 1.98.0 (2024-03-15) — maintenance release, no component-specific changes
  • 1.97.0 (2024-02-26) — maintenance release, no component-specific changes

Last updated: 22 October 2026

Did this help?