Skip to main content

Module data

Module data 

Source
Expand description

Data display: components that present structured content.

  • Avatar, List, Table are stateless RenderOnce builders.
  • Tabs and Accordion are gpui entities that own selection / expansion state. Their panel content is supplied as a builder closure so it can be rebuilt each frame.

Structs§

Accordion
A set of collapsible panels. Create with cx.new(|cx| Accordion::new(cx).item("Title", |_, _| ...)).
Avatar
A user avatar showing initials. The Mantine Avatar (image variants aside).
AvatarGroup
A stack of overlapping avatars. The Mantine Avatar.Group.
Column
One column of a TableView: header title, width policy, alignment, optional sort comparator, and a cell renderer.
DataView
A signal-bound collection view. Create with cx.new(|cx| DataView::new(cx, &signal).item(...)).
List
A bulleted or numbered list. The Mantine List.
TabBar
A document-style tab strip. Create with cx.new(|cx| TabBar::new(cx).tabs(["one", "two"])).
Table
A data table. The Mantine Table. Cells are plain strings; columns size equally.
TableView
A rich data table. Create with cx.new(|cx| TableView::new(cx).columns(...).rows(...)).
Tabs
A tabbed view. Create with cx.new(|cx| Tabs::new(cx).tab("One", |_, _| ...)).
Timeline
A vertical timeline. Items up to and including active are highlighted.
TreeNode
One node in a TreeView. A node with children is a branch (chevron + folder icon); a node without children is a leaf (file icon).
TreeView
A hierarchical list. Create with cx.new(|cx| TreeView::new(cx).nodes(...)).

Enums§

DataViewEvent
Emitted when a selectable item is clicked. Carries the item’s index into the source vector (not its display position), so it stays valid under any filter/sort projection.
DataViewLayout
How the items flow.
SelectionMode
How rows respond to clicks and arrow keys.
SortDir
Sort direction of a table column.
TabBarEvent
Emitted by TabBar on user interaction.
TableViewEvent
Events emitted by TableView. All row indices refer to the source rows, not the current display order.
TreeViewEvent
Emitted by TreeView. All variants carry the node id.