7

GitHub - thepassle/generic-components: A collection of generic web components wi...

 3 years ago
source link: https://github.com/thepassle/generic-components/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

generic-components

A collection of generic web components with a focus on:

  • mens Accessibility
  • building_construction Easy to use
  • art Easy to style

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 <button> 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:

npm i --save @generic-components/components

And imported in your code via ES imports:

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

<script src="https://unpkg.com/@generic-components/components@latest/switch.js" type="module"></script>
<generic-switch></generic-switch>

Collection


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK