Snackbar
Feedback & Status
stable
Temporary overlay that delivers brief non-blocking feedback at a configurable viewport location with optional auto-dismiss timer.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- multiLinebooleanfalse
- Increases the minimum height to accommodate multi-line message text.
- textstring
- Body text displayed inside the snackbar. Can also be provided via the text slot.
- timerboolean | stringfalse
- Displays a shrinking progress bar at the top of the snackbar showing the remaining timeout duration.
- timeoutnumber | string5000
- Auto-dismiss delay in milliseconds. Pass -1 to keep the snackbar open indefinitely.
- verticalbooleanfalse
- Stacks the action buttons below the message text instead of inline.
- idstring
- classstring | Array<string> | object
- stylestring | Array<string> | object | StyleValue
- tagstring'div'
- HTML element rendered at the root.
- statusTStatus
- statusIconPositionTStatusPosition
- iconTIcon
- colorTColor
- Intent or custom foreground color applied to the snackbar surface.
- bgColorTColor
- Background color override for the snackbar wrapper.
- absoluteboolean
- closeOnBackboolean
- contentClassstring | Array<string>
- contentPropsany
- disabledboolean
- noClickAnimationboolean
- modelValueboolean
- zIndexnumber | string
- disableGlobalStackboolean
- persistentboolean
- heightnumber | string
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- target'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance | [x: number, y: number] | undefined
- activator'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance
- activatorPropsany
- openOnClickboolean
- openOnContextMenuboolean
- openOnHoverboolean
- openOnFocusboolean
- closeOnContentClickboolean
- closeDelaynumber | string
- openDelaynumber | string
- locationStrategyTLocationStrategy | TLocationStrategyFn
- locationTAnchor'bottom'
- Viewport anchor for the snackbar. Accepts compound values such as "bottom right".
- originTAnchor | 'auto' | 'overlap'
- offsetnumber | string | Array<number>
- viewportMarginnumber
- scrollStrategyTScrollStrategy | TScrollStrategyFn
- containedboolean
- eagerboolean
- transitionboolean | string | TTransitionProps{ component: OrigamSnack }
- Transition used when the snackbar enters and exits. Defaults to the OrigamSnack slide-up transition.
- scrimboolean | string
- attachboolean | string | Element | null
- positionTPosition
- topnumber | string
- bottomnumber | string
- leftnumber | string
- rightnumber | string
- roundedboolean | number | string | TRounded | null | undefinedtrue
- Border-radius token. Defaults to the theme default radius.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | number | string
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>true
- Applies a border to the snackbar wrapper. Defaults to true.
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- elevationTElevation1
- Box-shadow elevation token applied to the snackbar wrapper.
- activeboolean | IStateEffectConfig
- activeClassstring
- hoverboolean | IStateEffectConfig
- hoverClassstring
API
Slots
Emplacements de contenu exposés par ce composant.
- #prepend
- Custom icon or avatar placed before the message.
- #title
- Bold title line rendered above the message.
- #text
- Message body content. Alias: message slot.
- #message
- #default
- Custom content rendered inside the snackbar item body.
- #action
- Action area (buttons) rendered inside the snackbar. Receives isActive to allow dismissing programmatically.
API
Emits
Événements émis par ce composant.
- @update:modelValueany
- Fired when the snackbar open state changes. Bind with v-model.
Interactif
Playground
Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.
Rendu de l’aperçu en cours…
Usage
Exemples
Extraits de code prêts à coller dans vos templates.
Basic usage
Status variants
With action button
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.