Demos
Employee Management Demo
Section titled “Employee Management Demo”A comprehensive demo application that demonstrates the full power of @toolbox-web/grid. This demo uses realistic employee data with 15+ columns, custom editors, renderers, master-detail expansion, filtering, sorting, selection, export, and more.
What This Demo Showcases
Section titled “What This Demo Showcases”| Area | Highlights |
|---|---|
| Data | 200 generated employees, 15+ columns mixing text/number/date/select/boolean, nested objects, computed values |
| Visuals | Custom renderers (status badges, star ratings), row styling, shell header with export buttons, side tool panels |
| Interaction | Multi-select, multi-sort (Shift+Click), per-column filtering, resizing, master-detail expansion |
| Editing | Inline edit (double-click), custom editors, validation, undo/redo (Ctrl+Z / Ctrl+Y) |
| Advanced | CSV/Excel export, column visibility & reorder, full keyboard nav, clipboard, context menu, row grouping |
Try These Interactions
Section titled “Try These Interactions”- Sort — Click the “Name” column header. Click again to reverse. Hold Shift and click “Department” for multi-sort.
- Filter — Hover over a column header and click the filter icon. Try filtering “Department” to “Engineering”.
- Edit — Double-click any cell in the “Name” or “Email” column. Press Enter to commit, Escape to cancel.
- Select — Click the checkbox column to select rows. Use Shift+Click for range selection.
- Resize — Drag the border between any two column headers to resize.
- Expand — Click the expand arrow on any row to see the master-detail panel.
- Export — Click the 📄 or 📊 buttons in the header toolbar to export CSV or Excel.
- Undo — After editing a cell, press Ctrl+Z to undo the change.
Calendar Demo
Section titled “Calendar Demo”A month-view calendar built on top of <tbw-grid> — same data-grid engine, different surface. Rows are ISO weeks (Mon–Sun), columns are weekdays + a fixed week-number gutter, and each cell renders a CalendarDay with up to three coloured event chips. The whole thing demonstrates how the grid’s extension points (custom shell header, pinned-rows feature, CSS @container-driven responsive density) can be used to build domain UIs that aren’t a traditional row/column table.
What This Demo Showcases
Section titled “What This Demo Showcases”| Feature | Details |
|---|---|
| Custom shell header | Month title + year <select> injected via registerHeaderContent; prev / today / next nav buttons via registerToolbarContent |
| Pinned-row feature | Colour-coded category legend rendered as a permanent position: 'bottom' pinned row |
| Responsive density | CSS @container queries on .calendar-demo__grid (container-type: inline-size) switch between full (≥534 px), compact (480–534 px), and minimal (under 480 px) |
| Dynamic row height | A ResizeObserver on .rows-viewport keeps the 4–6 visible week rows exactly filling the viewport |
| Custom keyboard nav | Arrow keys cross month boundaries; PageUp / PageDown jump month-by-month while preserving the focused weekday slot |
| Cell-level “double-click” | Detected via two mousedown events in capture phase (the grid rewrites cell interiors on focus, so native dblclick never fires) |
| Stretch fit-mode | fitMode: 'stretch' distributes weekday columns evenly; only the week-# column has a fixed width |
Try These Interactions
Section titled “Try These Interactions”- Navigate — Click the
‹/›buttons in the header, or pick a year from the dropdown. - Keyboard — Click any day, then use arrow keys. From the first / last day of the month, arrow keys cross into the previous / next month. PageUp / PageDown jump by month.
- Add an event — Double-click any day cell, or press Enter while a cell is focused. Fill in the dialog and submit.
- Resize — Drag the docs side-panel narrower to watch the cells collapse from full event chips → dots → date-only.
Demo Implementations
Section titled “Demo Implementations”The grid demos are implemented in four frameworks to showcase cross-framework compatibility:
| Framework | Adapter Package | Employee Management | Calendar |
|---|---|---|---|
| Vanilla | (none — native web component) | source | source |
| Angular | @toolbox-web/grid-angular | source | source |
| React | @toolbox-web/grid-react | source | source |
| Vue | @toolbox-web/grid-vue | source | source |
Both demos are reimplemented from scratch in each framework. The Employee Management demo shows framework-idiomatic renderers and editors via each adapter’s renderer prop. The Calendar demo goes further — it also rebuilds the shell header, toolbar, pinned legend and dialog in each framework, bridged into the grid’s shell extension points via createComponent (Angular) / createRoot (React) / createApp (Vue). Only the row types and seed data are shared (demos/shared/calendar/).
Related
Section titled “Related”- Getting Started — Installation and basic setup
- Core Features — Column configuration, renderers, formatters
- API Reference — Properties, methods, events, and CSS variables
- Plugins — Individual plugin documentation