Skip to content
D
Documentation

DashboardOptions

reference
3 min readUpdated

Import it from @grafloria/element.

ts
interface DashboardOptions

Properties

NameTypeDefaultDescription
columns?numberColumn count for every view (default 12).
gap?numberGap between widgets AND the board padding, px (default 8).
sizing?'fit' | 'grow'Sizing mode. 'grow': rows keep rowHeight and the board extends downward — the default on a FLUID board, and what every grid library does: dragging one tile never resizes another. 'fit': the board keeps its height and rows squeeze so everything stays on one screen (bounded, see overflow) — the default on a FIXED board, and the choice for a designer who wants the whole dashboard visible at once.
layout?'grid' | 'split'HOW THE BOARD IS LAID OUT (the DevExpress question, decided 6 Sep 2026). 'grid' (the default): the cell grid — columns, spans, push, gravity, the gridstack model.
rowHeight?numberRow height in 'grow' mode, px (default 130).
width?numberBoard size, px (default 1180 × 660).
height?number
float?booleanEngine float mode (default false → gravity packs upward).
mode?'fluid' | 'fixed'DIAGRAM OR LAYOUT — the one switch (decision of 2026-09-06).
overflow?'bounded' | 'scroll'FIT MEANS BOUNDED. In 'fit' the board never changes size; widgets do. Past the row floor the design height is a CAPACITY: a drop, resize or addWidget() that would need one row too many is refused (the placeholder stays put, the palette chip dims, addWidget returns undefined) — at design time, instead of tiles painted past the frame.
static?booleanSTATIC board (gridstack's staticGrid): no drag, no resize, no handles — the viewer's mode. The API (moveTo, resize, addWidget, undo) still works, so a designer/viewer pair is one flag apart. Live: handle.setStatic().
nesting?numberThe deepest board a drop may enter (a view is 0; unbounded by default). See the grid binder's nesting.
dragHandle?DragHandleOptionDRAG HANDLE — DevExpress drags an item by its caption. true: the caption strip is the only handle (the header shows grip dots); a selector string: your own element inside the card; { grip: true, position, placement }: a painted grip, left / center / right along the top edge, inside the header band or outside as a tab above the card; off (default): the whole card.
squeeze?booleanFIT AND THE ROW FLOOR. true (default): a bounded fit board squeezes its rows toward minRowHeight before refusing growth. false: rows freeze at the height they have now — a gesture that needs a row the frame does not hold is refused outright and no other tile shrinks. See the grid binder's squeeze for the exact rule.
rtl?booleanRIGHT-TO-LEFT boards: column x=0 renders at the RIGHT edge and columns run leftwards. Cells are untouched — the same widgets array describes the same layout in both directions, and a layout saved in one renders mirrored in the other with identical cells.
responsive?DashboardResponsiveOptionsRESPONSIVE COLUMN COUNT: derive the live count from each board's width. { columnWidth: 100 } gives one column per ~100px (capped by columns); { breakpoints: [{ w: 480, c: 1 }, { w: 900, c: 6 }] } names the steps.
views?DashboardViewSpec[]One view, or many (the tab pattern). Mutually exclusive with widgets.
widgets?DashboardWidgetSpec[]Shorthand for a single unnamed view.
renderWidget?(widget: DashboardWidgetSpec, host: HTMLElement) => voidPaint a widget into its host element. Called once per widget when it mounts (the host is reused across re-renders, so this is not a per-frame hook). Omit for a titled placeholder frame.
onSelect?(id: string | undefined, viewId: string) => voidThe selection changed on a board: the selected id — a widget or a SECTION (container) — or undefined when cleared, and the view it belongs to. A press on a section's empty band selects the section.
renderCaption?(widget: DashboardWidgetSpec, host: HTMLElement) => voidPaint a section's caption band yourself (the escape hatch renderWidget is for cards): the band arrives empty, sized and themed, and keeps its press rules — a press on it selects the section, a pass-through element (a button, an input, [data-axdb-pass]) reaches your content.
onCaptionAction?(sectionId: string, actionId: string, viewId: string) => voidA press on a caption action (caption.actions): the section, the action id, the view.
onTabChange?(containerId: string, pageId: string, viewId: string) => voidA tab container switched pages: the container, the page now showing, the view.
onLayoutChange?(viewId: string, widgets: DashboardWidgetSpec[]) => voidFires after any committed gesture, with the view whose layout changed.
binder?Partial<DashboardGridOptions>Extra binder options, merged last (escape hatch to the layer below).

Was this page helpful?

DashboardOptions — Grafloria