# VToggle

Toggle the visibility of content. Useful for something like an FAQ page, for example. Includes ARIA attributes for expandable content and is keyboard friendly.


# Installation


// main.js
import Vue from "vue"
import { VToggle } from "vuetensils"

Vue.component("VToggle", VToggle)


// SomeComponent.vue
import { VToggle } from "vuetensils"

export default {
  components: {
  // ...

# Styled Example

  <VToggle label="test" class="styled">
    <template v-slot:label>
      Click here to open the toggle

    <div class="toggle-content">
      <p>Here is the content. Sweet!</p>
.vts-toggle__button {
  display: block;
  width: 100%;
  border: 0;
  padding: 5px;
  font-size: 18px;
  text-align: left;
  color: #fff;
  background-color: mediumseagreen;

.toggle-content {
  border: 1px solid #ccc;
  padding: 5px;

# Basic Usage

  <VToggle label="test">
    <template v-slot:label>

    content here

# Custom Classes

This component can accept a classes prop to cusomize the output HTML classes:

:classes="{ root: 'root-class', label: 'label-class', content: 'content-class' }"
Last Updated: 11/19/2019, 5:58:27 AM