Overview
The Pattern Library is a collection of self-contained web components based on the custom elements specification. These components are built using the lit-element base class, maintained by Google. The Pattern Library provides a set of reusable and plug-and-play components that can be easily integrated into web projects.
Features
- Self-contained web components based on the custom elements specification
- Built using the lit-element base class maintained by Google
- Exported to npm with two types of build artifacts: /dist/index.js and /lib/index.* in ES2019
- Supports component versioning, allowing different versions to coexist on the same web page
Installation
To install the Pattern Library components, follow these steps:
- Open your terminal and navigate to your project directory.
- Run the following command to install the components via npm:
npm install @pattern-library/components
- Once the installation is complete, you can import the desired components into your project:
import { AXAAccordion, AXAButton, AXACarousel } from '@pattern-library/components';
- You can then use the imported components like any other HTML element in your code:
<axa-accordion>
<!-- Accordion content here -->
</axa-accordion>
<axa-button>
Button text
</axa-button>
<axa-carousel>
<!-- Carousel content here -->
</axa-carousel>
Summary
The Pattern Library is a collection of reusable web components that are based on the custom elements specification and built using the lit-element base class maintained by Google. These components can be easily installed and used in your projects, allowing for modular development and easy integration. The Pattern Library also supports component versioning, enabling different versions to coexist on the same web page.