ComponentsDialog

Dialog

GitHub LogoSource Code

Maximum width

Use the maxWidth prop to set the maximum width of the dialog. The width of the dialog will adjust automatically to the width of the content, unless the prop fullWidth is set to true in which case the dialog will grow to occupy the width specified on maxWidth.

Semantic

The HvDialog component can receive a variant prop to set the status of the dialog. HvDialogTitle also accepts a variant prop that changes the icon.

Long content

With very long content the dialog grows in height, up to a maximum where a margin of 100px is left on top and bottom.

Fullscreen

The HvDialog component can receive a fullscreen prop to make it fullscreen.

Form

An example of using a form in HvDialog. The sample uses the autoFocus attribute to focus the Title input by default. Accessibility-wise, HvDialogTitle automatically labels the dialog. A aria-describedby can be used to describe the content.

Form data:

{}