Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Appearance Settings Block for React

An appearance settings panel that previews instead of applying: a drawn app window that wears the choices, theme and contrast cards with a drawn thumbnail each, a text-size slider with a sample sentence and a reduce motion switch with a replay.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Let people try how an app will look before they commit, with this appearance panel for React with Base UI. A hairline frame with a plus mark on each corner opens with a drawn window of a note-taking app that wears every choice below it, with one sentence under it that says which ("Dark theme, more contrast, 16 px text, motion on."). The Theme choices (Light, Dark, System) and the Contrast choices (Standard, More) are cards, each a native radio with a drawn thumbnail; System is the light and dark windows split along a diagonal. A Slider sets the text size from 12 to 20 pixels with a sample sentence under it, and a Switch turns on Reduce motion, with a replay of a small sample that slides in or simply appears. Every change applies on the spot, to the preview only: this page keeps its own theme. The one action is a Shine Button that resets every choice, and it stays in place but quiet while everything is already at its default. It's built from Slider, Switch, Button, Shine Button and Guides, with a CSS entrance only. For an account or workspace page, a note-taking or writing app, or any product with a theme.

FAQ

Does it change the theme of my page?

No. Only the drawn window and the thumbnails change, and nothing writes a dark class anywhere. The dark look is drawn with the page's own colours traded: the background and foreground swap places for the Dark window, and a dark page swaps them back, so the Light and Dark cards read as light and dark in either theme. To make it real, apply the choice with your theme provider (the class on the root element), save it per person, and read it again before the first paint.

What do Standard and More contrast change?

Only how the drawing is mixed from the two page colours: Standard draws lines and quiet fills lightly and text at about four fifths of full strength, More draws lines at about three fifths, fills heavier and text at full strength. Both thumbnails show it on the theme you have chosen. In your product, More would map to a stronger set of tokens, or to the prefers-contrast media query.

How do the text size and the sample work?

The slider moves one pixel at a time between 12 and 20, the readout beside it says the size (and "(default)" at 14), and both the sample sentence under the slider and the paragraph in the preview are set at that size through a CSS custom property. Its value is read out as "16 pixels". In your product, apply it as the root font size, or scale only your reading text.

What does Reduce motion do?

It switches off the transition on the small sample in the preview: with it off, the sample slides in from the end when you press Replay the sample, and with it on it appears at once. The sentence beside the switch says which. In your product, start from the system's reduced-motion preference and let this switch override it, and keep every animation behind it.

What does Reset to defaults do, and what stays local?

It puts the theme back to System, the contrast to Standard, the text size to 14 pixels and motion on, and says so in the status line. While everything is already at its default the button is marked aria-disabled rather than disabled, so it keeps its place and focus, and pressing it says "Already at the defaults." Nothing is stored: a reload starts from the defaults again.

Is it accessible, and how does it look on a phone?

The cards are native radios in two named radio groups, so the arrow keys move between them and the focused card gets a ring. The slider has a label and a value in words, the switch is named, and the status line is a polite live region that is present from the start. The drawn window is decorative; its caption carries the same information as text. On a phone the cards keep their row, a little smaller, and the reset button stays pinned to the bottom of the screen.

  • Pro

    How a member's name shows to other people: a display name choice, a switch each for the avatar and the handle, and three drawn cells that re-render live as a comment, a mention and a team-list row.

  • Pro

    A theme pill for a writing app: a three-way toggle group (Light, System, Dark) seeded from the page's theme, with a label that says which one is on.

  • Pro

    Theme Editor Settings

    Appearance and locale

    A theme editor window: five colour tokens each with a picker, a hex field and a contrast ratio worked out from the hex values, a radius slider and a font select, a Light or Dark set with Dark derived until edited, a drawn sign-up page that wears the tokens and a Copy CSS button.

  • Pro

    Sidebar Layout Settings

    Appearance and locale

    A navigation editor in a window beside the app it edits: a layout chosen from three cards with drawn thumbnails, a collapse mode, five items with visibility toggles and Move up and down, Settings that cannot be hidden, and a drawn app that redraws on every change.

  • Pro

    Language and Region Settings

    Appearance and locale

    A language and region settings panel: two selects over three cells that show what they do, a sort order made by the language's collation, a month marked with the region's first weekday, and units with a worked example.

  • Pro

    Brand Asset Settings

    Appearance and locale

    A logo check panel: Paper and Ink tiles showing a drawn lettermark at true size with its clear space in hairlines and its contrast worked out from the hex values, a Full, Mark or Mono toggle, a size slider that warns below 24 px, and a four-colour palette with Copy.