Expand description
What this design system paints on a grid layout.
Base owns the grid: where items sit, the drag, the resize, the keyboard and the layout arithmetic. Everything here is appearance — the gap, the motion items settle with, the drop placeholder, the resize grip, and how the dragged and the keyboard-selected items stand out.
Structs§
- Grid
Area - Where one item sits in a grid layout, in zero-based grid cells.
- Grid
Item - One item of a
GridLayout, paired with theGridAreaof the same id. - Grid
Layout - A grid whose items the user drags and resizes, the way dashboards and widget boards are arranged.
- Grid
Layout State - The state of a
GridLayout: the items’ areas, the rules the layout settles under, and any gesture in progress. - Grow
Height - Make the selected item one row taller.
- Grow
Width - Make the selected item one column wider.
- Move
Down - Move the selected item down one row.
- Move
Left - Move the selected item one column toward the leading edge.
- Move
Right - Move the selected item one column toward the trailing edge.
- MoveUp
- Move the selected item up one row.
- Select
Next Item - Select the next item in reading order.
- Select
Previous Item - Select the previous item in reading order.
- Shrink
Height - Make the selected item one row shorter.
- Shrink
Width - Make the selected item one column narrower.
Enums§
- Grid
Layout Event - Emitted by
GridLayoutStatewhen the layout changes.
Functions§
- grid_
drag_ handle - The part of an item the pointer moves it by, for an item built with
GridItem::drag_handle_only— a card’s header, say. - grid_
layout - Create a
GridLayoutwearing this design system: the theme’s medium spacing between items, its move motion, a dashed drop placeholder, a resize grip in each resizable item’s corner and a raised dragged item.