List builder
A list that renders only the rows its viewport holds.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::data::List;
Construct
new(ident: impl Into<Ident>, count: usize, render_row: impl Fn(usize, &mut Window, &mut App) -> ListItem + 'static) -> SelfOptions
Chain onto the value.
selected(id: impl Into<SharedString>) -> Self
row_height(height: f32) -> Self
visible_rows(rows: usize) -> Self
on_select(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> Self
reorderable(reorderable: bool) -> Self
accepts(predicate: impl Fn(&DragItem, &DropPosition) -> bool + 'static) -> Self
on_reorder(handler: impl Fn(&DropIntent, &mut Window, &mut App) + 'static) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.
actions
content
menu
context-menu
popover
command-palette
toast
list
data-grid
toolbar
drawer
drag-list
detail
ide-shell
conversation
permission-matrix
step-list
schema-form
server-list
hover-card
menubar
copy-button
document-tabs
notification-center
failure-panel
upload-list
Source: crates/gpui-kit/src/data/list.rs