Back to library

Dialog

Open a focused overlay for a confirmation or related details.

Account updated

Your changes are ready to use.

Remove saved recipient?

You can add them again later.

Recommended API

Property or elementTypeExample initial valueDescription
<dialog>ElementclosedOpen a focused overlay using showModal().
form[method="dialog"]Form methoddialogClose the dialog and carry the submit button’s value.

States

StateTriggerResult
openActivate an information or confirmation trigger.The dialog takes focus and the background is inactive.
closedDismiss with Escape or choose an action.Focus returns to the trigger. A chosen action updates the sample result.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-surfacecolor #ffffffSurface for controls and cards.
--q-bordercolor #dce0d8Color for outlines and dividers.
--q-radiuslength 10pxBase corner radius.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.
--q-panel-paddinglength calc(var(--q-space) * 5)Inner padding for panels.
--q-on-accentcolor #ffffffForeground on the accent background.
--q-control-pxlength calc(var(--q-space) * 4)Horizontal padding for controls.
--q-control-pylength calc(var(--q-space) * 2.5)Vertical padding for controls.
--q-spacelength 4pxBase unit for gaps and padding.