@a11y-kit/vue-tabs 中文文档教程

发布于 5年前 浏览 30 项目主页 更新于 3年前

@a11y-kit/vue-tabs

显示当前包大小的徽章 徽章显示当前版本 徽章显示当前版本 徽章显示当前版本 Badge displaying current release

一套无样式组件,可以是用于构建可访问的选项卡界面。 实现尽可能接近 WCAG 示例尽可能在 Vue 环境中友好地使用它。

????完整文档

Installation

yarn add @a11y-kit/vue-tabs

npm i @a11y-kit/vue-tabs

Usage

<template>
  <TabWrapper v-model="activeTab">

    <TabList label="Animals">
      <TabActivator tab="dogs">Dogs</TabActivator>
      <TabActivator tab="cats">Cats</TabActivator>
    </TabList>

    <TabPanel tab="dogs">
      Dogs are pretty cool.  Here's some info about them.
    </TabPanel>
    <TabPanel tab="cats">
      Cats are pretty neat too.  Here's some stuff about them!
    </TabPanel>
  </TabWrapper>
</template>

<script>
import { TabActivator, TabList, TabPanel, TabWrapper } from '@a11y-kit/vue-tabs'

export default {
  components: { TabActivator, TabList, TabPanel, TabWrapper },

  data() {
    return {
      activeTab: ''
    }
  }
}
</script>

????完整文档 | 更多示例

@a11y-kit/vue-tabs

Badge displaying current bundle size Badge displaying current release Badge displaying current release Badge displaying current release Badge displaying current release

A suite of unstyled components which can be used to build an accessible tabs interface. The implementation is kept as close to the WCAG example as possible, while making it friendly to use in a Vue environment.

????Full documentation

Installation

yarn add @a11y-kit/vue-tabs

or

npm i @a11y-kit/vue-tabs

Usage

<template>
  <TabWrapper v-model="activeTab">

    <TabList label="Animals">
      <TabActivator tab="dogs">Dogs</TabActivator>
      <TabActivator tab="cats">Cats</TabActivator>
    </TabList>

    <TabPanel tab="dogs">
      Dogs are pretty cool.  Here's some info about them.
    </TabPanel>
    <TabPanel tab="cats">
      Cats are pretty neat too.  Here's some stuff about them!
    </TabPanel>
  </TabWrapper>
</template>

<script>
import { TabActivator, TabList, TabPanel, TabWrapper } from '@a11y-kit/vue-tabs'

export default {
  components: { TabActivator, TabList, TabPanel, TabWrapper },

  data() {
    return {
      activeTab: ''
    }
  }
}
</script>

????Full documentation | More examples

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文