You can use it on Vuex or VueRouter using this syntax:
Dialog
Dialogs inform users about a specific task and may contain critical information or require decisions
# Alert
# Confirm
# Prompt
# From outside Vue instance
# API
Name | Description | Type | Values | Default |
---|---|---|---|---|
type | Type (color) of the confirm button (and the icon if hasIcon ) | String | is-white , is-black , is-light ,
is-dark , is-primary , is-info , is-success ,
is-warning , is-danger ,
and any other colors you've set in the $colors list on Sass | is-primary |
title | Dialog title | String | — | — |
message | Message text | String | — | — |
hasIcon | Adds an icon on the left side depending on the type or icon | Boolean | — | false |
icon | Icon name if hasIcon , optional | String | — | — |
iconPack | Icon pack to use if hasIcon , optional | String | mdi , fa , fas , far , fad , fal | — |
size | Dialog's size, optional | String | is-small , is-medium , is-large | — |
animation | Custom animation (transition name) | String | — | zoom-out |
confirmText | Text of the confirm button | String | — | OK |
cancelText | Text of the cancel button | String | — | Cancel |
canCancel | Can close dialog by clicking cancel button, pressing escape or clicking outside | Boolean, Array | escape , button , outside | true for Confirm/Prompt, false for Alert |
inputAttrs | Prompt only: input's attributes | Object | Any HTML5 input attribute | — |
onConfirm | Callback function when the confirm button is clicked | Function (value: String) | — | — |
onCancel | Callback function when the dialog is canceled (cancel button is clicked / pressed escape / clicked outside) | Function | — | — |
scroll | clip to remove the <body> scrollbar, keep to have a non scrollable scrollbar
to avoid shifting background, but will set <body> to position fixed, might break some layouts | String | clip , keep | clip |
container | DOM element the dialog will be created on. Note that this also changes the position of the dialog from fixed to absolute . Meaning that the container should be fixed . Also note that this will override the defaultContainerElement if you specified it in your Buefy Constructor Options. See Constructor options for more details. | String | — | body |
focusOn | Focus on confirm or cancel button (when dialog is not prompt) | String | confirm , cancel | confirm |
trap-focus | Trap focus inside the dialog. | Boolean | — | false |
aria-role | Role attribute to be passed to modal container for better accessibility. | String | dialog , alertdialog | — |
aria-modal | Improve accessiblity when enabled. | Boolean | — | false |
This page is open source. Noticed a typo or something's unclear?