Skip to content

Settings Page for React

A complete React settings page with a scroll-spy side nav, profile upload, notification switches and a glass save bar. Use SettingsPage as an account settings UI with Profile, Notifications, Appearance and Danger sections, where a sticky side nav jumps to each card and focuses its heading.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/settings-page.json

Settings

Manage your profile, notifications and how SheenUI looks for you.

Profile

This is how others see you across the workspace.

Profile photo

PNG, JPG or WebP, square works best. Or drop an image on the circle.

example.com/

Your profile link. Lowercase letters, numbers and dashes.

Used for sign-in and notifications. Never shown publicly.

52 of 160 characters used

Shown on your public profile.

Notifications

Choose what reaches you, and where.

Push

Email

Appearance

Saved on this device and applied right away.

Applies instantly

Theme

System follows your device's light or dark setting.

Danger zone

Irreversible actions. Take a breath first.

Delete account

Permanently remove your account, workspaces and files. This can't be undone.

  • SettingsPage
  • defaultSettingsLabels
  • defaultSettingsPageLabels
  • defaultSettingsNotificationOptions
  • +2 more

Account settings

Edit anything: the save bar rises and counts your changes, and the nav shows where they are. Save (or press ⌘S / Ctrl+S), or Discard. The Appearance switches are the real SheenUI preferences and apply at once. Delete account asks you to type the username.

Settings

Manage your profile, notifications and how SheenUI looks for you.

Profile

This is how others see you across the workspace.

Profile photo

PNG, JPG or WebP, square works best. Or drop an image on the circle.

example.com/

Your profile link. Lowercase letters, numbers and dashes.

Used for sign-in and notifications. Never shown publicly.

52 of 160 characters used

Shown on your public profile.

Notifications

Choose what reaches you, and where.

Push

Email

Appearance

Saved on this device and applied right away.

Applies instantly

Theme

System follows your device's light or dark setting.

Danger zone

Irreversible actions. Take a breath first.

Export your data

Download everything you've created as a ZIP of JSON and CSV files.

Delete account

Permanently remove your account, workspaces and files. This can't be undone.

Files to copy

19 folders · 21 files · 4 packages
From theme/src/
  • blocks/settings-page.tsx
  • components/alert-dialog/
  • components/badge/
  • components/button/
  • components/drawer/parts/sheet.tsx
  • components/input/
  • components/kbd/
  • components/navbar/
  • components/popover/
  • components/segmented/
  • components/spinner/
  • components/switch/
  • components/textarea/
  • components/vertical-nav/
  • blocks/settings-page/
  • hooks/{use-controllable.ts, use-direction.ts, use-latest.ts, use-magnetic.ts, use-media-query.ts, use-preferences.ts}
  • motion/{gate.ts, tokens.ts}
  • lib/{cn.ts, field-control-shell.tsx, field-size.ts, form.ts, heading.ts, initials.ts, modal-tab-trap.ts, motion-props.ts, popup-motion.ts, state-light.tsx, warn-once.ts}
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/settings-page.jsonRegistry item: settings-page. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Your sections, your switches

Pick the sections and pass your own notification options (locked ones stay on). In a narrow column the sidebar turns into a sticky strip of pills: this one is capped at 28rem to show it on any screen.

Team alerts

Where Acme tells your team about things.

Alert channels

Choose what reaches you, and where.

Chat

Email

Alert appearance

Saved on this device and applied right away.

Applies instantly

Theme

System follows your device's light or dark setting.

Props

