shadcn.io is not affiliated with official shadcn/ui
File Upload Onboarding Block for Svelte
A setup panel with two cells: upload your own CSV or XLSX, or download a typed three-row sample and use it, with the chosen file listed as Ready and Continue waiting for one.
Installation
Overview
Let a new user start with a file of their own or with ours, with this first-file step for Svelte with Ark UI. It is a setup panel of Cratemoor, a file-sharing tool for studios, with two cells on shared hairlines. "Upload your own" is the File Upload: a CSV or an XLSX up to 10 MB. "Start with a sample" shows a typed three-row table, a Download the sample button that really saves a CSV, and Use the sample, which lists it as if it had been uploaded. Under them a band called "Your source" lists the chosen file with its name, size, Ready and a Remove, and counts it ("Ready: 1 file"). Continue is the one Shine Button and waits quietly until there is a file.
FAQ
Is my file uploaded?
No. The block reads the file's name and size in the tab and nothing else, shows it in "Your source", and the text under the drop zone says it stays on your device. A file that is not a CSV or XLSX, or is over 10 MB, is refused in words under the drop zone, and the line is always reserved so nothing moves.
Is the sample download real?
Yes. Download the sample builds the CSV from the three typed jobs, saves it through a temporary link and releases it straight away, so you get a real cratemoor-sample-jobs.csv. Use the sample does not read that file; it lists the typed one as the source, at its true size.
Can I have both a file and the sample?
No: there is one source. Choosing a file replaces the sample and the other way round, and Remove empties the list. The count is derived from the source, so it can only read "Ready: no files" or "Ready: 1 file".
What does Continue do?
With no source it stays quiet, and pressing it says to choose a file or use the sample first. With one it says "Continued in this demo. Nothing was uploaded." and stays where it is.