# Tiles
Tiles allow the user to select one or more options from a visually impactful group. The component can be single or multi select, with each tile appearing as clickable boxes of content.
# Usage
Using v-model
we can define a group of tiles and keept track of the selected tile. Clicking a title selects it or unselects it if it is already selected.
Use the title
prop or slot to give your tile a title.
Use the description
prop or slot to give your tile a description.
# Direction
Use the directions
prop to set the orientation of tiles. This is vertical
by default but can also be horizontal
.
# Multiple Selections
Define your v-model
as an array to alow multiple selections.
# Mandatory
Use the mandatory
prop to require at least one selection at all times. This works with single and multiselect tiles. You will need to supply an initial value to your v-model
or you will incur an error.
# Disabled
Add the disabled attribute to disable a tile or the whole group, giving it a disabled appearance and preventing it from being clicked.
# Padding
Use the padding
prop to adjust the padding on your tiles. The default is sm
and the options are 2xs
, xs
, sm
or md
.
# Hide Controls
Use the hide-controls
prop to hide the radio/checkbox controls for a clean or custom layout.
# Stacked
Use the stacked
prop to set tiles stacked vertically.
# Slots
Slot | Description |
---|---|
title | Used to pass in a title, instead of the title prop |
description | Used to pass in a description, instead of the description prop |
default | Used for custom content. Renders after the title & description |
# Tiles Events
Event | Payload | Description |
---|---|---|
@update | The new value of the tiles | Fired whenever the value changes |
# Tile Events
Event | Payload | Description |
---|---|---|
@click | The value of the tile | Fired whenever the tile is clicked |
← Textarea Timepicker →