Appearance
NxdsAppearanceSettings is a full settings panel for theme, typography, layout feel and interaction preferences. Render it inside NxdsAppearanceProvider. For a compact popover, use NxdsThemeQuickControl.
Installation
Run npx nxds-cli@latest init first if nxds isn’t set up in your app yet. See Install.
Usage
Props
NxdsAppearanceBrandColorField
| Prop | Type | Default | Description |
|---|---|---|---|
labelRequired | string | No default documented | No description |
onChangeRequired | (hex: string) => void | No default documented | No description |
valueRequired | string | No default documented | No description |
NxdsAppearanceColorField
| Prop | Type | Default | Description |
|---|---|---|---|
labelRequired | string | No default documented | No description |
onChangeRequired | (hex: string) => void | No default documented | No description |
valueRequired | string | No default documented | No description |
NxdsAppearanceConfigPreview
| Prop | Type | Default | Description |
|---|---|---|---|
resolvedModeRequired | NxdsResolvedAppearanceMode | No default documented | No description |
stateRequired | NxdsAppearanceState | No default documented | No description |
NxdsAppearanceProvider
| Prop | Type | Default | Description |
|---|---|---|---|
cookieOptions | NxdsAppearanceCookieOptions | No default documented | No description |
cookieWriteKey | string | false | false | Cookie the provider writes so your server can render the saved appearance. The client never reads it. |
defaultState | NxdsAppearanceState | No default documented | No description |
onStateChange | ((state: NxdsAppearanceState) => void) | No default documented | No description |
state | NxdsAppearanceState | No default documented | No description |
storageKey | string | false | "nxds-appearance" | localStorage key for the saved appearance. The head script reads it before first paint and the provider after mount, overriding |
NxdsAppearanceScript
| Prop | Type | Default | Description |
|---|---|---|---|
defaultState | NxdsAppearanceState | No default documented | No description |
nonce | string | No default documented | No description |
storageKey | string | false | No default documented | No description |
NxdsAppearanceSettingRow
| Prop | Type | Default | Description |
|---|---|---|---|
description | string | No default documented | No description |
labelRequired | string | No default documented | No description |
NxdsAppearanceSettings
NxdsAppearanceSettings adds no props of its own; it accepts the props of the element or primitive it wraps.
NxdsThemeQuickControl
| Prop | Type | Default | Description |
|---|---|---|---|
onCustomize | (() => void) | No default documented | No description |
Vue Appearance is coming soon
Appearance isn't in the Vue package yet. The React version is ready to use today.