PropTypeDefaultDescription
defaultValuesPartial<SettingsValues>NoneSaved values to start from (and to compare against for the unsaved count).
notificationOptionsSettingsNotificationOption[]defaultSettingsNotificationOptionsRows of the notifications section (SettingsNotificationOption[], default defaultSettingsNotificationOptions).
onSave((values: SettingsValues, changed: string[]) => void | Promise<void>)NoneCalled with all values and the keys that changed. Return a promise for the saving state; throw to show an error.
onDeleteAccount(() => void | Promise<void>)NoneCalled after the type-to-confirm dialog. Return a promise for its loading state; throw to show the error in the dialog.
onExportData(() => void | Promise<void>)NoneShows the "Export data" row. Return a promise for a loading state.
onAvatarChange((file: File | null) => void)NoneCalled with the picked photo file (null when removed). Upload it and put the URL in avatar on save.
maxAvatarMbnumber5Sets the largest photo accepted, in MB (number, default 5).
sectionsSettingsSection[]["profile", "notifications", "appearance", "danger"]Which sections to show, in order (SettingsSection[], default all four: profile, notifications, appearance, danger).
usernamePrefixstring"example.com/"Text before the username field, e.g. your domain (string, default "example.com/").
stickyTopstring"1rem"Distance from the top of the scroller for the sticky navigation (any CSS length, default "1rem"), e.g. under your app bar.
warnOnLeavebooleantrueAsk before leaving the page with unsaved changes (boolean, default true).
headingLevelHeadingLevelOption1Level of the page title; sections are one level below (1 | 2 | 3, default 1). "none" renders every heading as a paragraph with no heading role, for a page shown as an example.
titleReactNodeNonePage title. Pass null to leave it out.
descriptionReactNodeNoneShows text under the page title (ReactNode).
labelsPartial<SettingsPageLabels>defaultSettingsPageLabelsEvery other string, for translation: labels={{ title: "…" }}; omitted keys keep the English of defaultSettingsPageLabels. All 64 keys of SettingsPageLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the outer element (string).
SettingsPageLabels keys and English defaults (64)
Pass any key in labels; the rest keep the defaults of defaultSettingsPageLabels.
KeyEnglish default
titleSettings
descriptionManage your profile, notifications and how SheenUI looks for you.
navSettings sections
profileProfile
profileDescriptionThis is how others see you across the workspace.
notificationsNotifications
notificationsDescriptionChoose what reaches you, and where.
appearanceAppearance
appearanceDescriptionSaved on this device and applied right away.
dangerDanger zone
dangerDescriptionIrreversible actions. Take a breath first.
photoProfile photo
changePhotoChange profile photo
uploadPhotoUpload photo
removePhotoRemove
photoHintPNG, JPG or WebP, square works best. Or drop an image on the circle.
photoNotImageThat file isn't an image. Pick a PNG, JPG or WebP.
photoTooBig(mb) => `Images up to ${mb} MB, please.`
nameDisplay name
namePlaceholderAda Lovelace
nameRequiredEnter the name people should see.
usernameUsername
usernameHintYour profile link. Lowercase letters, numbers and dashes.
usernameInvalidUse 3–30 lowercase letters, numbers or dashes.
emailEmail
emailHintUsed for sign-in and notifications. Never shown publicly.
emailInvalidEnter a valid email address.
bioBio
bioPlaceholderA sentence or two about you
bioHintShown on your public profile.
alwaysOnAlways on
themeTheme
themeHintSystem follows your device's light or dark setting.
lightLight
darkDark
systemSystem
reduceMotionReduce motion
reduceMotionHintSwap slides, springs and parallax for simple fades.
reduceTransparencyReduce transparency
reduceTransparencyHintSolid surfaces instead of frosted glass.
appliesInstantlyApplies instantly
exportTitleExport your data
exportDescriptionDownload everything you've created as a ZIP of JSON and CSV files.
exportActionExport data
exportErrorCouldn't export your data. Try again.
deleteTitleDelete account
deleteDescriptionPermanently remove your account, workspaces and files. This can't be undone.
deleteActionDelete account
deleteConfirmTitleDelete your account?
deleteConfirmDescriptionYour profile, workspaces and every file in them will be erased for good. Members of shared workspaces lose access too.
deleteConfirmDelete forever
deleteDialognested object: takes the keys of ConfirmDialogLabels; empty here, so its own English defaults apply
unsaved(n) => (n === 1 ? "1 unsaved change" : `${n} unsaved changes`)
unsavedShort(n) => `${n} unsaved`
discardDiscard
saveSave changes
saveShortSave
savingSaving…
savedChanges saved
saveErrorCouldn't save. Check your connection and try again.
fixErrors(n) => (n === 1 ? "Fix 1 field to save" : `Fix ${n} fields to save`)
announceDirtyYou have unsaved changes
announceSavedChanges saved
announceDiscardedChanges discarded

Keyboard

KeysAction
TabThe sticky section links, then the fields.
Enteron a section linkGlide to the section and focus its heading.
Ctrl/Cmd + SSave, once something has changed (a bar with Save and Discard appears).
EscapeCancel the delete-account dialog (it traps focus while open).

Accessibility

  • The current section link has aria-current.
  • Saving, errors and “unsaved changes” are announced in a polite status region.
  • The browser asks before leaving with unsaved changes.

All exports on this page

  • SettingsPage — Props (see SettingsPageProps): defaultValues, notificationOptions, onSave(values, changed), onDeleteAccount, onExportData.
  • defaultSettingsLabels — The former name of defaultSettingsPageLabels, kept as an alias for one release.
  • defaultSettingsNotificationOptions — The sample Push and Email notification switches shown when notificationOptions is omitted; replace them with your own.
  • defaultSettingsPageLabels — The English SettingsPageLabels used when labels is omitted; a partial labels prop is merged over them.

When to use the settings page

  • Use SettingsPage for the account area of a SaaS app, where someone updates a profile photo, flips notification switches, picks a theme and finds the risky actions in a Danger card at the bottom. The side nav follows the scroll and moves focus to the card you jump to, so keyboard users land in the right place. Use it as a settings layout template with grouped preference rows.
  • Use it when edits should be explicit, since a save bar with Save and Discard appears only after something changes and Ctrl or Cmd plus S saves from the keyboard.
  • Use it for apps that let people export data, upload an avatar up to maxAvatarMb (default 5), or delete their account behind a confirmation dialog.
  • Skip it when a single setting should apply the moment it is toggled, such as a theme switch in a header; a lone Switch or SegmentedControl is enough without a save flow.
  • Pair it with VerticalNav and ConfirmDialog, which it builds on, and with useTheme and useMotionPreference if your own app needs to read the preferences it exposes.

Frequently asked questions

20 blocks pages in all: browse them on All blocks.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .