Panel API

API documentation for Panel component

PanelRoot#

Props#

Defines valid properties in Panel component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PanelRootInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PanelRootInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PanelRootPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PanelRootInstance) => ReactNode)
null
The children to render.
openboolean
false
Controls the open state of the collapsible.
defaultOpenboolean
false
Defines the initial open state of the collapsible.
onOpen(event?: SyntheticEvent) => void
null
Callback triggered when the content is opened.
onClose(event?: SyntheticEvent) => void
null
Callback triggered when the content is closed.
toggleableboolean
false
When enabled, the content of panel can be expanded and collapsed by clicking the header.
onToggle(event: PanelRootToggleEvent) => void
null
Callback fired when the panel's toggle state changes.
onOpenChange(event: usePanelOpenChangeEvent) => void
null
Callback triggered when the content's toggle state changes.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

State#

Defines valid state in Panel component.

nametypedefaultdescription
openboolean
null
Whether the collapsible content is open or not.

Exposes#

Defines the methods and properties exposed by Panel component.

nametypedefaultdescription
open(event?: SyntheticEvent) => void
null
The method to open the collapsible content.
close(event?: SyntheticEvent) => void
null
The method to close the collapsible content.
toggle(event?: SyntheticEvent) => void
null
The method to toggle the collapsible content.
stateusePanelState
null
The state of the usePanel.
onTriggerClick(event?: SyntheticEvent) => void
null
Callback to be invoked when the trigger is clicked.

Events#

Event fired when the panel's toggle state changes.

nametypedescription
originalEventSyntheticEventThe original event that triggered the change.
valuebooleanThe value of the collapsible.

Interfaces#

Defines passthrough(pt) options of Panel component.

nametypedefaultdescription
rootPanelRootPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.
headerPanelRootPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the header's DOM element.
headerActionsPanelRootPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the header actions's DOM element.
titlePanelRootPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the title's DOM element.
contentPanelRootPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the content's DOM element.
collapsePanelRootPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the collapse's DOM element.
footerPanelRootPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the footer's DOM element.

Types#

Instance of Panel component.

values
ComponentInstance<PanelRootProps, PanelRootState, PanelRootExposes>

PanelHeader#

Props#

Defines valid properties in PanelHeadercomponent.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PanelHeaderInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PanelHeaderInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PanelHeaderPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PanelHeaderInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Interfaces#

Defines passthrough(pt) options of PanelHeadercomponent.

nametypedefaultdescription
rootPanelHeaderPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PanelHeadercomponent.

values
ComponentInstance<PanelHeaderProps, PanelHeaderState, PanelHeaderExposes>

PanelHeaderActions#

Props#

Interfaces#

Types#

PanelTitle#

Props#

Defines valid properties in PanelTitlecomponent.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PanelTitleInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PanelTitleInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PanelTitlePassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PanelTitleInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Interfaces#

Defines passthrough(pt) options of PanelTitlecomponent.

nametypedefaultdescription
rootPanelTitlePassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PanelTitlecomponent.

values
ComponentInstance<PanelTitleProps, PanelTitleState, PanelTitleExposes>

PanelCollapse#

Props#

Defines valid properties in PanelCollapse component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PanelCollapseInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PanelCollapseInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PanelCollapsePassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PanelCollapseInstance) => ReactNode)
null
The children to render.
iconOnlyboolean
true
Whether to show the PanelCollapse with a borderless style.
severitystring & {} | "secondary" | "info" | "success" | "warn" | "danger" | "contrast" | "help"
'secondary'
Severity type of the PanelCollapse.
variant"link" | "text" | "outlined"
'text'
Variant of the PanelCollapse.
roundedboolean
true
Whether to show the PanelCollapse with a rounded style.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Interfaces#

Defines passthrough(pt) options of PanelCollapse component.

nametypedefaultdescription
rootPanelCollapsePassThroughType<HTMLAttributes<HTMLButtonElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PanelCollapse component.

values
ComponentInstance<PanelCollapseProps, PanelCollapseState, PanelCollapseExposes>

PanelContent#

Props#

Defines valid properties in PanelContent component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PanelContentInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PanelContentInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PanelContentPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PanelContentInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Interfaces#

Defines passthrough(pt) options of PanelContent component.

nametypedefaultdescription
rootPanelContentPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PanelContent component.

values
ComponentInstance<PanelContentProps, PanelContentState, PanelContentExposes>

PanelFooter#

Props#

Defines valid properties in PanelFooter component.

nametypedefaultdescription
refRef<unknown>
null
The reference to the component instance.
pIfboolean
true
Whether the component should be rendered.
styleCSSProperties | ((instance?: PanelFooterInstance) => CSSProperties)
null
The style to apply to the component.
classNamestring | ((instance?: PanelFooterInstance) => string)
null
The class name to apply to the component.
asstring | number | bigint | boolean | ComponentClass<any, any> | FunctionComponent<any> | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode, any, any> | ReactPortal | Promise<AwaitedReactNode>
null
The component type to render.
asChildboolean
false
Whether the component should be rendered as a child component.
ptSafeRecord<PanelFooterPassThrough>
null
The pass-through props to pass to the component
ptOptionsPassThroughOptions
null
The pass-through options to pass to the component
unstyledboolean
null
Whether the component should be rendered without classes.
dtunknown
null
The design token to use for the component.
stylesStylesOptions<ComponentInstance>
null
The styles to use for the component.
childrenReactNode | ((instance: PanelFooterInstance) => ReactNode)
null
The children to render.
[key: string]any
null
pt-{optionName}-*-
null
Pass through attributes for customizing component. For more info, see Pass Through tab.

Interfaces#

Defines passthrough(pt) options of PanelFooter component.

nametypedefaultdescription
rootPanelFooterPassThroughType<HTMLAttributes<HTMLDivElement>>
null
Used to pass attributes to the root's DOM element.

Types#

Instance of PanelFooter component.

values
ComponentInstance<PanelFooterProps, PanelFooterState, PanelFooterExposes>

usePanel#

Props#

State#

Exposes#

Events#

Types#