shadcn.io is not affiliated with official shadcn/ui
Settings Panel Work Style Block for React
A working-agreements section drawn as a settings panel: six agreements as rows with a drawn switch, the state in words and a line on why, in a tinted frame beside the title.
Installation
Overview
A working-agreements section for React with Base UI. The title and a sentence sit at the start of a split divider that runs from the page's top rule to the foot of the block. At the end, a tinted frame holds a raised panel drawn like a preferences screen: six agreements as rows, each with its name, a switch drawn as a picture with its state written beside it ("On" or "Off"), and a muted line saying why the team keeps it that way. The header counts the agreements that are on from the same list. On a phone the panel stacks under the title. It's built from Guides, Frame and Badge, with CSS transitions for the entrance and your theme's tokens for every colour. For an about page, a handbook or a careers page that shows how a team works, including what it decided not to do. The company and its agreements are invented for the example.
FAQ
Can a visitor flip the switches?
No, and they aren't switches to a screen reader either. Each one is a drawing, hidden from assistive technology, and the row says the same thing in words: the name, then "On" or "Off", then why. The panel only looks like settings; it's a list of facts about how the team works. If you want a visitor to compare their own habits, that's a different block.
How do I change the agreements?
Edit AGREEMENTS at the top of the file: each has a name, an on flag and a why. The count in the header is computed from the list, so it follows when you add a row or turn one off. A short list reads as a set, so keep it to six to eight.
What is the list's structure?
A definition list: each agreement's name is a term, and its state and its reason are its two descriptions, so a screen reader announces "Async by default, On, Updates are written down…". Rows are separated by hairlines drawn by the list itself.
What is the frame around the panel?
It's the catalog's Frame: a tinted shell with a small header row (the panel's name and a badge) around a raised panel. The raised panel is lighter than the page in a light theme and darker in a dark one, because it follows your tokens, with no dark scope.
Related
- Pro
Situation Tabs Operating Principles
Principles and processAn operating-principles section for an accounting-automation company: line tabs by situation, and under them the open situation's three rules as hairline rows, each with the question we ask.
- Pro
Principles Rail About
Principles and processA split about section for a release-management tool: a sticky title at the start, and six principles as stations on a hairline rail, each opening to what it means and how it shows up.
- Pro
Overlap Hours About
Team and officesAn about section for a time-zone scheduler: three offices on a 24-hour axis, with the hours they all share labelled and counted.
- Pro
Culture Behaviors About
Culture and valuesTwo equal halves split by a hairline, what a feedback-tool company celebrates and what it discourages, each as rows with the behaviour and what it sounds like in quotes, marked with a plus and a minus, never a colour.
- Pro
Before After Toggle Feedback Culture
Culture and valuesA feedback culture section for a peer review tool: five habits of a good review comment, each with the vague sentence most people write and the useful rewrite, flipped by a Before / After toggle.
- Pro
Commitments Ledger About
Principles and processA ledger of a nonprofit CRM's public promises: an ordered list of rows with the promise, how far along it is as a word and a progress bar, who owns it and when it was last checked, and a tally counted from the rows.