Constructor options

These are global default options, which are set on Buefy initialization

Full bundle
Vue.use(Buefy, {
    defaultIconPack: 'fas',
    // ...
})
Individual components
import { ConfigProgrammatic, Table, Input } from 'buefy'

Vue.use(Table)
Vue.use(Input)
ConfigProgrammatic.setOptions({
    defaultIconPack: 'fas',
    // ...
})
CDN bundle
// When using CDN, Buefy automatically attaches itself on Vue
Vue.prototype.$buefy.config.setOptions({
    defaultIconPack: 'fas',
    // ...
})

# API

Name
Description
Type
Values
Default
defaultIconPackIcon pack used internally and on the Icon component attribute — Material Design Icons or FontAwesome 4 or FontAwesome 5Stringmdi, fa, fas, far, fadmdi
defaultIconComponentComponent used to render the Icon. Can be used to render FontAwesome 5 icons with the vue-fontawesome componentComponentFontAwesomeIcon component name—
defaultStatusIconAutomatically show status icon on input componentBoolean—true
defaultIconPrevIcon used internally for prev. — Used in Datepicker, Pagination and Steps for exampleString—chevron-left
defaultIconNextIcon used internally for next. — Used in Datepicker, Pagination and Steps for exampleString—chevron-right
defaultLocaleWill be used for default date and number formatting. Accept a string with a BCP 47 language tag, or an array of such strings. See Unicode BCP 47 locale identifierString, Array of String—undefined: default to browser locale.
defaultContainerElementDefault container attribute for floating Notices (Toasts & Snackbars). Note that this also changes the position of the Notices from fixed to absolute. Meaning that the container should be fixed.String—body
defaultDialogConfirmTextDefault dialog confirmText attributeString—OK
defaultDialogCancelTextDefault dialog cancelText attributeString—Cancel
defaultSnackbarDurationDefault snackbar duration attribute.Number—3500
defaultSnackbarPositionDefault snackbar position attribute.Stringis-top-right, is-top, is-top-left, is-bottom-right, is-bottom, is-bottom-leftis-bottom-right
defaultToastDurationDefault toast duration attribute.Number—2000
defaultToastPositionDefault toast position attribute.Stringis-top-right, is-top, is-top-left, is-bottom-right, is-bottom, is-bottom-leftis-top
defaultNotificationDurationDefault notification duration attribute.Number—2000
defaultNotificationPositionDefault notification position attribute for programmatically opening.Stringis-top-right, is-top, is-top-left, is-bottom-right, is-bottom, is-bottom-leftis-bottom-right
defaultTooltipTypeDefault tooltip type (color) attribute.Stringis-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 Sassis-primary
defaultTooltipDelayDefault tooltip delay attribute.Number——
defaultInputAutocompleteDefault input autocomplete attribute.Stringon, offon
defaultDateFormatterDefault datepicker date-formatter attributeFunction—(date) => new Intl.DateTimeFormat(locale).format(date)
defaultDateParserDefault datepicker date-parser attributeFunction—Tries to parse the date using the locale specific format. Fallback to Date.parse
defaultDateCreatorDefault datepicker date-creator attributeFunction—new Date()
defaultDayNamesDefault datepicker day-names attributeArray—default to browser locale
defaultMonthNamesDefault datepicker month-names attributeArray—default to browser locale
defaultFirstDayOfWeekDefault datepicker first-day-of-week attributeNumber—0
defaultUnselectableDaysOfWeekDefault datepicker unselectable-days-of-week attributeArray——
defaultTimeFormatterDefault timepicker time-formatter attributeFunction—HH:mm or HH:mm AM/PM
defaultTimeParserDefault timepicker time-parser attributeFunction—HH:mm or HH:mm AM/PM
defaultModalCanCancelDefault modal canCancel attributeBoolean, Arrayescape, x, outside, button['escape', 'x', 'outside', 'button']
defaultModalScrollDefault modal/dialog scroll attributeStringclip, keepclip
defaultDatepickerMobileNativeDefault native datepicker on mobileBoolean—true
defaultTimepickerMobileNativeDefault native timepicker on mobileBoolean—true
defaultNoticeQueueDefault snackbar/toast/notification queue attributeBoolean—true
defaultInputHasCounterDefault input has-counter attributeBoolean—true
defaultTaginputHasCounterDefault taginput has-counter attributeBoolean—true
defaultUseHtml5ValidationDefault form components use-html5-validation attributeBoolean—true
defaultFieldLabelPositionDefault field position of labelStringinside,on-border—
defaultDatepickerYearsRangeDefault years range relative to selected yearArray—[-100, 3]
defaultDatepickerNearbyMonthDaysShow/Hide nearby month days (prev and next month)Boolean—true
defaultDatepickerNearbySelectableMonthDaysIt allows to select/unselect nearby month daysBoolean—false
defaultDatepickerShowWeekNumberIt allows to display week numberBoolean—false
customIconPacksAllows you to define your own custom icon pack to be used in Buefy.Object——
defaultClockpickerHoursLabelDefault clockpicker hours-label attributeString—Hours
defaultClockpickerMinutesLabelDefault clockpicker minutes-label attributeString—Min
defaultTrapFocusDefault config to trap focus inside components (Dialog, Dropdown and Modal).Boolean—true
defaultButtonRoundedDefault config to make all buttons rounded.Boolean—false
defaultSwitchRoundedDefault config to make all switch rounded.Boolean—true
defaultCarouselIntervalDefault carousel interval attributeNumber—3500
defaultTabsExpandedDefault tabs expanded attributeBoolean—false
defaultTabsAnimatedDefault tabs animated attributeBoolean—true
defaultTabsTypeDefault tabs type attributeStringis-boxed, is-toggle—
defaultProgrammaticPromiseReturn a promise using programmatic componentBoolean—false
defaultLinkTagsDefault link tags accepted as tag in some component (Button, MenuItem, PaginationButton). Can be used when using custom component or other Vue Router plugin like inertia.string—[a, button, input, router-link, nuxt-link, n-link, RouterLink, NuxtLink, NLink]
defaultBreadcrumbTagDefault link tags accepted as tag in Breadcrumb component. Can be used when using custom component or other Vue Router plugin like inertia.string—[a, button, input, router-link, nuxt-link, n-link, RouterLink, NuxtLink, NLink]
defaultImageWebpFallbackFallback when using webp format. You can specify an extension only (.jpg, .jpeg, .png, .gif) if the filename is the same. You can use a full url if not.String——
defaultImageLazyUse IntersectionObserver to display the image only when in viewport.Boolean—true
defaultImageResponsiveThe image will take 100% of the parent width. Use this with ratio to prevent page jump when images are loading.Boolean—true
defaultImageRatioThe space will be reserved. Prevent page jump when images are loading when using responsive.String1by1, 5by4, 4by3, 3by2, 5by3, 16by9, 2by1, 3by1, 4by5, 3by4, 2by3, 3by5, 9by16, 1by2 1by3 or any string having this format {number}by{number}—
defaultImageSrcsetFormatterFunction to format src according to a given size.Function—(src, size) => `${srcFilename}-${size}.${srcExt}`

This page is open source. Noticed a typo or something's unclear?

Improve this page on GitHub