Chip
#

Chip - it is a compact element for displaying data or performing an action.

Examples
#

Default
#

Default usage of the va-chip component.

default
Open in GitHub

Outline
#

Outline style without background.

outline chip
Open in GitHub

Flat
#

Flat style without borders and background.

flat chip
Open in GitHub

Square
#

Makes your va-chip square.

square
Open in GitHub

Color
#

You can use the va-chip component with different colors.

primarydangersuccesswarning#7f1f90
Open in GitHub

Size
#

Set different tag sizes using size presets.

small size medium size large size
Open in GitHub

Icon
#

You can use icons in tag.

faceemailthumb_upinforemove without icon
Open in GitHub

Closeable
#

A tag can be closed by applying the closeable property.

closeable chip close
Open in GitHub

Link
#

It makes your tag clickable.

Open in GitHub

Shadow
#

You can set a shadow.

chip with shadow
Open in GitHub

API
#

Props #

NameDescriptionTypesDefault
activeClass

Applied when the link is active. More info here.

String

-

append

When set, always appends the relative path to the current path. More info here.

Boolean

-

ariaCloseLabel

The aria-label of close button

String

"$t:close"

closeable

Provides the ability to close the tag

Boolean

false

color

Color of the component (theme string or HEX string).

String

""

disabled

Applies disabled style and removes all user interaction effects.

Boolean

false

exact

Exactly match the link. Without this, '/' will match every route. More info here.

Boolean

-

exactActiveClass

Applied when the link is active with exact match. More info here.

String

-

flat

Applies flat styling

Boolean

false

href

Designates the component as anchor and applies the href attribute. More info here.

String

-

icon

The icon to be displayed inside a tag

String

""

modelValue

The value of the v-model bindings.

Boolean

true

outline

Applies outline styling

Boolean

false

preset

Named preset combination of component props.

String | Array

-

readonly

Doesn't look disabled, but acts like one. Mostly useful for wrapper components.

Boolean

false

replace

When set, calls router.replace() instead of router.push() when navigated, so it will not leave a history record. More info here.

Boolean

-

shadow

Applies box-shadow to the component

Boolean

false

size

Specify size for component. "small", "medium", "large" sizes are available. If you want more control, you can provide number (will be used as px) or string value (rem and px sizes are supported).

String

"medium"

square

Removes rounded corners.

Boolean

false

stateful

Add possibility to work with component without setting v-model.

Boolean

false

tag

Replaces html tag. This is useful for semantics and also to allow for valid markup in some cases (ul > li and tr > td etc.).

String

"span"

target

Navigation target, More info here.

String

-

to

The target route of the link. More info here.

String | Object

-

Events #

NameDescription

focus

On focus.

update:modelValue

The event is triggered when the component needs to change the model. Is also used by v-model and must be listed after the v-model

Css Variables #

NameDefault Value
--va-chip-display inline-flex
--va-chip-border 0.125rem solid transparent
--va-chip-position relative
--va-chip-border-radius 2rem
--va-chip-width auto
--va-chip-height auto
--va-chip-min-width initial
--va-chip-min-height initial
--va-chip-padding 0 0.375rem
--va-chip-color #ffffff
--va-chip-cursor default
--va-chip-font-size 1rem
--va-chip-vertical-align middle
--va-chip-inner-display inline-flex
--va-chip-inner-align-items center
--va-chip-inner-width 100%
--va-chip-hover-opacity 0.85
--va-chip-content-display flex
--va-chip-content-width var(--va-chip-inner-width, 100%)
--va-chip-content-align-items center
--va-chip-content-justify-content center
--va-chip-content-padding 0 var(--va-gap-medium, 0.5rem)
--va-chip-content-line-height 1.6
--va-chip-square-border-radius 0.2rem
--va-chip-sm-height 1.5rem
--va-chip-sm-font-size 0.875rem
--va-chip-sm-content-padding 0 var(--va-gap-small, 0.5rem)
--va-chip-lg-height 2.5rem
--va-chip-lg-font-size 1.25rem
--va-chip-lg-content-padding 0 var(--va-gap-large, 0.5rem)