Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/firstandthird/faqs

Accessible FAQs module
https://github.com/firstandthird/faqs

accessibility domodule faqs

Last synced: 3 days ago
JSON representation

Accessible FAQs module

Awesome Lists containing this project

README

        

FAQs



Lint Status

NPM

Accessible FAQs module.

## Installation

```sh
npm install @firstandthird/faqs
```

## Usage

In your project import the library:

```javascript
import '@firstandthird/faqs'

// or

import Faqs from '@firstandthird/faqs'
```

## Module Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `animateHeight` | _{Boolean}_ | `false` | Enable expand/collapse height animation (requires CSS, [see example](styles.css)) |
| `closeOthers` | _{Boolean}_ | `true` | Only allows one expanded element at a time |
| `hash` | _{Boolean}_ | `true` | Expand elements whose ID matches the current URL hash |

## Example markup

```html



Question 1?


Lorem ipsum dolor sit amet consectetur, adipisicing elit.


```

Full [example here](./example/index.html).

---

_A [First + Third](https://firstandthird.com) Project_