Notification
Bold notification blocks to alert your users of something
Examples
Base
Show code
Variants
Show code
Use types
Show code
Add custom buttons
Show code
Programmatically opening
Show code
Class props
Notification component
Bold notification blocks to alert your users of something
html
<o-notification></o-notification>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
active | Whether modal is active or not, use v-model:active to make it two-way binding | boolean | - | true |
animation | Custom animation (transition name) | string | - | From config: notification: { |
ariaCloseLabel | Accessibility label for the close button | string | - | From config: notification: { |
closable | Add close button to the item that closes the notification | boolean | - | false |
closeIcon | Close icon name | string | - | From config: notification: { |
closeIconSize | Size of close icon | string | small , medium , large | From config: notification: { |
icon | Icon name to use | string | - | |
iconPack | Icon pack to use | string | mdi , fa , fas and any other custom icon pack | From config: notification: { |
iconSize | Icon size | string | small , medium , large | From config: notification: { |
message | Message text (can contain HTML), unnecessary when default slot is used | string | string[] | - | |
override | Override existing theme classes completely | boolean | - | |
position | Which position the notification will appear when programmatically | "bottom-left" | "bottom-right" | "bottom" | "top-left" | "top-right" | "top" | top-right , top , top-left , bottom-right , bottom , bottom-left | From config: notification: { |
type | Type (color) of the notification | string | info , success , warning , danger | |
variant | Color of the control | string | primary , info , success , warning , danger , and any other custom color | From config: notification: { |
Events
Event name | Properties | Description |
---|---|---|
update:active | value boolean - updated active prop | active prop two-way binding |
close | value unknown - close event data | on component close event |
Slots
Name | Description | Bindings |
---|---|---|
inner | Notification inner content, outside of the message container | close (...args): void - function to close the notification |
default | Notification default content, default is message prop | close (...args): void - function to close the notification |
NotificationNotice component
Notification Notice is an extension of the Notification component and is used for the programmatic usage
html
<o-notification-notice></o-notification-notice>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
component | Component to be injected. Close the component by emitting a 'close' event — $emit('close') | Component | - | |
duration | Hide notification after duration (in miliseconds) | number | - | From config: notification: { |
events | Events to be binded to the injected component | {} | - | |
infinite | Show the Notification infinitely until it is dismissed. | boolean | - | false |
override | Override existing theme classes completely | boolean | - | |
position | Which position the notification will appear. | "bottom-left" | "bottom-right" | "bottom" | "top-left" | "top-right" | "top" | top-right , top , top-left , bottom-right , bottom , bottom-left | From config: notification: { |
props | Props to be binded to the injected component | any | - | |
queue | If notice should queue with others notices (snackbar/toast/notification). | boolean | - | From config: notification: { |
Events
Event name | Properties | Description |
---|---|---|
close | value unknown - close event data | on component close event |
Slots
Name | Description | Bindings |
---|---|---|
default |
Sass variables
Current theme ➜ Oruga
SASS Variable | Default |
---|---|
$notification-background-color | var(--#{$prefix}primary) |
$notification-border-radius | 4px |
$notification-padding | 1.75em 1.75em |
$notification-margin-bottom | 1.5rem |
$notification-animantion | append-animate 0.3s linear |
$notification-color | var(--#{$prefix}white) |
$notification-close-border-radius | var( --#{$prefix}base-border-radius-rounded) |
$notification-close-right | 0.5rem |
$notification-close-top | 0.5rem |
$notification-close-size | 20px |
$notification-close-color | var(--#{$prefix}white) |
$notification-close-background-color | hsla(0, 0%, 4%, 0.2) |
$notification-icon-margin-right | 1rem |
$notification-notices-padding | 2em |
$notification-notices-zindex | 1000 |
See ➜ 📄 Full scss file
Current theme ➜ Bulma
SASS Variable | Default |
---|---|
$notification-margin-bottom | 1.5rem |
$notification-notices-padding | 2em |
$notification-notices-z | 1000 |
See ➜ 📄 Full scss file
Current theme ➜ Bootstrap
SASS Variable | Default |
---|---|
$notification-close-btn-position | 1rem |
$notification-notices-padding | 2em |
$notification-notices-zindex | $zindex-toast |
$notification-notices-max-width | 600px |
$notification-notices-space | 1.5rem |
$notification-icon-margin-right | 0.5rem |
See ➜ 📄 Full scss file