Contextual Help

Contextual help can be used to show extra information about the state of a component.

Example

For the contextual help component, both the heading and content props are required, while the footer prop is optional.

Contextual Help Basic Example

Placement

The contextual help component supports different placement options for when the popover’s positioning needs to be customized.

Events

The on_open_change prop is triggered when the popover opens or closes.

Visual Options

The variant prop can be set to either “info” or “help”, depending on how the contextual help component is meant to help the user.

API reference

A contextual help is a quiet action button that triggers an informational popover.

Returns: Element The rendered contextual help component.

ParametersTypeDefaultDescription
headingAnyThe heading of the popover.
contentAnyThe content of the popover.
footerAnyNoneThe footer of the popover.
variantLiteral['help', 'info'] |
None
'help'Indicates whether contents are informative or provides helpful guidance.
placementLiteral['bottom', 'bottom left', 'bottom right', 'bottom start', 'bottom end', 'top', 'top left', 'top right', 'top start', 'top end', 'left', 'left top', 'left bottom', 'start', 'start top', 'start bottom', 'right', 'right top', 'right bottom', 'end', 'end top'] |
None
'bottom start'The placement of the popover relative to the action button.
is_openbool |
None
NoneWhether the popover is open by default (controlled).
default_openbool |
None
NoneWhether the popover is open by default (uncontrolled).
container_paddingfloat |
None
NoneThe placement padding that should be applied between the element and its surrounding container.
offsetfloat |
None
NoneThe additional offset applied along the main axis between the element and its anchor element.
cross_offsetfloat |
None
NoneThe additional offset applied along the cross axis between the element and its anchor element.
should_flipbool |
None
NoneWhether the element should flip its orientation when there is insufficient room for it to render completely.
keystr |
None
NoneA unique identifier used by React to render elements in a list.

Content represents the primary content within a Spectrum container.

Returns: Element The rendered content element.

ParametersTypeDefaultDescription
*childrenAnyThe content to render within the container.
keystr |
None
NoneA unique identifier used by React to render elements in a list.

A footer for a document or section.

Returns: Element The rendered footer element.

ParametersTypeDefaultDescription
*childrenNone |
bool |
int |
str |
Element |
List[NodeType]
The items to render within the footer.
keystr |
None
NoneA unique identifier used by React to render elements in a list.