MDK Logo
ReferenceUIComponents

Dashboard Components

Dashboard layouts and container components

Components for building dashboard layouts and containers.

Prerequisites

  • Complete the installation
  • Import styles: import '@tetherto/mdk-react-devkit/styles.css'

Components

AlarmsBellButton

Top-bar bell button with a three-line severity badge (critical / high / medium). Counts are caller-provided so the button stays domain-agnostic; pair with useActiveIncidents or useSiteMinerCounts

agent-ready

Props

PropTypeRequiredDefaultDescription
countsAlarmsBellButtonCounts | undefined-Severity-bucketed alarm counts rendered in the stacked badge.
onClick((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined-Click handler — typically opens an alerts panel or routes to /alerts.
onSeverityClick((severity: AlarmSeverity, event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined-Click handler for an individual severity count. When provided, each badge row becomes its own button so an operator can…
labelstring | undefined-Accessible label. Defaults to "Active alarms".
classNamestring | undefined--

DashboardDateRangePicker

Dashboard-friendly wrapper around the core [**DateRangePicker**](/reference/ui/components/forms/#daterangepicker) that speaks &#123; start, end &#125; epoch-millisecond timestamps instead of Date objects, so it drops straight into useDashboardDateRange fro…

agent-ready

Props

PropTypeRequiredDefaultDescription
valueDashboardDateRange-Current range as &#123; start, end &#125; epoch-millisecond timestamps.
onChange(next: DashboardDateRange) => void-Fires with the next &#123; start, end &#125; window when the user applies a range.
dateFormatstring | undefined-Display format. Defaults to dd/MM/yyyy.
disabledboolean | undefined-Disable the trigger.
classNamestring | undefined-Optional class hook.

ExportButton

Split-button trigger for downloading the current dashboard state. The left half labels the action (↓ Export); the right half opens a dropdown with the available formats and invokes `onExport(format…

agent-ready

Props

PropTypeRequiredDefaultDescription
onExport(format: ExportFormat) => void-Fires with the chosen format when the user picks an item.
formatsreadonly ExportFormat[] | undefined-Formats to offer in the dropdown — defaults to ['csv', 'json'].
labelstring | undefined-Button label — defaults to 'Export'.
disabledboolean | undefined-Disable the button.
classNamestring | undefined-Optional class hook on the wrapper.

HeaderConsumptionBox

Single-row consumption cell for the dashboard's header strip. The 1.663 style numeric is rendered in orange (the warning token) to match the Mining OS visual treatment.

agent-ready

Props

PropTypeRequiredDefaultDescription
iconReact.ReactNode--
valueMwnumber | undefined-Current site-level power consumption, in megawatts.
unitstring | undefined-Unit label — defaults to MW.
classNamestring | undefined--

HeaderEfficiencyBox

Single-row efficiency cell for the dashboard's header strip. Displays the W/TH/s metric derived from power_w / hashrate_th.

agent-ready

Props

PropTypeRequiredDefaultDescription
iconReact.ReactNode--
valueWthSnumber | undefined-Efficiency in watts per TH/s.
unitstring | undefined-Unit label — defaults to W/TH/S.
classNamestring | undefined--

HeaderHashrateBox

Two-row hashrate cell for the dashboard's header strip. Shows the MOS-side and pool-side aggregate hashrate side by side. Values fall back to when undefined.

agent-ready

Props

PropTypeRequiredDefaultDescription
iconReact.ReactNode--
mosPhsnumber | undefined-MOS-side aggregate hashrate in PH/s.
poolPhsnumber | undefined-Pool-side aggregate hashrate in PH/s.
unitstring | undefined-Hashrate unit label — defaults to PH/s.
classNamestring | undefined--

HeaderMinersBox

Two-row miner-count cell for the dashboard's header strip. Top row carries the MOS-side online / error / offline breakdown; the bottom row shows the pool-side equivalent. Numbers fall back to w…

agent-ready

Props

PropTypeRequiredDefaultDescription
iconReact.ReactNode-Icon shown next to the "Miners" label. Caller-provided so the package stays icon-agnostic.
totalnumber | undefined-Total miners across the site (denominator of the 158 / 2,188 ratio).
onlinenumber | undefined-Online miners (the 158 numerator).
errornumber | undefined-Miners flagged in warning (the small amber count).
offlinenumber | undefined-Miners offline (the small red count).
mosTotalnumber | undefined-Optional MOS-side meta line — total miners reporting to MOS.
poolTotalnumber | undefined-Optional pool-side meta — total miners as reported by upstream pools.
poolOnlinenumber | undefined-Optional pool-side online count (green).
poolMismatchnumber | undefined-Optional pool-side mismatch count (red).
classNamestring | undefined--

HeaderStatsBar

Horizontal flex strip that hosts the dashboard's stat boxes (HeaderMinersBox, HeaderHashrateBox, HeaderConsumptionBox, HeaderEfficiencyBox). Lives inside &lt;[**AppHeader**](/reference/ui/components/navigation/#appheader)&gt; as the middle slot.

agent-ready

Props

PropTypeRequiredDefaultDescription
childrenReact.ReactNode-Stat boxes to render in order, left-to-right.
classNamestring | undefined-Optional class hook.

ProfileMenu

Top-bar profile dropdown. Wraps the core DropdownMenu primitive with the user-avatar icon as the trigger. Items are caller-provided so the menu surface stays application-driven.

agent-ready

Props

PropTypeRequiredDefaultDescription
itemsProfileMenuItem[]-Items rendered in the dropdown, top-to-bottom. Defaults to a single "Sign out" item.
userReact.ReactNode-Optional user label rendered at the top of the dropdown (e.g. an email).
iconReact.ReactNode-Override the trigger icon — defaults to the user-avatar icon.
labelstring | undefined-Accessible label for the trigger button.
classNamestring | undefined--

SiteStatsBar

Site-level summary strip composed from [**WidgetTopRow**](/reference/ui/components/widgets/#widgettoprow) (title + power) and [**GenericDataBox**](/reference/ui/components/widgets/#genericdatabox) (hashrate / miner-count / container-count). Designed to sit at the top of a dashboard page above the chart c…

agent-ready

Props

PropTypeRequiredDefaultDescription
titlestring-Site label rendered in the header row.
powernumber | undefined-Current site-level power consumption, in watts (or whatever powerUnit says).
powerUnitstring | undefined-Display unit for power — defaults to kW.
totalHashratenumber | undefined-Aggregate hashrate, in TH/s.
hashrateUnitstring | undefined-Hashrate display unit — defaults to TH/s.
minerCountnumber | undefined-Total miner count across the site.
containerCountnumber | undefined-Total container count across the site.
isLoadingboolean | undefined-Render a skeleton bar while data is loading.
classNamestring | undefined-Optional class hook.

TimelineSelector

Dropdown for picking the dashboard time range. Wraps core/[**Select**](/reference/ui/components/forms/#select) and the canonical option list from getTimelineOptions. Pair with the useDashboardTimeRange hook in @tetherto/mdk-react-adapter.

agent-ready

Props

PropTypeRequiredDefaultDescription
valuestring-Currently selected timeline value (e.g. '1m', '5m').
onChange(next: string) => void-Called whenever the user picks a new option.
optionsTimelineOption[] | undefined-Available options — defaults to getTimelineOptions. Pass a custom list to localise labels or restrict the range.
labelstring | undefined-ARIA label / placeholder for the trigger.
classNamestring | undefined-Tailwind/BEM class hook on the trigger.

On this page