shadcn.io is not affiliated with official shadcn/ui
Report Builder CRUD Block for Svelte
An ops team's report builder in a window: saved reports at the start, then columns, period and schedule for the open one over a sample table that gains and loses columns, with a template picker for new reports.
Installation
Overview
Design a recurring report and see its shape before it runs with this report builder for Svelte with Ark UI. The window lists the saved reports at the start (a Native Select on a phone) and the open one at the end: a name, its columns as a group of Toggle Group buttons (Orders, Revenue, Refunds, New customers, at least one always on), a period and a schedule. The schedule shows its next run, worked out for a fixed day: "Next: Mon 19 Oct, 08:00". Below, a five-row sample table gains and loses columns as you press them and scales its numbers with the period. New report opens a Dialog to pick a template first (Weekly sales, Churn watch or Blank). Save report is the one Shine Button and waits for a change; Delete report leaves a line in the foot with Undo. For ops reports, digests and any saved query with a schedule.
FAQ
How do I use my own columns and rows?
Edit COLUMNS, the ROWS of the sample table (one value per column) and TEMPLATES. The table is generated from the columns pressed, so a new column is one entry in COLUMNS, one field in ROWS and one branch in cellOf.
Why do the numbers change with the period?
The sample rows are for seven days; factorOf multiplies them by 1, 4 or 12 for last 7 days, last 30 days and this quarter. It is only there to show that the table follows the report. In your app the same controls would query your data.
How is the next run worked out?
For a schedule such as Mondays at 08:00 the next run is written for the fixed day Sunday 18 October 2026, so the page reads the same on every load. In your app derive it from the real clock and the schedule rule, on the server, in the viewer's time zone.
What does Save report do?
Each report keeps what was last saved and what you are working on. Edits change the working copy and the report is marked "Unsaved changes" until Save report copies it across. Save leaves a line with Undo, and it stays aria-disabled while nothing differs.