Back to library

Toast

Briefly announce an outcome at the top or bottom. A bottom toast can offer an undo action.

Recommended API

Property or elementTypeExample initial valueDescription
Positiontop or bottomOpens on actionShow the message in the requested screen position.
aria-liveARIA tokenpoliteAnnounce the message without moving focus on entry.

States

StateTriggerResult
visibleActivate a toast trigger.The message appears and a dismissal timer starts.
dismissedWait for the timer or activate Undo in the bottom toast.The toast closes. Undo reports its 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-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-shadowshadow 0 4px 16px rgb(0 0 0 / 8%)Shadow behind raised elements.
--q-durationtime 175msDuration of visual state transitions.
--q-spacelength 4pxBase unit for gaps and padding.