Ballmac UI home

Settings Panel

A sectioned settings card with label-and-control rows and a save bar that slides in when something changes, with a status announced to screen readers.

General

How your workspace appears to everyone.

Notifications

Choose what reaches your inbox.

A summary of activity every Monday.

Email me when someone mentions me.

How often to group emails.

Installation

$ pnpm dlx shadcn@latest add @ballmac/settings-panel

Usage

import { SettingsPanel, SettingsSection, SettingsRow } from "@/components/ballmac/settings-panel"

The full example is in the Code tab above.

Examples

Unsaved changes

Privacy

Control what others can see.

Let teammates see when you are online.

You have unsaved changes

API reference

<SettingsPanel>

PropTypeDefault
status

Save state. `dirty` shows the save bar; `saving` disables it and shows a spinner; `saved` confirms briefly.

SettingsStatus"idle"
onSave

Called when the form is submitted (Save button or Enter in a field).

() => void—
onDiscard

Called when Discard is pressed. Reset your own state here.

() => void—
dirtyMessage

Text next to the buttons while `dirty`.

string—
saveLabel

Label of the save button.

string—
label

Accessible name of the form.

string—

<SettingsSection>

PropTypeDefault
title*

Section heading.

string—
description

One line under the heading.

string—

<SettingsRow>

PropTypeDefault
label*

Setting name.

string—
description

Explains what the setting does.

string—
htmlFor

The id of the control, so the label is clickable.

string—
stacked

Stack the control under the label instead of beside it. Good for wide inputs.

booleanfalse

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
EnterSubmits the form from any field
TabSave bar buttons are in the tab order after the fields
Screen readersSections are labelled groups; save status is a polite live region

Use with AI

<SettingsPanel status onSave onDiscard><SettingsSection title><SettingsRow label htmlFor>{control}</SettingsRow></SettingsSection></SettingsPanel>. Drive status: idle | dirty | saving | saved. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Settings Panel (@ballmac/settings-panel) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Account, workspace and notification settings
  • Any form where people expect Save and Discard

Not for

  • Single-field inline edits
  • Wizards; use stepper-form

Registry JSON: https://ui.ballmac.com/r/settings-panel.json

Credits

Free to use in personal and commercial projects.