Import
import { Drawer } from '@meteorack/sdk-react';How To Use It
- Use it for secondary detail views, inspectors, or editing side panels where the main page should remain visible.
- Choose a drawer over a modal when users benefit from keeping table rows or page context in view.
Props
open: booleanControls whether the drawer is mounted and visible.
onClose: () => voidCalled when the user dismisses the drawer.
title: stringHeading rendered in the drawer header.
children: ReactNodeScrollable drawer body content.
footer?: ReactNodeOptional sticky footer row for actions.
side?: 'right' | 'left'Chooses which edge of the viewport the drawer slides from.
className?: stringOptional class name for the drawer content container.
Example
Drawer.tsx
import { useState } from 'react';
import { Drawer, Button, Card } from '@meteorack/sdk-react';
export function PluginInspector() {
const [open, setOpen] = useState(false);
return (
<>
<Button variant="secondary" onClick={() => setOpen(true)}>
View details
</Button>
<Drawer
open={open}
onClose={() => setOpen(false)}
title="Plugin details"
side="right"
footer={
<Button variant="ghost" onClick={() => setOpen(false)}>
Close
</Button>
}
>
<Card>
<p style={{ margin: 0 }}>
Keep table context visible while reviewing plugin metadata,
status, or recent activity.
</p>
</Card>
</Drawer>
</>
);
}