Reference

Ready-made components and props

The 29 components registered by voodoo.full.min.js, one by one. Each one accepts both spellings, <VButton> and <v-button>. The ready-made components guide shows how to use them; this page lists what each one takes.

Rules that hold for all of them

<VSelect options="states"></VSelect>       <!-- variable from the v-data around it -->
<VSelect options="SP, RJ, MG"></VSelect>   <!-- literal list -->
<VSelect :options="loadedList"></VSelect>  <!-- reactive binding -->

Icons

They come from an internal SVG set. An unknown name simply draws nothing.

check  x  plus  minus  search  chevron-down  chevron-up  chevron-left  chevron-right
arrow-up  arrow-down  arrow-left  arrow-right  user  users  mail  lock  eye  eye-off
calendar  clock  star  info  alert  warning  trash  edit  copy  download  upload
settings  home  heart  bell  filter  external  refresh  folder  file  image  link
menu  more  logout  card  chart  box  inbox

Action

VButton

PropValuesDefault
variantprimary, secondary, outline, ghost, soft, link, danger, success, warning, accentprimary
sizexs, sm, md, lg, xlmd
icon, iconRighticon nameempty
typebutton, submit, resetbutton
loading, disabled, block, roundedbooleanfalse
ariaLabelaccessible labelempty
<VButton variant="primary" icon="check">Confirm</VButton>
<VButton variant="danger" size="sm" icon="trash">Delete</VButton>
<VButton :loading="saving" block>Save everything</VButton>

VIconButton

A button with nothing but an icon. The label becomes the accessible label.

PropDefault
iconmore
labelempty
variantghost
sizemd
typebutton
disabled, loading, roundedfalse

VTooltipButton

PropDefault
tooltipempty
placementtop, accepts top, bottom, left, right
variant, sizeghost, md
icon, ariaLabelempty
type, disabledbutton, false

Structure

VCard

PropDefault
title, subtitle, iconempty
paddedtrue
hoverablefalse

VDivider

PropDefault
labelempty
verticalfalse
spacingempty

VEmptyState

PropDefault
iconinbox
titleNothing here yet
descriptionempty

Form

VLabel and VField

VLabel accepts for, size (md) and required. VField is the field wrapper, with a label, a hint and an error, use it when you want to wrap a control of your own.

VField propDefault
label, hint, error, forempty
required, disabledfalse
<VField label="Date of birth" hint="Use the day/month/year format">
  <input type="text" v-mask="date">
</VField>

VInput

PropDefault
label, placeholder, hint, error, value, name, id, icon, suffixempty
typetext
sizemd
autocomplete, inputmode, maxlength, min, max, stepempty
required, disabled, readonly, clearablefalse

Emits clear when the clear button is used.

VTextarea

PropDefault
label, placeholder, hint, error, value, name, id, maxlengthempty
rows4
sizemd
resizevertical
required, disabled, readonly, counterfalse

VSelect

A select drawn from scratch, with search, multiple selection and keyboard navigation.

PropDefault
label, hint, error, name, idempty
placeholderSelect
searchPlaceholderSearch...
emptyTextNo options found
options, valuelist of options and initial value
sizemd
multiple, searchable, clearable, disabled, requiredfalse

Emits change with the current value, text, or an array when multiple. Formats accepted in options:

['SP', 'RJ', 'MG']
[{ value: 'sp', label: 'São Paulo' }, { value: 'rj', label: 'Rio de Janeiro', disabled: true }]

The alternative keys id, key, text, name and title are understood too.

VCheckbox, VRadio and VSwitch

PropDefault
label, description, error, name, idempty
valueon on VCheckbox, empty on VRadio
checked, disabled, requiredfalse
sizemd, on VSwitch only

VCheckbox and VSwitch emit change with the boolean; VRadio, with the chosen value.

VRating

PropDefault
value0
max5
sizemd
labelRating
readonly, disabled, showValuefalse
allowCleartrue

State and information

VBadge and VTag

PropDefault
toneneutral, accepts primary, accent, success, warning, danger, info, muted, neutral
variantsoft, accepts soft, solid, outline
sizemd, on VBadge only
iconempty
dotfalse, on VBadge only
closable, removeLabelfalse, Remove, on VTag only

VTag emits remove with the tag text.

VAlert

PropDefault
toneinfo
title, iconempty
closablefalse
closeLabelClose alert

Emits close.

VAvatar

PropDefault
name, src, altempty
sizemd
shapecircle, accepts circle, round, square
statusempty, accepts online, away, busy

With no image, it shows the initials of name.

VSpinner, VSkeleton and VProgress

ComponentProps
VSpinner size (md), tone (primary), label (Loading)
VSkeleton width (100%), height (14px), radius, lines (1), circle (false)
VProgress value (0), max (100), tone (primary), size (md), label, showValue and indeterminate (false)

VStat

PropDefault
label, value, hint, iconempty
deltanumeric change, with or without %
suffix%
invertedfalse. With true, a negative change counts as positive
<VStat label="Revenue" value="R$ 128.400" delta="12.4" icon="chart" hint="vs. last month"></VStat>
<VStat label="Cancellations" value="18" delta="-6" inverted></VStat>

Data and navigation

VTable

PropDefault
columns, rowscolumn definition and array of objects
emptyNo records found
sortable, hovertrue
dense, stripedfalse
captionempty

Emits sort with { key, direction }. The columns accept three formats:

['name', 'email']                                   // label derived from the key
[{ key: 'name', label: 'Name', align: 'left', sortable: true }]
'name:Name, total:Total:right'                      // key:label:alignment

Keys with a dot work: customer.name.

VPagination

PropDefault
page, pages1
total0
perPage10
siblings1
previousLabel, nextLabelPrevious, Next
ariaLabelPagination

Emits change with the chosen page.

VBreadcrumb

PropDefault
itemsthe trail
separator/
ariaLabelBreadcrumb
<VBreadcrumb items="Home:/, Products:/products, Detail"></VBreadcrumb>
<VBreadcrumb :items="[{ label: 'Home', href: '/' }, { label: 'Profile' }]"></VBreadcrumb>

The last item never turns into a link and gets aria-current="page".

VSteps

PropDefault
stepslist of steps
current0
verticalfalse
ariaLabelSteps

VTimeline

Accepts items. In the text form, the events are separated by semicolons and the fields by a vertical bar: title | description | time | tone.

<VTimeline items="Order created|We received your order|10:02; Being picked||10:40"></VTimeline>
<VTimeline :items="[{ title: 'Shipped', description: 'On its way', time: 'yesterday', tone: 'success' }]"></VTimeline>

VCodeBlock

PropDefault
code, language, filenameempty
copyLabel, copiedLabelCopy, Copied
wrapfalse

Emits copy with the copied text.