Snackbar

Feedback & Status
stable

Temporary overlay that delivers brief non-blocking feedback at a configurable viewport location with optional auto-dismiss timer.

API

Props

All props accepted by this component, with their type, default value and description.

multiLine
boolean
false
Increases the minimum height to accommodate multi-line message text.
text
string
Body text displayed inside the snackbar. Can also be provided via the text slot.
timer
boolean | string
false
Displays a shrinking progress bar at the top of the snackbar showing the remaining timeout duration.
timeout
number | string
5000
Auto-dismiss delay in milliseconds. Pass -1 to keep the snackbar open indefinitely.
vertical
boolean
false
Stacks the action buttons below the message text instead of inline.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'div'
HTML element rendered at the root.
status
TStatus
statusIconPosition
TStatusPosition
icon
TIcon
color
TColor
Intent or custom foreground color applied to the snackbar surface.
bgColor
TColor
Background color override for the snackbar wrapper.
absolute
boolean
closeOnBack
boolean
contentClass
string | Array<string>
contentProps
any
disabled
boolean
noClickAnimation
boolean
modelValue
boolean
zIndex
number | string
disableGlobalStack
boolean
persistent
boolean
height
number | string
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
target
'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance | [x: number, y: number] | undefined
activator
'parent' | 'cursor' | TAnyString | Element | ComponentPublicInstance
activatorProps
any
openOnClick
boolean
openOnContextMenu
boolean
openOnHover
boolean
openOnFocus
boolean
closeOnContentClick
boolean
closeDelay
number | string
openDelay
number | string
locationStrategy
TLocationStrategy | TLocationStrategyFn
location
TAnchor
'bottom'
Viewport anchor for the snackbar. Accepts compound values such as "bottom right".
origin
TAnchor | 'auto' | 'overlap'
offset
number | string | Array<number>
viewportMargin
number
scrollStrategy
TScrollStrategy | TScrollStrategyFn
contained
boolean
eager
boolean
transition
boolean | string | TTransitionProps
{ component: OrigamSnack }
Transition used when the snackbar enters and exits. Defaults to the OrigamSnack slide-up transition.
scrim
boolean | string
attach
boolean | string | Element | null
position
TPosition
top
number | string
bottom
number | string
left
number | string
right
number | string
rounded
boolean | number | string | TRounded | null | undefined
true
Border-radius token. Defaults to the theme default radius.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
true
Applies a border to the snackbar wrapper. Defaults to true.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
padding
boolean | number | string
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
elevation
TElevation
1
Box-shadow elevation token applied to the snackbar wrapper.
active
boolean | IStateEffectConfig
activeClass
string
hover
boolean | IStateEffectConfig
hoverClass
string

API

Slots

Content slots exposed by this component.

#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

Events emitted by this component.

@update:modelValue
any
Fired when the snackbar open state changes. Bind with v-model.

Interactive

Playground

Edit props live and see the component update in real time. The generated code snippet updates as you change values.

Rendering the live preview…

Usage

Examples

Ready-to-paste code snippets for your templates.

Basic usage

vue

Status variants

vue

With action button

vue

Ecosystem

Family

Components from the same folder that share conventions and often compose together.