Dashboard grids
Let users arrange application-owned widgets and retain their preferred layout.
Start with your first page. Shared ui* providers are registered by createAdmin. Examples belong inside a route template, not the root HTML document. The page and its optional controller load through Ātrium’s lazy route registry.
Minimal example
<div x-data="uiDashboard(widgets, 'workspace-grid')"> <template x-for="widget in visibleWidgets" :key="widget.id"> <article class="card"> <h2 x-text="$t(widget.label)"></h2> <button @click="move(widget.id, -1)">Move earlier</button> <button @click="move(widget.id, 1)">Move later</button> </article> </template></div>Settings and behavior
- The outer page supplies widgets with stable id, label, and size fields.
- Use a unique preference key per dashboard.
- Sizes are s, m, l, and xl. CSS maps them to grid spans.
- visibleWidgets, layout, editing, and dragged expose layout state.
- move, hide, dragStart, drop, save, and resetLayout control layout.
- At least one widget remains visible.
- Keyboard move controls should accompany drag-and-drop.
Integration notes
The minimal example shows ownership and ordering. Copy the complete draggable example for drag events, data-size, and dashboard-grid markup. Never store credentials or resource contents in layout preferences.
The showcase overview demonstrates live Requests/min values and a rolling sparkline, plus resource CPU and memory readings refreshed every five seconds. Its simulation adapter belongs to the showcase and never contacts infrastructure or writes telemetry into saved records. Resource cards, lists, and details use the same readings and utilization colors: orange from 80 percent and red from 90 percent. Live updates pause in hidden tabs and stop when their page is removed.
Working reference
See the production example. Return to the component index.
Author
Laurent Declercq l.declercq@agon-innovation.ch
License
Unless otherwise stated all source code is licensed under LGPL 2.1 and has the following copyright:
© 2026, Agon Partners Innovation AG, All rights reserved.The design material and the “Agon Ātrium” trademark is the property of their authors. Reuse of them without prior consent of their respective authors is strictly prohibited.
Version
Version: 20260923