Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Sheet examples · Multi Section

Sheet with Action Buttons in Footer for React

A right-side task sheet with name, assignee and due date fields and Save Draft and Create Task buttons in the footer.

Framework
UI library

A new-task form whose two actions sit side by side in SheetFooter: Save Draft in the outline style and Create Task as the primary button. The footer stays at the bottom of the panel, so both actions are where people expect them.

Preview

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

Which fields does the task form have?

Task Name, Assignee and Due Date. Due Date uses type="date", so the browser shows its own date picker. Assignee is a text input here; a Combobox of team members fits better in a real app.

Do the buttons save anything?

Not in this demo: neither has a handler. Save the draft without closing, then create the task and close the sheet by controlling its open state: Pass open to Sheet; onOpenChange receives the next boolean.

How does the footer stay at the bottom?

SheetFooter takes the free space above it with mt-auto, so it sits at the bottom of the panel however short the form is.

How does Create Task open the sheet?

The button labeled Create Task is the trigger, and its text is the accessible name. The Button goes in the render prop of SheetTrigger, and the label stays its child.

What does the task sheet announce?

SheetTitle names the dialog for assistive tech, so every sheet renders one; hide it with sr-only when the design has no visible heading. It reads New Task, with Create a new task and assign it to a team member as the description.