0.0.7 • Published 4 years ago

@jhwc/accessible-accordian-web-component v0.0.7

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

Accessible Accordian

A simple, accessible, light-weight Web component written in pure JavaScript, allowing the easy creation of accordion-type components. Use one of our themes or apply your own. It's your choice!

Installation

Install via NPM

npm install @jhwc/accessible-accordian-web-component

Import it into your JavaScript

import "@jhwc/accessible-accordian-web-component"

Usage

The component comes in three variants, which can be enabled using the following attributes respectively: default, bbc and simply, no attribute (no styling will be applied).

<jhwc-accordian default>
    <span class="toggle-box__title" slot="title">
        I am a nice neat title! (click me to toggle the box)
    </span>
    <div class="toggle-box__content" slot="content">
        Here is some toggle-able content!
    </div>
</jhwc-accordian>

jhwc-accordian component

<jhwc-accordian bbc>
    <span class="toggle-box__title" slot="title">
        I am a nice neat title! (click me to toggle the box)
    </span>
    <div class="toggle-box__content" slot="content">
        Here is some toggle-able content!
    </div>
</jhwc-accordian>

jhwc-accordian component

<jhwc-accordian>
    <span class="toggle-box__title" slot="title">
        I am a nice neat title! (click me to toggle the box)
    </span>
    <div class="toggle-box__content" slot="content">
        Here is some toggle-able content!
    </div>
</jhwc-accordian>

Requirements

  • ES6 import
  • Nothing!
0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago