Installation
Usage
Props
MinimizableDialogContainer
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | Required. Must contain MinimizableDialogButton and MinimizableDialog. |
state | MinimizableDialogStateReturn | - | Optional state from useMinimizableDialogState for controlled usage. |
minimized | boolean | - | Control whether the dialog is minimized. |
visible | boolean | - | Control the visibility (controlled mode). |
MinimizableDialog
| Prop | Type | Default | Description |
|---|---|---|---|
aria-label | string | - | Required. Accessible title for the Minimizable Dialog. |
children | React.ReactNode | - | Required. The content of the dialog. |
element | string | "MINIMIZABLE_DIALOG" | Overrides the default element name for custom styling. |
MinimizableDialogButton
MinimizableDialogButton extends the Button component props.| Prop | Type | Default | Description |
|---|---|---|---|
| All Button props | - | - | Inherits all props from the Button component. |
MinimizableDialogHeader
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | Required. The header content, typically a title string. |
element | string | "MINIMIZABLE_DIALOG_HEADER" | Overrides the default element name for custom styling. |
MinimizableDialogContent
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | Required. The main content of the dialog. |
element | string | "MINIMIZABLE_DIALOG_CONTENT" | Overrides the default element name for custom styling. |
Examples
Basic Minimizable Dialog
Controlled Minimizable Dialog
Initially Minimized
Chat Widget Example
Hooks
useMinimizableDialogState
Returns state for controlling the minimizable dialog programmatically.Accessibility
- MinimizableDialog is a non-modal dialog
- All controls (minimize, maximize, close) are keyboard accessible
- Screen readers announce the dialog state
- Focus management follows best practices
- The header buttons have appropriate ARIA labels
- Users can still interact with the main page when dialog is open
Best Practices
Do:
- Use for persistent widgets that users may need to access repeatedly
- Keep content concise when minimized
- Provide clear header text that identifies the dialog purpose
- Use for chat interfaces, notifications, or help widgets
Don’t:
- Don’t use for critical dialogs that require immediate attention
- Don’t place multiple minimizable dialogs on the same page
- Don’t use for primary workflows (use Modal or Side Modal instead)
- Don’t hide important information that users need to complete tasks
When to Use
Use Minimizable Dialog when:
- Building chat or messaging widgets
- Creating persistent help or support interfaces
- Users need to multitask while keeping information accessible
- Building notification centers or activity feeds
- The dialog needs to be minimized without losing state
Use Modal instead when:
- The task requires full user attention
- You need to block interaction with the main content
- The dialog is part of a critical workflow
Use Side Modal instead when:
- You need more screen space
- Building complex forms or multi-step processes
- Users need to reference main page content while working