Skip to content

Focus Ring

The focus-ring helper replaces the browser outline with a soft, theme-coloured ring that appears for keyboard users. Change its colour with focus-ring-* classes or tune size, offset and blur with the --ui-focus-ring-* variables. Press Tab to move through the examples; preview boxes show the ring permanently.

1Basic focus ring

focus-ring on a link: tab to it to see the soft ring; the second copy shows the ring all the time.

Tab to me Ring preview

2Coloured rings

focus-ring-* picks a theme colour for the ring. Shown here as previews.

PrimarySecondarySuccessDangerWarningInfo

3Custom ring colour

Set --ui-focus-ring-color to any rgba value, here the template accent colour.

4Offset ring

Move the ring with --ui-focus-ring-x and --ui-focus-ring-y for a playful offset shadow.

Offset ring

5Blurred glow

A large --ui-focus-ring-blur turns the ring into a soft glow.

Glowing focus

6Card links

Whole cards rendered as links get a clear ring for keyboard users. The first card shows the preview.

7List group items

focus-ring-info on actionable list items in place of the default outline.

8Icon toolbar

Icon buttons share the focus ring; the delete button uses focus-ring-danger.

9Filter chips

Pill-shaped filter links; the ring follows the rounded-pill corners.

10Avatar link

A round avatar that links to a profile shows a round ring.

11Skip link

A skip-to-content link that appears on focus and carries a strong ring.

Skip to main content

Press Tab inside this example to reveal the skip link.

12Page number links

A minimal page switcher where every number shows a ring on focus.

13Navigation menu

Nav links with a secondary coloured ring.

14Image thumbnail link

A gallery thumbnail link: the ring wraps the rounded image.

Photo one Photo two

15Table links

Small row links in a table with the ring for keyboard navigation.

MemberProfile
Tariq VargaView
Ravi HughesView
Mateo FischerView

16Thick ring

Raise --ui-focus-ring-width for high visibility, for example in kiosk or TV interfaces.

Thick warning ring

17Settings tiles

Large tile links in a settings hub, each with a focus ring.

18Search pill

A rounded-pill search link with an accent ring.

19Ring on dark surfaces

A light ring colour keeps focus visible on dark panels.

Docs Preview

20Ring next to the default outline

Compare a plain link (browser outline) with a focus-ring link: tab through both.