Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Blocks
  2. Dashboard Layout
  3. API and Development

Dashboard Layout

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import DashboardLayout, DashboardLayoutLandmark, DashboardLayoutPanel, DashboardLayoutPanelSpan, DashboardLayoutPanelState, DashboardLayoutSection, DashboardLayoutState from @prepared911/ui/blocks/dashboard-layout. See props.ts for the props and schema.ts for the declaration (inputs, slots, composed components, variants).
DashboardLayout
PropTypeDefault
titleLocalizedMessagerequired
descriptionLocalizedMessagenone
levelPageHeaderLevelOne
breadcrumb, actionsReactNodenone
landmarkDashboardLayoutLandmarkMain
stateDashboardLayoutStateReady
childrenReactNodenone; not on Loading or Empty
loadingLabelLocalizedMessagerequired on Loading; optional on Ready
loadingShape{ metrics?, panels? }{ metrics: 4, panels: 2 }
emptyTitleLocalizedMessagerequired on Empty
emptyDescription, emptyActionLocalizedMessage, ReactNodenone
DashboardLayoutSection
PropTypeDefault
titleLocalizedMessagerequired
descriptionLocalizedMessagenone
headingLevelCardHeadingLevelH2
childrenReactNodenone
DashboardLayoutPanel
PropTypeDefault
titleLocalizedMessage | DisplayValuerequired
descriptionLocalizedMessage | DisplayValuenone
headingLevelCardHeadingLevelH3
spanDashboardLayoutPanelSpanFull
controlsReactNodenone
stateDashboardLayoutPanelStateReady
chart, childrenReactNodenone; not on Loading or Empty
loadingLabelLocalizedMessagerequired on Loading
emptyTitleLocalizedMessagerequired on Empty
emptyDescriptionLocalizedMessagenone
Tiers
Container inline sizeMetric tileFullTwoThirdsHalfThird
below 1080px12 of 1212121212
1080px and up6 of 12121266
1280px and up3 of 1212864
Props
NameTypeDefaultDescription
titleLocalizedMessage—Page title, rendered by the page header as the heading.
actionsReactNode—Buttons or a ButtonGroup at the inline-end edge of the title row, passed to the page header.
breadcrumbReactNode—Breadcrumb above the title, passed to the page header.
childrenReactNode—One or more {@link DashboardLayoutSection }. A loading dashboard shows no sections. An empty dashboard shows no sections.
classNamestring—Classes appended after the generated classes. Put overrides in @layer chroma.overrides.
descriptionLocalizedMessage—Supporting copy under the title.
emptyActionReactNode—A showing dashboard has no empty-state action. A loading dashboard has no empty-state action. Primary action under the description, usually a Button.
emptyDescriptionLocalizedMessage—A showing dashboard has no empty-state copy. A loading dashboard has no empty-state copy. What to do about it.
emptyTitleLocalizedMessage—A showing dashboard has no empty-state copy. A loading dashboard has no empty-state copy. Heading copy of the empty state, such as "No data yet".
idstring—Id of the landmark element.
landmarkDashboardLayoutLandmarkDashboardLayoutLandmark.MainThe landmark that hosts the dashboard.
levelPageHeaderLevelPageHeaderLevel.OneHeading level of the title. The sections below it are one level deeper by default; when this is not {@link PageHeaderLevel.One}, pass the matching headingLevel to each section.
loadingLabelLocalizedMessage—Names the pending state of a section that suspends, for assistive technology. Setting it wraps the sections in a LoadingBoundary whose loading slot is the layout's placeholders. Omit it when nothing in the sections suspends. The one loading status assistive technology reads. Visually hidden: the placeholders are the visible cue. An empty dashboard has no pending state.
loadingShapeDashboardLayoutLoadingShape—Placeholder counts for the suspended state. Placeholder counts. An empty dashboard has no placeholders.
refRef<HTMLElement>—Ref to the landmark element.
stateDashboardLayoutState—Show the sections. Replace the sections with placeholders that reserve the layout. Replace the sections with an empty state.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Dashboard Layout / Usage
Next
Dashboard Layout / Accessibility
On this page
DashboardLayout
DashboardLayoutSection
DashboardLayoutPanel
Tiers
Props
Storybook