Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/firstandthird/faqs
- Owner: firstandthird
- License: mit
- Created: 2020-12-21T13:44:54.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-23T17:45:29.000Z (almost 4 years ago)
- Last Synced: 2024-04-24T23:02:24.870Z (9 months ago)
- Topics: accessibility, domodule, faqs
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
FAQs
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_