Skip to content
Dumb UI

Search Dumb UI

Jump to a page or component, or switch the style

Search Dumb UI

Jump to a page or component, or switch the style

Style Scope

Renders a subtree in a different style, including overlays opened inside it. Use it for previews, theming a section, or comparing styles.

UtilitiesDumb extras
name="raw"
name="vector"
name="volume"
$ pnpm dlx shadcn@latest add @dumb/style-scope

Needs the @dumb registry in components.json and the style tokens. See Installation.

import { StyleScope } from "@/components/ui/style-scope"
<StyleScope name="volume">
  <Button>Rendered in Volume</Button>
</StyleScope>

API reference

Props marked “extra” are Dumb UI additions. Everything else matches shadcn/ui.

StyleScope

PropTypeDefault
nameextra"raw" | "vector" | "volume"

Style for this subtree.

-
...propsComponentProps<"div">

Native div props.

-