block

Appearance

props · 38 shown · 38 total

AppearancePanel

Content

  • { primary?: boolean; surface?: boolean }

    Offer a custom color (a ColorPicker popover) and, with `surface`, a neutral/tinted surface choice for it.

  • AppearancePalette[]

    The palettes offered as color swatches, after the theme's own colors. Unset: every color family the theme ships. `[]` offers none.

  • AppearanceSection[]
    default ["mode", "palette", "surface", "density"]

    The sections shown, in order. A locked field's section is never shown. `radius` is opt-in.

State

  • Partial<AppearanceValue>

    The selection before anything is stored, and what Reset returns to.

  • Partial<AppearanceValue>

    Fields forced on every value; their sections are hidden.

  • (value: AppearanceValue) => void

    Called after every change, including ones from another instance or tab.

  • value svelte
    AppearanceValue

    Controlled selection. Pair with `onValueChange`.

Appearance

  • "sm" "md"
    default "md"

    Control size of every Choice and Button in the panel.

Behavior

  • number
    default 220

    Milliseconds a pick waits before it reaches the page, so the selection thumb slides before the page re-colors. `0` under `prefers-reduced-motion`.

  • false "local" AppearancePersistAdapter
    default "local"

    Where the selection is kept between visits. Astro: a `{ load, save }` adapter can't be serialized, so it falls back to `"local"`.

  • string
    default "appearance"

    localStorage key for the palette and density.

  • target svelte
    HTMLElement
    default document.documentElement

    The element the palette and density apply to.

  • string
    default "theme-mode"

    localStorage key for the mode, shared with ThemeModeSelect.

Accessibility

  • Partial<AppearanceLabels>

    Localized strings. Unset keys keep their English defaults.

Advanced

  • ToneBasis

    The theme the swatches are generated against.

  • controller svelte
    AppearanceController

    An already-running controller (AppearancePicker passes its own). When set, the panel neither creates nor starts one, and the controller options above are ignored.

  • string
    default "appearance"

    Seeds the ids of every control in the panel.

  • AppearancePanelPassThrough

    Per-slot escape hatch. DOM slots take `style` and `props`; child components (`*Choice`, `*Button`, `customPopover`, `colorPicker`) take `props`.

  • boolean
    default false

    Astro / vanilla: serialize the props into `data-appearance-panel-config` so the client runtime hydrates this instance and `getPindoba(el, "appearance-panel")` can `update()` it. Frameworks with their own reactivity don't need it.

Plus all standard <div> HTML attributes.

AppearancePicker

Content

  • { primary?: boolean; surface?: boolean }

    Offer a custom color (a ColorPicker popover) and, with `surface`, a neutral/tinted surface choice for it.

  • AppearancePalette[]

    The palettes offered as color swatches, after the theme's own colors. Unset: every color family the theme ships. `[]` offers none.

  • AppearanceSection[]
    default ["mode", "palette", "surface", "density"]

    The sections shown, in order. A locked field's section is never shown. `radius` is opt-in.

State

  • Partial<AppearanceValue>

    The selection before anything is stored, and what Reset returns to.

  • Partial<AppearanceValue>

    Fields forced on every value; their sections are hidden.

  • open svelte
    boolean

    Bindable open state of the popover.

Appearance

  • "sm" "md"
    default "md"

    Control size of every Choice and Button in the panel.

Behavior

  • number
    default 220

    Milliseconds a pick waits before it reaches the page, so the selection thumb slides before the page re-colors. `0` under `prefers-reduced-motion`.

  • false "local" AppearancePersistAdapter
    default "local"

    Where the selection is kept between visits. Astro: a `{ load, save }` adapter can't be serialized, so it falls back to `"local"`.

  • "top" "right" "bottom" "left" "top-start" "top-end" "right-start" "right-end" "bottom-start" "bottom-end" "left-start" "left-end"
    default "bottom-end"

    Placement of the popover relative to the trigger.

  • string
    default "appearance"

    localStorage key for the palette and density.

  • string
    default "theme-mode"

    localStorage key for the mode, shared with ThemeModeSelect.

Accessibility

  • Partial<AppearanceLabels>

    Localized strings. Unset keys keep their English defaults.

  • Partial<AppearancePickerLabels>

    Localized trigger and popover names. Unset keys keep their English defaults.

Advanced

  • ToneBasis

    The theme the swatches are generated against.

  • string
    default "appearance"

    Seeds the ids of every control in the panel.

  • AppearancePanelPassThrough

    Per-slot escape hatch. DOM slots take `style` and `props`; child components (`*Choice`, `*Button`, `customPopover`, `colorPicker`) take `props`.

  • AppearancePickerPassThrough

    Per-slot escape hatch for the picker's own parts; the panel inside takes `passThrough`.

  • boolean
    default false

    Astro / vanilla: serialize the props into `data-appearance-picker-config` so the client runtime hydrates this instance and `getPindoba(el, "appearance-picker")` can `update()` it. Frameworks with their own reactivity don't need it.

Plus all standard <div> HTML attributes.

Type

  • Components
  • Blocks