Genesis
@beta

WidgetGrid

A dashboard's widgets on a responsive grid: one column on a phone, `columns` at the widest, with a chart or a list spanning more. For the stat row of a `DashboardPage`, pass `<Widget>`s to its `stats` instead: that row is a grid already.

packages/ui/src/components/data/widget/WidgetGrid.tsx

Import
Subpath export: @marktiderman/genesis-ui/data
import { WidgetGrid } from "@marktiderman/genesis-ui/data";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

WidgetGrid

A dashboard's widgets on a responsive grid: one column on a phone, `columns` at the widest, with a chart or a list spanning more. For the stat row of a `DashboardPage`, pass `<Widget>`s to its `stats` instead: that row is a grid already.

PropTypeDefaultDescription
childrenReactNode—More tiles after the widgets: a `StatCard`, a `<Widget>` with its own props.
classNamestring—
columnsenum4Columns at the widest breakpoint (Grid's scale). Default 4.
linkComponentLinkComponent—Router link for `href` and `rowHref`. Default a plain `<a>`.
localestring—Number locale (`Intl`). Default the runtime's.
refused((reason: string) => ReactNode)—Shown in place of the tile when the viewer may not see it. Default nothing.
rowHref((row: Record<string, unknown>) => string)—A list widget's link for one row (its record page).
testIDstring—
widgetsreadonly (DefinedWidget | WidgetDefinition | WidgetGridItem)[][]The widgets, in order: each a widget, or `{ widget, span }`.