-
Notifications
You must be signed in to change notification settings - Fork 9
Component FocusRing
MeowLynxSea edited this page Jun 18, 2026
·
5 revisions
A wrapper that paints a focus indicator around a child element when the supplied FocusHandle is focused. Use on custom interactive elements that aren't built on top of Button.
use yororen_ui::headless::focus_ring::focus_ring;
focus_ring("my-ring", &self.my_focus_handle, cx)
.render(cx)
.child(/* the wrapped element */)| Method | Purpose |
|---|---|
has_custom_color(v) |
Caller overrode the focus color. |
Factory takes (id, &FocusHandle, _cx). The handle is borrowed (cloned inside the props). .render(cx) returns Stateful<Div>. Add the wrapped content via .child(...).
Yororen UI v0.3.0 · repository · Apache-2.0 · This wiki documents Yororen UI v0.3.0.
This wiki documents Yororen UI v0.3.0 — the headless-core, swappable-renderer build.