Skip to Content
Documentation
Getting startedComponentsChartsTheming
Get Pro
Concepts
Overview
Customization

Utilities

Focus rings and conditions the Saas UI preset adds.

The preset extends Chakra’s utility and condition maps. These are the additions.

Focus ring

focusRing and focusVisibleRing paint an outline from the active colorPalette.focusRing (usually the palette solid, or accent.solid on the theme root).

<Box focusVisibleRing="outside" colorPalette="accent" />
ValueBehavior
outsideOutline, offset 1px, width 1px
insideOutline flush with the border
mixedSoft outer ring plus a matching border
noneNo outline

CSS variables (set on .sui-theme or Theme):

VariableDefault
--focus-ring-width1px
--focus-ring-stylesolid
--focus-ring-offset1px
--focus-ring-color{colors.accent.solid}

focusRing reacts to :focus / [data-focus]. focusVisibleRing reacts to :focus-visible / [data-focus-visible]. Recipes use the visible variant.

Conditions

Use these as style-prop prefixes (_popupExpanded, _pressable, …).

ConditionSelector
pressablea, button, [role=button]
popupExpandedTrigger with aria-haspopup that is expanded
parentHoverHovered parent button or link
rowHoverHovered table row
collapsible[data-scope=collapsible]
groupCollapsibleCollapsible group ancestor
groupOpenOpen group ancestor
groupHover / groupFocus / groupActive / groupFocusVisible / groupFocusWithinGroup interaction
groupDisabled / groupChecked / groupExpanded / groupInvalidGroup state

popupExpanded is what solid buttons use to stay in the hover fill while a menu or popover is open.

Previous

Theme

Next

Recipes