Disclosure
The props declared for Disclosure, generated from the types @proyecto-viviana/ui ships.
Import
import { Disclosure } from "@proyecto-viviana/ui";Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The contents of the disclosure, consisting of a DisclosureTitle and DisclosurePanel. |
size | 'S' | 'M' | 'L' | 'XL' | 'sm' | 'md' | 'lg' | "M" | The size of the disclosure. |
density | 'compact' | 'regular' | 'spacious' | "regular" | The amount of space between the disclosure title and panel. |
isQuiet | false | true | — | Whether the disclosure should be displayed with a quiet style. |
variant | 'default' | 'bordered' | 'filled' | 'ghost' | — | Legacy visual variant. Prefer isQuiet for S2 parity. |
id | Key | — | An id for the disclosure item, matching the id used in expandedKeys. |
ref | HTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; } | — | A ref for the disclosure root element. |
isDisabled | false | true | — | Whether the disclosure is disabled. solidaria-components |
isExpanded | false | true | — | Whether the disclosure is expanded (controlled). solid-stately |
defaultExpanded | false | true | — | Whether the disclosure is expanded by default (uncontrolled). solid-stately |
onExpandedChange | (isExpanded: boolean) => void | — | Handler that is called when the disclosure expanded state changes. solid-stately |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
class | string | — | Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. |
style | JSX.CSSProperties | — | Backward-compatible style alias. Prefer UNSAFE_style for S2 parity. |
slot | string | — | Slot name for contextual props. |
Declared in packages/viviana-ui/src/disclosure/index.tsx.
DisclosureGroup props
| Prop | Type | Default | Description |
|---|---|---|---|
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The disclosure item elements in the group. |
size | 'S' | 'M' | 'L' | 'XL' | 'sm' | 'md' | 'lg' | "M" | The size of all disclosures in the group. |
density | 'compact' | 'regular' | 'spacious' | "regular" | The amount of space between disclosure items. |
isQuiet | false | true | — | Whether disclosures should be displayed with a quiet style. |
variant | 'default' | 'bordered' | 'filled' | 'ghost' | — | Legacy visual variant. Prefer isQuiet for S2 parity. |
ref | HTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; } | — | A ref for the disclosure group root element. |
isDisabled | false | true | — | Whether all items are disabled. solid-stately |
onExpandedChange | (keys: Set<Key>) => void | — | Handler that is called when items are expanded or collapsed. solid-stately |
allowsMultipleExpanded | false | true | — | Whether multiple items can be expanded at the same time. solid-stately |
expandedKeys | Iterable<Key> | — | The currently expanded keys in the group (controlled). solid-stately |
defaultExpandedKeys | Iterable<Key> | — | The initial expanded keys in the group (uncontrolled). solid-stately |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
class | string | — | Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. |
style | JSX.CSSProperties | — | Backward-compatible style alias. Prefer UNSAFE_style for S2 parity. |
slot | string | — | Slot name for contextual props. |
Declared in packages/viviana-ui/src/disclosure/index.tsx.
DisclosureHeader props
| Prop | Type | Default | Description |
|---|---|---|---|
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The contents of the disclosure header. |
ref | HTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; } | — | Not yet documented |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
class | string | — | Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. |
style | JSX.CSSProperties | — | Backward-compatible style alias. Prefer UNSAFE_style for S2 parity. |
slot | string | — | Slot name for contextual props. |
Declared in packages/viviana-ui/src/disclosure/index.tsx.
DisclosurePanel props
| Prop | Type | Default | Description |
|---|---|---|---|
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The contents of the disclosure panel. |
ref | HTMLDivElement | ((el: HTMLDivElement) => void) | { current?: HTMLDivElement | null | undefined; } | — | Not yet documented |
role | 'group' | 'region' | — | The accessibility role for the disclosure panel. solidaria-components |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
class | string | — | Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. |
style | JSX.CSSProperties | — | Backward-compatible style alias. Prefer UNSAFE_style for S2 parity. |
slot | string | — | Slot name for contextual props. |
Declared in packages/viviana-ui/src/disclosure/index.tsx.
DisclosureTitle props
| Prop | Type | Default | Description |
|---|---|---|---|
styles | StylesPropWithFont | — | Spectrum-defined styles, returned by the `style()` macro. Only allows overriding `font`, `fontFamily`, `fontWeight`, `fontSize`, and `lineHeight`. |
level | number | 3 | The heading level of the disclosure header. |
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The contents of the disclosure header. |
hideIcon | false | true | — | Backward-compatible option for the legacy DisclosureTrigger alias. |
ref | HTMLHeadingElement | ((el: HTMLHeadingElement) => void) | { current?: HTMLHeadingElement | null | undefined; } | — | Not yet documented |
UNSAFE_className | string | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
class | string | — | Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. |
style | JSX.CSSProperties | — | Backward-compatible style alias. Prefer UNSAFE_style for S2 parity. |
slot | string | — | Slot name for contextual props. |
Declared in packages/viviana-ui/src/disclosure/index.tsx.
DisclosureTrigger props
| Prop | Type | Default | Description |
|---|---|---|---|
styles | StylesPropWithFont | — | Spectrum-defined styles, returned by the `style()` macro. Only allows overriding `font`, `fontFamily`, `fontWeight`, `fontSize`, and `lineHeight`. |
level | number | 3 | The heading level of the disclosure header. |
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The contents of the disclosure header. |
hideIcon | false | true | — | Backward-compatible option for the legacy DisclosureTrigger alias. |
ref | HTMLHeadingElement | ((el: HTMLHeadingElement) => void) | { current?: HTMLHeadingElement | null | undefined; } | — | Not yet documented |
UNSAFE_className | string | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
class | string | — | Backward-compatible class alias. Prefer UNSAFE_className for S2 parity. |
style | JSX.CSSProperties | — | Backward-compatible style alias. Prefer UNSAFE_style for S2 parity. |
slot | string | — | Slot name for contextual props. |
Declared in packages/viviana-ui/src/disclosure/index.tsx.
Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.