Contextual help shows a user extra information about the state of an adjacent component, or a total view.
API
<ContextualHelp>
<Heading />
<Content />
<Footer />
</ContextualHelp>
ContextualHelp
| Name | Type | Default |
|---|---|---|
placement | Placement | Default: 'bottom start'
|
The placement of the popover with respect to the action button. | ||
children | ReactNode | Default: — |
Contents of the Contextual Help popover. | ||
size | 'XS' | 'S' | Default: 'XS'
|
The size of the ActionButton. | ||
variant | 'info' | 'help' | Default: 'help'
|
Indicates whether contents are informative or provides helpful guidance. | ||
styles | StylesProp | Default: — |
Spectrum-defined styles, returned by the | ||
isOpen | boolean | Default: — |
Whether the overlay is open by default (controlled). | ||
defaultOpen | boolean | Default: — |
Whether the overlay is open by default (uncontrolled). | ||
onOpenChange | | Default: — |
Handler that is called when the overlay's open state changes. | ||
shouldFlip | boolean | Default: true
|
Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely. | ||
offset | number | Default: 8
|
The additional offset applied along the main axis between the element and its anchor element. | ||
crossOffset | number | Default: 0
|
The additional offset applied along the cross axis between the element and its anchor element. | ||
containerPadding | number | Default: 12
|
The placement padding that should be applied between the element and its surrounding container. | ||
id | string | Default: — |
The element's unique identifier. See MDN. | ||
aria-label | string | Default: — |
Defines a string value that labels the current element. | ||
aria-labelledby | string | Default: — |
Identifies the element (or elements) that labels the current element. | ||
aria-describedby | string | Default: — |
Identifies the element (or elements) that describes the object. | ||
aria-details | string | Default: — |
Identifies the element (or elements) that provide a detailed, extended description for the object. | ||
UNSAFE_className | UnsafeClassName | Default: — |
Sets the CSS className
for the element. Only use as a last resort. Use the | ||
UNSAFE_style | CSSProperties | Default: — |
Sets inline style for the
element. Only use as a last resort. Use the | ||