Focus Ring

Yamada UI provides features to apply various styles when an element is focused.

Overview

A focus ring is used to identify the element that is currently focused. Yamada UI provides focusRing and focusVisibleRing to easily configure the style of the focus ring.

Usage

focusRing

focusRing is applied to &:is(:focus, [data-focus]).

focusVisibleRing

focusVisibleRing is applied to &:is(:focus-visible, [data-focus-visible]).

Customize

Change Variant

Change Color

To change the color, set a value to focusRingColor.

Change Width

To change the width, set a value to focusRingWidth.

Change Style

To change the style, set a value to focusRingStyle.

Change Offset

To change the offset, set a value to focusRingOffset.