shadcn.io is not affiliated with official shadcn/ui
No Reports Empty State Block for React
A reporting tool's first screen: a segmented choice of Weekly summary, Revenue or Usage swaps a drawn clipboard sheet of typed rows, and Generate sample fills it and unlocks a Download CSV that saves a real file.
Installation
Overview
Let someone preview a report before it exists and keep the sample, with this no reports empty state for React with Base UI. The page is Folioleaf, a reporting tool: the page's rails and one band across the screen split in two. At the start, a heading, one sentence, a segmented control to choose Weekly summary, Revenue or Usage, and the Shine Button, the only colored control, Generate sample. At the end, a drawn clipboard holds a sheet that names the chosen report, its period and four typed rows, with dashes where the figures go and a dashed edge because nothing has been generated. Generate sample fills in the figures, works out each row's change from its two weeks, turns the edge solid and brings in Download CSV, a download trigger that saves a real file of exactly those rows. The three sheets share one cell, so the page keeps its height whichever is chosen, and the corners come from Guides.
FAQ
What stays in the page, and how do I make it real?
The sheets are typed data: each report has four rows with this week's and last week's figures for the seven days to Friday 9 October 2026, and every sheet says Sample. Generating one only changes the page's state, a reload or Start over puts the clipboard back, and nothing is sent. To make it real, build the report from your own data where the code says so and give the download trigger that report's rows.
What is in the downloaded file?
It is the only real file the block makes. Download CSV saves folioleaf-weekly-summary.csv, folioleaf-revenue.csv or folioleaf-usage.csv, with a header row and one row per row on the sheet: the metric, this week, last week and the change in words ("Up 20%"). Any cell with a comma or a quotation mark is quoted, and a cell that starts with an equals sign, a plus, a minus or an at sign would be saved as text so a spreadsheet cannot read it as a formula. Revenue's total, net revenue, is added up from its lines, counting refunds against it.
Why can I generate each report separately?
Each report keeps its own state: generating Revenue leaves Weekly summary dashed. The button reads Sample generated, quietly, for a report that is done, and pressing it says so; Download CSV stays unavailable, and says why when pressed, until the chosen report has been generated, after which focus moves to it.
Is it usable with a keyboard and a screen reader?
The choice is a real group of three options with arrow-key movement, and each sheet is a real table with a caption, column headers and row headers; the dashes read as Not generated. The three sheets are unseen copies, so only the chosen one is reachable. A polite status line says what each press did, and the clipboard drawing's frame is hidden from assistive technology.
Related
- Pro
No Analytics Empty State
Data and analyticsA web analytics page with no visits counted yet: an empty chart with a dashed baseline that a Preview with sample data switch fills with 14 typed days, a 7 or 14 day range and a legend worked out from the data.
- Pro
No Metrics Empty State
Data and analyticsA KPI dashboard with nothing tracked yet: four tick cards over four dial tiles on shared hairlines, where each pick turns a dashed needle solid and rolls a typed sample figure into its tile before Track marks them.
- Pro
An accounts app's empty ledger as a running balance: a real table whose first dashed place says which sample comes next, a balance worked out in whole cents, and a drawing of two accounts joined by an in arrow and an out arrow that turn solid as money moves.
- Pro
Export Table
Select and actA sales table with a search and row checkboxes and an Export dialog that asks which rows (visible, selected or all, with counts), whether to include hidden columns and a file name, then downloads a real CSV, shown open in place.
- Pro
Import and Export Settings
Backups and exportsAn import rules panel with a dry run: three rules decide how rows match items on file, and a sample file of eight rows shows each row's verdict and four totals that change as the rules do, plus a real header-row CSV template to download.
- Pro
Export Failed Error
Files and dataA full-screen page for an export that hit its file-size limit: the share written worked out from typed numbers, a real partial CSV with quoting and a formula guard, and a plan that splits the rest by year, quarter or month into files under the limit.