Skip to content

ContextualHelp

A contextual help component that displays helpful information in a popover when a user interacts with an icon button.

Import

import { ContextualHelp } from "@cfa/react-core";

Live Editor

Examples

Variant

The ContextualHelp component supports two icon variants: info (default) and help.

Size

Control the size of the icon button using the size prop.

Placement

Control where the popover appears relative to the trigger button using the placement prop. The default placement is "bottom left".

Props

Visit the Documentation Site for the full list of props.

NameTypeDefaultDescription
classNamestring--
placementPlacementsbottom leftThe placement of the element with respect to its anchor element.
size"xs" | "sm" | "md" | "lg" | "xl"md-
variant"help" | "info"info-
aria-labelstring-Defines a string value that labels the current element.
defaultOpenboolean-Whether the overlay is open by default (uncontrolled).
isOpenboolean-Whether the overlay is open by default (controlled).
onOpenChange(isOpen: boolean) => void-Handler that is called when the overlay's open state changes.