MUI Docs Infra

Warning

This is an internal project, and is not intended for public use. No support or stability guarantees are provided.

A handle for controlling dialog visibility imperatively.

Use this class to programmatically open or close dialogs without using React state.

Constructor Parameters
ParameterTypeDefaultDescription
initialOpen
boolean | undefined
false

Whether the dialog starts open.

Properties
PropertyTypeModifiersDescription
id
string
readonly

A unique identifier for this handle instance.

version
string
static, readonly

The version of the Handle class.

Methods
open

Opens the dialog.

Returns:
boolean

Whether the operation succeeded.

close

Closes the dialog.

Returns:
boolean

Whether the operation succeeded.

toggle

Toggles the dialog open/closed state.

Returns:
void
import { createTypes } from './createTypes';
import { Handle } from './Handle';

export const TypesHandle = createTypes(import.meta.url, Handle);