shadcn.io is not affiliated with official shadcn/ui
Department Setup Onboarding Block for Solid
A directory step where departments are added by name or in one press, renamed in place and removed with undo, with a total that counts the people in them.
Installation
Overview
Let a new user set up the departments their people will be filed under, with this departments step for Solid with Ark UI. It is a step of Rosterhurst, an HR directory, as a whole screen: the page's rails and one band across it, the step header (“Step 4 of 6” and a hairline), the heading and one framed card in three bands. The first band adds a department by name, with Enter or the Add button, and has typical ones (Sales, Support, Finance) one press away. The second is the list: each row has a name you can edit in place with an Editable, how many people are in it, and Remove. Remove turns the row into a quiet “Design removed” line with Undo, of the same height. The third band counts the total: “21 people in 3 departments”. Continue is the one Shine Button, with a ghost Skip for now.
FAQ
Why does a removed row stay?
So nothing moves. Remove turns the row into “Design removed.” with an Undo button inside the same 56-pixel row, and focus goes to that button. Undo brings the department back and focus returns to its pencil. A removed row does not count: the total drops at once. Adding a department when the list is full lets the oldest removed row go.
What does it refuse?
An empty name, a name that is already there (capitals aside), and more than eight rows. Typing the name of a removed department brings it back instead of adding a copy. Each refusal is said under the field, in a slot that is always reserved, and in the status. Names stop at 28 characters.
Where do the people counts come from?
They are typed: the three starting departments carry 12, 5 and 4 people, and the typical ones carry example counts. A department you type yourself starts with “No people yet”. The total is worked out from the rows that are kept, so it is never typed twice.
How does it work with the keyboard?
Enter in the name field adds the department without sending the step. Each row's pencil opens its name: Enter keeps it and Escape puts the old one back. Remove and Undo are named for the department (“Remove Design”). The list is a region of fixed height that scrolls when it is full.