Skip to main content

PanelProps

type PanelProps = {
label?: string;
children: React.ReactNode;
isCustom?: boolean;
style?: React.CSSProperties;
wrapperClassname?: string;
headerClassname?: string;
headerVariant?: Variant;
headerSemanticColor?: SemanticColor;
headerLink?: string;
headerActions?: React.ReactNode;
headerOnClose?: () => void;
headerPreventDefaultClose?: boolean;
headerOnBack?: (event: React.MouseEvent<HTMLButtonElement>) => void;
};
PropertyTypeDescription
labelstring | undefinedLabel of the Panel.
childrenReact.ReactNodeChildren to render inside the Panel.
Must be a React Component.
isCustomboolean | undefinedDetermine if the children passed is a custom Panel.
If true, the children will be rendered as is.
Note: All passed props except children will be ignored if enabled.
styleReact.CSSProperties | undefinedInline styles to apply to the Panel skeleton.
wrapperClassnamestring | undefinedAdditional class name to apply to the Panel content wrapper.
headerClassnamestring | undefinedAdditional class name to apply to the Panel header.
headerVariantVariant | undefinedFont variant for the Panel header title.
headerSemanticColorSemanticColor | undefinedSemantic color name for the Panel header title.
headerLinkstring | undefinedHref for the header link.
Can be either a URI, a path within the app, or a URL for an external link.
headerActionsReact.ReactNode | undefinedAdditional actions to render in the header.
Will be rendered next to the close button.
headerOnClose() => void | undefinedFunction to call when clicking on the header close button.
Called before the panel is closed.
headerPreventDefaultCloseboolean | undefinedPrevent the panel from closing when clicking on the header close button.
headerOnBack(event: React.MouseEvent<HTMLButtonElement>) => void | undefinedFunction to call when clicking on the header back button.
If not provided, the back button will not be rendered.