Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thepassle/generic-components
A collection of generic web components with a focus on accessibility, and ease of use
https://github.com/thepassle/generic-components
Last synced: 10 days ago
JSON representation
A collection of generic web components with a focus on accessibility, and ease of use
- Host: GitHub
- URL: https://github.com/thepassle/generic-components
- Owner: thepassle
- License: mit
- Created: 2020-04-26T14:01:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-21T13:25:46.000Z (over 2 years ago)
- Last Synced: 2024-04-13T21:08:18.420Z (7 months ago)
- Language: JavaScript
- Homepage: https://genericcomponents.netlify.app/
- Size: 977 KB
- Stars: 553
- Watchers: 14
- Forks: 31
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-web-components - generic-components - Collection of generic web components with a focus on accessibility, and ease of use. (Guides / Examples)
README
# generic-components
A collection of generic web components with a focus on:
- 🚹 Accessibility
- 🏗 Easy to use
- 🎨 Easy to style## Goal
The goal of this project is to create a common library of generic web components, that are accessible, framework agnostic, easy to style, and easy to consume.
All components in these repo extend from HTMLElement and dont use any libraries or framework.
You can think of these components like using a native `` element, you get all the functionality, and accessibility, keyboard navigation, etc., for free, you just have to style the button to your liking.
You can use these components to build an app, or compose them and build your own components with them.
## Usage
### Via NPM
Components can be installed via NPM:```bash
npm i --save @generic-components/components
```And imported in your code via ES imports:
```js
import '@generic-components/components/switch.js';
```### Via CDN
Alternatively you can load the components from a CDN and drop them in your HTML file as a script tag```html
```
```html
```
## Collection
| Component | Demo | Spec | Status |
|---------------------------------------------------------------|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|---------------|
| [generic-accordion](/generic-accordion/README.md) | [demo](https://genericcomponents.netlify.app/generic-accordion/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-practices/#accordion) | ✅ |
| [generic-alert](/generic-alert/README.md) | [demo](https://genericcomponents.netlify.app/generic-alert/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-practices/#alert) | ✅ |
| [generic-dialog](/generic-dialog/README.md) | [demo](https://genericcomponents.netlify.app/generic-dialog/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-practices/#dialog_modal)| ✅ |
| [generic-disclosure](/generic-disclosure/README.md) | [demo](https://genericcomponents.netlify.app/generic-disclosure/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-practices/#disclosure) | ✅ |
| [generic-listbox](/generic-listbox/README.md) | [demo](https://genericcomponents.netlify.app/generic-listbox/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-practices/#Listbox) | ✅ |
| [generic-radio](/generic-radio/README.md) | [demo](https://genericcomponents.netlify.app/generic-radio/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-practices-1.1/#radiobutton) | ✅ |
| [generic-skiplink](/generic-skiplink/README.md) | [demo](https://genericcomponents.netlify.app/generic-skiplink/demo/index.html) | [WebAIM](https://webaim.org/techniques/skipnav/) | ✅ |
| [generic-spinner](/generic-spinner/README.md) | [demo](https://genericcomponents.netlify.app/generic-spinner/demo/index.html) | | ✅ |
| [generic-switch](/generic-switch/README.md) | [demo](https://genericcomponents.netlify.app/generic-switch/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-1.1/#switch) | ✅ |
| [generic-tabs](/generic-tabs/README.md) | [demo](https://genericcomponents.netlify.app/generic-tabs/demo/index.html) | [WAI-ARIA Practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel) | ✅ |
| [generic-visually-hidden](/generic-visually-hidden/README.md) | [demo](https://genericcomponents.netlify.app/generic-visually-hidden/demo/index.html) | [WebAIM](https://webaim.org/techniques/css/invisiblecontent/) | ✅ |