@exadel/esl
Version:
Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components
137 lines (106 loc) • 7.79 kB
Markdown
# Exadel Smart Library
<p align="center">
<img width="300" height="300" src="https://github.com/exadel-inc/esl/blob/main/docs/images/logo.png?raw=true">
</p>
[](https://www.npmjs.com/package/@exadel/esl)
[](https://www.npmjs.com/package/@exadel/esl)
[](https://github.com/exadel-inc/esl/releases/latest)
[](https://github.com/exadel-inc/esl/actions/workflows/validate.yml)
[](./README.md)
Exadel Smart Library (**ESL**) is an open-source **lightweight** and **flexible** UI component library based on web components.
Increase your site’s performance by building UX models with custom components from our library.
The ESL web UI components library is compatible with any framework, which makes ESL ideal for projects regardless of
their tech stack.
<p align="center">
<a href="https://esl-ui.com"><img src="../../docs/images/welcome-btn.png" alt="Visit our UI component library website with examples" width="409" height="75" title="Click to visit our UI component library website with examples"/></a>
</p>
## Table of Contents
- [Overview](#overview)
- [Library Structure](#library-structure)
- [⏎ Monorepo Root](https://github.com/exadel-inc/esl)
- [Contribute to ESL](https://github.com/exadel-inc/esl#development-information-for-contributors)
---
## Overview
Exadel Smart Library, or ESL for short, is a free web UI components library that reduces routine tasks and lets
you efficiently create websites with multiple web components at hand.
When you’re deciding which is the best UI component library for your site, keep in mind that it should be compatible
with other libraries and frameworks — like ESL is!
ESL UI component library allows you to access a toolkit full of reusable components.
You can utilize these web components to complement projects or build your infrastructure from the ground up using
ESL alone. Our web UI components library is high-quality, so the only thing you’ll have to focus on is applying styles
to meet your project needs.
ESL is based solely on Web API and ECMAScript 6 features, which let our web UI components library work
well across all modern browsers such as Firefox, Chrome, Safari, Opera, and Edge.
## Library Structure
While building the UI component library, we included components, form components, and utilities that solve complex
project architecture problems and comply with the DRY principle.
See the rundown of web components and read the specs.
### Library Core
With our UI component library, you get flexible syntax sugar meant for building on top of basic components and
controlling their life cycle.
- ##### [ESL Base Element](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-base-element/README.md)
- ##### [ESL Mixin Element](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-mixin-element/README.md)
- ##### [ESL Media Query](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-media-query/README.md)
- ##### [ESL Traversing Query](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-traversing-query/README.md)
- ##### [ESL Event Listener](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-event-listener/README.md)
- ##### [ESL Utils](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-utils/README.md)
### Components
Our HTML UI component library provides you with all the elements you’ll need to construct UX modules
with excellent performance.
- ##### [ESL A11yGroup](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-a11y-group/README.md) (beta)
- ##### [ESL Alert](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-alert/README.md)
- ##### [ESL Animate](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-animate/README.md)
- ##### [ESL Carousel](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-carousel/README.md)
- ##### [ESL Footnotes](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-footnotes/README.md)
- ##### [ESL Image Utils](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-image-utils/README.md)
- ##### [ESL Image (Legacy)](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-image/README.md)
- ##### [ESL Media](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-media/README.md)
- ##### [ESL Panel](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-panel/README.md)
- ##### [ESL Panel Group](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-panel-group/README.md)
- ##### [ESL Popup](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-popup/README.md) (beta)
- ##### [ESL Related Target](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-related-target/README.md)
- ##### [ESL Scrollbar](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-scrollbar/README.md)
- ##### [ESL Select](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-forms/esl-select/README.md) (beta)
- ##### [ESL Select List](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-forms/esl-select-list/README.md) (beta)
- ##### [ESL Share](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-share/README.md)
- ##### [ESL Tab and Tabs](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-tab/README.md)
- ##### [ESL Toggleable](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-toggleable/README.md)
- ##### [ESL Trigger](https://github.com/exadel-inc/esl/blob/HEAD/packages/esl/src/esl-trigger/README.md)
---
## Installation Guide
<a name="instalation_guide"></a>
0. Preconditions:
- Make sure you have all needed polyfills to support browsers from your browser-support list.
See [Browser support & Polyfills](https://github.com/exadel-inc/esl/blob/HEAD/docs/BROWSER_SUPPORT.md) for details.
- Use a bundler to build your project. Currently, only ES6 modules are available for consumption.
1. Install [esl npm dependency](https://www.npmjs.com/package/@exadel/esl):
```
npm i @exadel/esl --save
```
2. Import Components/Modules you need:
```javascript
import '@exadel/esl/modules/esl-component/core';
```
- `core` module entry usually represents main part of the module;
- include optional sub-features directly. See component's documentation for details.
```javascript
import '@exadel/esl/modules/esl-media/providers/iframe-provider';
```
- Some modules contain cumulative `all` entries.
- Styles are distributed in two versions:
- 'ready to use' `core.css` or `core.less`
- mixin version `core.mixin.less` for custom tagname definition
3. [Optional] Setup environment configuration, e.g. custom screen breakpoints:
```javascript
import {ESLScreenBreakpoints} from '@exadel/esl/modules/esl-media-query/core';
// define XS screen breakpoint for up to 800px screen width
ESLScreenBreakpoints.addCustomBreakpoint('XS', 1, 800);
```
4. Register web components via `register` static method call:
```javascript
ESLMedia.register();
```
*You can pass custom tag name to 'register' function, but use this option only in an exceptional situation.*
---
**Exadel, Inc.**
[](https://exadel.com)