Skip to contentSkip to navigationSkip to topbar
Paste assistant Assistant
Figma
Star

Minimizable Dialog

Version 4.1.1GithubStorybookPeer review pending

A dialog that can be minimized.

Installation

Installation page anchor
yarn add @twilio-paste/minimizable-dialog - or - yarn add @twilio-paste/core
import {
  MinimizableDialog,
  MinimizableDialogButton,
  MinimizableDialogHeader,
  MinimizableDialogContainer,
  MinimizableDialogContent,
} from '@twilio-paste/core/minimizable-dialog';

const MinimizableDialogExample: React.FC = () => {
  return (
    <MinimizableDialogContainer>
      <MinimizableDialogButton variant="primary">Open dialog</MinimizableDialogButton>
      <MinimizableDialog aria-label="My Dialog">
        <MinimizableDialogHeader>Dialog header</MinimizableDialogHeader>
        <MinimizableDialogContent>Dialog content</MinimizableDialogContent>
      </MinimizableDialog>
    </MinimizableDialogContainer>
  );
};

useMinimizableDialogReturnState

useMinimizableDialogReturnState page anchor

useMinimizableDialogInitialState

useMinimizableDialogInitialState page anchor

minimized

Determines whether or not the dialog is minimized.

Type
boolean

aria-label RequiredRequired

Accessible title for the Minimalize Dialog.

Type
string

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
'MINIMIZABLE_DIALOG'

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
'MINIMIZABLE_DIALOG_BUTTON'

id

Type
string

toggle

Type
() => void

element

Overrides the default element name to apply unique styles with the Customization Provider.

Type
any
Default
'MINIMIZABLE_DIALOG_HEADER'

i18nDismissLabel

Accessible label text for the dismiss button.

Type
string
Default
'dismiss'

i18nMinimizeLabel

Accessible label text for the minimize button.

Type
string
Default
'minimize'

MinimizableDialogContainer

MinimizableDialogContainer page anchor

minimized

Determines whether or not the dialog is minimized.

Type
boolean

state

Type
MinimizableDialogStateReturn

MinimizableDialogContent

MinimizableDialogContent page anchor

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
'MINIMIZABLE_DIALOG_CONTENT'