SidePanel Component
SidePanel
Section titled “SidePanel”Right-side panel rendered with a portal into document.body.
Key behaviors
Section titled “Key behaviors”- Uses
createPortal(...)to render outside normal tree - Includes overlay that closes panel on click
- Supports
transparentmode viadata-transparent - Exported as error-boundary-wrapped
SidePanel - Includes
SidePanelButtonhelper for trigger + panel state
Main Props
Section titled “Main Props”interface SidePanelProps { title: string; isOpen: boolean; onClose: () => void; transparent?: boolean; children?: React.ReactNode;}import SidePanel, { SidePanelButton } from "@/components/SidePanel";
<SidePanel title="Details" isOpen={isOpen} onClose={() => setOpen(false)}> <Details /></SidePanel>;<SidePanelButton sidePanelTitle="Details" title="Open details"> <Details /></SidePanelButton>