shadcn.io is not affiliated with official shadcn/ui
Export Format Onboarding Block for Svelte
A setup panel that asks what exports are for, compares CSV, JSON, PDF and Excel in a table, points at the best column and lets a radio in each head override it before Set as default.
Installation
Overview
Let a new user pick the file type their reports arrive in, with this export step for Svelte with Ark UI. It is a setup panel of Pivotwick, a reporting tool. A Native Select asks "What will you use exports for?" (share with colleagues, analyse in a spreadsheet, feed another system, print) and a native table compares four formats as columns by what each opens in, whether it keeps formatting, whether a machine can read it and its typical size. The answer picks the best column and labels it "Best for this", with one sentence on why; a radio in each column head overrides it, and the chosen column is ringed. Set as default is the one Shine Button. On a phone the table becomes one card per format.
FAQ
How is the best format chosen?
From a typed map: each purpose names one format (Excel for sharing, CSV for analysing, JSON for feeding another system, PDF for printing) and a sentence on why. Changing the purpose clears your override and moves the ring to the new best column.
What does the radio in each column do?
It chooses that format whatever the purpose says. The four radios are one group: Tab reaches the chosen one, the arrow keys move between formats and pick the one they reach, and the table's ring follows. "Best for this" stays on the recommended column, so you can see when you chose something else.
How does the comparison look on a phone?
Each format is a card with its radio, the same "Best for this" line and a list of the four facts, so no column scrolls sideways. The two layouts share one choice, so changing the width keeps what you picked.
What does Set as default do?
It makes the chosen format the default and says so ("Default is now Excel."); the foot shows the current default until you do. Pressing it for the format that is already the default says that instead. The change is kept in the page only.