Notification

Show temporary, programmatic notifications outside the main flow.

Notification

Default

It generates a notification with the Sax Design function (SNotification), to use the instance of the notification it is necessary to save it in a variable, for example if you need to close the notification manually or do other functionalities with the instance

Copied
import { SNotification } from 'sax-design-vue'

SNotification({ ...options })

The necessary properties are the title and the content

Code copied

Position

Change the notification position with the position property

supported values

  • bottom-right Default
  • top-right
  • top-center
  • top-left
  • bottom-left
  • bottom-center
Code copied

Color

Use the color property to change the base color of the component and some of the child components, to better understand the handling of colors and themes you can see it here

Allowed values ​​are:

  • primary
  • success
  • danger
  • warning
  • dark
  • RGB
  • HEX
Code copied

Icons

Add the icon provided as the value of the icon property to the notification

Code copied

Progress

Add a progress bar to the notification, if the value of the progress property is auto be determined by the duration property to reach 100%, if you want the value to be manual you can add a number of the (0 - 100) being 100 100% and use the function in the changeProgress instance and change the value to the one provided as the first parameter

Code copied

Duration

Change the duration of the notification with the duration property, the value is numerical and determine the seconds before the bone component is hidden that 10s equals 10000 as the value

if you need the notification to never be hidden, the duration value would be 0

Code copied

Square

Change the style of the notification with the square property so as not to have border-radius making it a rectangle

Code copied

Border

Change the notification style with the border property by adding a border of the color provided as the value

Code copied

Flat

Change the style of the notification with the flat property, having this property changes to lighter colors and the text of the color property, this property is a boolean so you can only use the value true

Code copied

Loading

Add a loading animation to the notification, having this property will only show the animation and the content will be hidden

Code copied

Width

Change the size of the notification to the total screen with the property width and giving it a value of full

If you need the notification to have an automatic size to your content you can do it with the value auto

Code copied

Sticky

You can add a style to the paste component to the nearest corner with the sticky property, this property is a boolean po which can only have the value true

Code copied

Example

You can do great things with this component and some others from Sax Design, to add any element within the notification we have the property content this property can only receive an imported component and that is what it will generate within the notification

Code copied

API

PROPS

PropertyTypeValuesDescriptiondefaultExampleMore
dangerous-html-string / icon-size / offset / z-indexBoolean / Number / Number / Numbertrue | false / pixels / layer numberConfigure HTML rendering, icon size, viewport offset and stacking order.-
show-close / on-click-closeBoolean / Functiontrue | false / close callbackControl close affordance and handle close interaction.true / -
titleStringStringAdd a title to the notification.
Usage
contentString, ComponentStringVNodeAdd the content to the notification.
Usage
positionStringbottom-righttop-righttop-centertop-leftbottom-leftbottom-centerChange the position of the component.bottom-right
Usage
colorStringSax Design colorsrgbhexChange the base color of the entire component.
Usage
borderStringSax Design colorsrgbhexAdd a color border to the notification.
Usage
iconStringStringAdd an icon to the notification.
Usage
durationNumber, StringNumberNumbernoneDetermine the time until the notification is hidden (none determines not to hide).4500 (4.5s)
Usage
onClickfunctionfunctionfunction that is executed by clicking on the notification.
buttonCloseBooleantruefalseDetermine if the notification has the close button.true
flatBooleantruefalseChange the notification style to flat.
Usage
onDestroy() => voidFunctionFunction that is executed when the notification is destroyed.
stickybooleantruefalseChange the position of the notification attached to the nearest corner.
Usage
squarebooleantruefalseDetermine if the notification is square and remove the border-radius.
Usage
widthString100%autoDetermine the width of the notification.340px
Usage
loadingbooleantruefalseDetermine if the notification has a loading animation.
Usage
progressAutoBooleantruefalseAdd a progress bar to the notification.
Usage
notPaddingBooleantruefalseRemove padding from notification.20px
Usage
clickCloseBooleantruefalseDetermine if clicking on the notification closes.
contentVue ComponentVnodeStringComponentPublicInstanceChange the content of the notification to the one provided as a value (something similar to a vue slot).
Usage
instance.close()functionClose the notificationn.
custom-classStringStringAdd a custom class to the notification.
No matching data
Last Updated: 2026-08-17, 08:33:54