-
Notifications
You must be signed in to change notification settings - Fork 9
Component VirtualRow
MeowLynxSea edited this page Jan 24, 2026
·
6 revisions
A virtualization-safe row shell.
use gpui::px;
use yororen_ui::component::{list_item, virtual_row};
let row = virtual_row(("item", 42))
.gap_below(px(6.))
.child(list_item().content("Row content"));- Stable key is required.
- Spacing/dividers should be attached to the row shell.
- If row height changes after render, notify the list via
VirtualListController.
- Any row rendered inside
VirtualList - Any UI where rows can be recycled/reordered and you need stable identities
Guide-Recipes-ListTreeRow
-
virtual_row(key)/VirtualRow::key(key): provide stable per-row key (required) -
divider(bool): whether to render a divider below the row -
gap_below(px(...)): spacing below the row
- VirtualRow also installs a per-row element namespace so
Location::caller()ids inside row content do not collide across recycled rows.
divider(false)gap_below(0px)
use gpui::px;
use yororen_ui::component::{list_item, virtual_row};
let row = virtual_row(("row", 0))
.divider(true)
.gap_below(px(6.))
.child(list_item().content("Row with divider"));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.