Struct FocusRing
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Focus state of the element carrying Ref, returned by Hooks.UseFocusRing.
Rides the same focus-visible heuristic as the focus-visible: styling variant, so the two
surfaces cannot drift.
public readonly struct FocusRing
Properties
- IsFocusVisible
True while the
focus-visible:variant would be lit on the element; the focus guide's focus-visible section gives when that is.
- IsFocused
True while the element holds focus, from any input modality.
- Ref
Attach point: pass as the
refCallback:argument of anyV.*factory. The returned cleanup detaches the listeners (the standard refCallback contract).