Skip to content

PanelProps

PanelProps were the argument of the v2 Spicetify.Panel.registerPanel.

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;
};
PropDescription
labelThe panel’s accessible label.
childrenThe panel body.
isCustomRenders children as the whole panel and ignores every other prop.
styleInline styles for the panel frame.
wrapperClassname, headerClassnameExtra class names for the body wrapper and the header.
headerVariant, headerSemanticColorThe type style and color of the header title.
headerLinkA URI, client path or URL that the header title links to.
headerActionsControls shown next to the close button.
headerOnCloseRuns before the panel closes from the header’s close button.
headerPreventDefaultCloseKeeps the panel open when the user clicks the close button.
headerOnBackRuns when the user clicks the back button. Without it, the header has no back button.