shadcn.io is not affiliated with official shadcn/ui
Workspace Setup Onboarding Block for React
A workspace step with a name, an address worked out from it and checked in words, two radio cells for who can open it, and a sentence that says what would be made.
Installation
Overview
Name a workspace and see its address before it exists, with this setup step for React with Base UI. It is a step of Dunnockmoor, a team project hub, as a whole screen: the page's rails and one band, the step header (“Step 2 of 5” and a hairline), the heading and one framed card in four bands. The name is an Input; under it the address is worked out from the name (Larkspur Works becomes larkspur-works) and is a line you can take over with the pencil of an Editable, with “Match the name” to hand it back. It is checked against four addresses that are taken in this demo and the answer is in words: “cider-press is taken. Try cider-press-2.” with the suggestion as a button. Two radio cells say who can open the workspace, Private or Anyone with the link, and a sentence at the foot of the card says what would be made. Create workspace is the one Shine Button, with a ghost Skip for now.
FAQ
How is the address made, and what counts as taken?
slugOf folds accents, lowers the case, turns every run of other characters into one hyphen and cuts the result at 30 characters. An address needs three to 30 characters of letters, digits and single hyphens. TAKEN is the typed list of addresses that are in use (four of them); when yours is one of them the line says so and offers the next free one (cider-press-2, then -3 if that is taken too). Replace the check with your own lookup where verdictOf is used.
How does taking over the address work?
The address shows as a line with a pencil. Pressing the pencil (or the line) turns it into a field: Enter keeps it, Escape or the cross puts the old one back. What you keep is cleaned the same way as a name, so “Studio Row!” becomes studio-row. Once the address no longer follows the name, typing the name leaves it alone and “Match the name” becomes pressable; pressing it hands the address back to the name.
What if the name is empty or the address is taken?
Create workspace stays in the tab order and looks quiet until the name and address are right. Pressing it says what is wrong and puts focus there: an empty or too short name says “Use at least 2 characters.” under the field and focuses it; a taken address focuses the suggestion button (or the pencil). The lines under the fields are always reserved, so nothing moves.
What does a screen reader hear?
One polite status, present from load. Typing the name does not announce each letter: what the choices add up to (“Larkspur Works will be private to invited people.”) is spoken once the typing has rested for a moment, and results (saved, skipped, refused) are spoken at once. The same sentence is shown at the foot of the card.
What stays local in the demo, and how do I wire it?
Everything: the taken addresses are a typed list, example is the host (nothing lives there) and Create workspace only says it was saved in this demo. In your app check the address on your server as the name settles (debounce it), create the workspace where submit says so, and send the visitor to the new address. Skip for now says it was skipped and keeps what was typed.
How does it look on a phone?
The card keeps its four bands in one column, the host drops out of the address field below 368 px so the address itself has the room, and Create workspace pins to the foot of the screen with Skip for now beside it, so the primary action is in reach at every scroll position.
Related
- Pro
A project step split in two: a name with the key its tasks will carry and a three-way choice of how to start, beside a drawn board that follows the choice.
- Pro
Minimal Team Name Onboarding
One choiceA whole-screen first question for a shared notes app: the heading asks what the team is called, one large input is only a line to type on, and a drawn browser tab shows the name as you type it.
- Pro
A gallery of twelve drawn templates in three tabs, chosen as radio cards, each with a Preview that opens a dialog with a larger drawing and the pages it would make.
- Pro
Profile Setup Onboarding
Profile and accountA profile step for a creator site: name, what you do, pronouns and a bio with a count in a form, and beside it the card others will see, redrawn on every keystroke, with the profile address worked out from the name.
- Pro
Achievement Trail Onboarding
Milestones and recapsA language-learning app's first-run trail: eight milestones along a winding path drawn from hairlines, three reached, a you-are-here ring, a hover card per node, a rolling count and progress, and a button that previews the next unlock.
- Pro
AI Assistant Introduction Onboarding
Welcome and toursA research notebook's assistant introducing itself: a popover over a drawn notebook with a greeting, three capability buttons that fill the box with a sample prompt, a field with Send, and replies typed in advance.