shadcn.io is not affiliated with official shadcn/ui
Default Values Settings Block for React
A task defaults panel: a priority, an assignee, days until due (calendar or working days), an estimate, up to four labels and who can see a task, beside a drawn new task that shows every default applied and the due date worked out from a fixed day.
Installation
Overview
Let people decide what a new record starts with, and show them the record, with this default values panel for React with Base UI. A hairline frame with a plus mark on each corner holds six ruled rows on one side and a drawn new task on the other. The rows set the priority, the assignee and the estimate with Native Selects, the days until due in an Input with a Switch that counts working days only, up to four labels in Tags Input, and who can see a new task. The card beside them lists every default applied, and the due date is worked out from a fixed day the task is made on, so it reads "Wed, Oct 21, 2026, 5 working days after" and moves when you change the number or the switch. Reset to factory sits at the header's end; the action foot counts unsaved changes beside a Shine Button to save and an outline Button to discard. On a phone the card sits under the form and the save bar stays pinned to the bottom of the screen. It's built from Native Select, Input, Switch, Tags Input, Button, Shine Button and Guides, with a CSS entrance only. For a task manager, an issue tracker, a CRM or any app where new records begin the same way.
FAQ
How is the due date worked out?
From a typed day, never the clock: AS_OF is the day the card's task is made on. Calendar days add the number to it; working days step forward one day at a time and skip Saturdays and Sundays, so 5 working days after Wednesday is the next Wednesday and 7 calendar days is the same one. Zero means due the day it is made. The number is limited to 60: typing more says so and keeps 60. A real app would do the same sum on the server when a task is created, from its own clock and calendar.
How do the labels work?
Tags Input takes a label when you press Enter or a comma, or when you leave the field. A label is lowercase letters, digits and hyphens up to 16, once each, and four is the most; a refused label says why in the line under the field, and when four are in, the line says so. Each label has its own remove button, and Backspace in the empty field selects the last label and a second press removes it. The card shows the labels as chips in a place that keeps its height, so adding the fourth never moves the rest.
What does Reset to factory do?
It puts every default back to the product's own (normal priority, unassigned, due in 7 days, no estimate, no labels, visible to everyone on the project) in the form and the card, and counts it as unsaved changes: nothing is saved until you press Save defaults, and Discard goes back to what was last saved.
What stays local, and how do I wire it up?
Everything. Save keeps the edited defaults as the saved ones, in this page only, and says how many changes it kept; nothing is created, assigned or sent. Wire it by posting the saved object (priority, assignee, days, whether they are working days, estimate, labels and visibility) to your API in the save handler, and read the same object when a task is created. Save and Discard stay in place and focusable while nothing changed and answer "No changes to save." in words.
Is the card a real form?
No, it is a picture of the result. The title and description lines are drawn shapes; the six defaults are real text in a description list, so a screen reader reads them, and the figure's caption says nothing is created. Because it follows the draft, it changes as you type, before anything is saved.
Is it accessible, and how does it look on a phone?
Every control has a visible label, and the due field's hint and the labels' hint are tied to their fields by aria-describedby; a problem is shown in words under the field with an icon, never by colour alone. The status line is a polite live region present from the start. Below the large breakpoint the card moves under the rows, and each row stacks its name over its control.
Related
- Pro
Onboarding Flow Settings
Product controlsAn onboarding flow editor with a funnel: five steps in order with a bar of who finishes each, switches to turn steps off, a Required toggle, Move up and Move down, the biggest drop worked out again after every change, and a drawn screen of the step people see.
- Pro
Custom Fields Settings
Fields and formsAn Add field sheet open over a drawn Contacts table: a name, a type picked from six cards, the options that belong to that type, a live preview of the field, and an Add that appends a column to the table behind it.
- Pro
User Fields Settings
Fields and formsA profile fields panel: a table with a row per field showing its type, a Required switch, who can see it and its rule in words, with rules that open in place (a preset, the shortest and longest answer and a Try a value field that says Valid or why not) and the member's form drawn from the same fields.
- Pro
Notification Preferences Settings
NotificationsA notification settings panel: a channel strip with all-or-nothing checkboxes, a matrix of switches by activity and channel with a locked security email, quiet hours, and a save bar that counts unsaved changes.
- Pro
Collaboration Rules Settings
Team and rolesSix collaboration rules beside a live preview: pick Member, Editor or Guest and a drawn document with a comment thread plus five rows say what that person can view, comment on, reply to, resolve and mention, and why.
- Pro
Registration Fields Settings
Fields and formsA sign-up form editor where the form is the editor: a drawn sign-up page with six fields, each with a Required toggle, a Show switch and Move up and Move down, a locked email and password, and a Publish form button in a slim bar.