pub struct GridProps {
pub columns: u8,
pub md_columns: Option<u8>,
pub lg_columns: Option<u8>,
pub gap: GapSize,
pub scrollable: Option<bool>,
pub spans: Vec<u8>,
pub fill: Option<bool>,
}Expand description
Props for Grid component — multi-column layout.
Fields§
§columns: u8Number of columns (1-12) at base (mobile) viewport.
md_columns: Option<u8>Number of columns at md breakpoint (768px+). When set, creates a responsive grid.
lg_columns: Option<u8>Number of columns at lg breakpoint (1024px+). Optional; falls back to md.
gap: GapSizeGap between grid items.
scrollable: Option<bool>Enables horizontal scroll mode. Children get min-w-[280px] and the grid
uses grid-flow-col auto-cols layout for Trello-like horizontal scrolling.
spans: Vec<u8>Per-child column spans, aligned positionally with children (missing
entries default to 1). A child with span N occupies N tracks — e.g.
columns: 1, md_columns: 3, spans: [2, 1] renders a 2/3 + 1/3 row.
Supported spans: 2–4 on the base grid, 2–3 at the md breakpoint.
Ignored in scrollable mode.
fill: Option<bool>Fill mode for viewport workspaces (pages with Spec.fill_viewport):
the grid stretches to its parent’s height with equal-height rows and
every child cell scrolls internally. The document never scrolls —
each pane does. Combine with spans for asymmetric panes (e.g. a
POS register: 1/3 cart + 2/3 product grid). Ignored in scrollable
mode.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GridProps
impl<'de> Deserialize<'de> for GridProps
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for GridProps
impl JsonSchema for GridProps
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more