Collection of task-oriented components that will make you more productive. Packed full of features that you and your clients will love.
Full docs with examples: https://fancyapps.com/docs/ui/quick-start/.
## Installation
### NPM
Use either `npm` or `yarn` as follows:
```bash
npm install @fancyapps/ui
// or
yarn add @fancyapps/ui
```
Import one or more components:
```jsx
import { Fancybox, Carousel, Panzoom } from "@fancyapps/ui";
```
Import the appropriate CSS file, example:
```jsx
import "@fancyapps/ui/dist/fancybox.css";
```
### CDN
A pre-bundled scripts that contain components are available on [CDN](https://www.jsdelivr.com/package/npm/@fancyapps/ui?path=dist).
> **_NOTE:_** Because Fancybox is build on top of both Carousel and Panzoom components, you only have to include `fancybox.umd.js` and all 3 components will be available through the `window` object.
Add a `data-fancybox` attribute to any element to enable Fancybox. Galleries are created by adding the same attribute `data-fancybox` value to multiple elements. Use `data-src` or `href` attribute to specify the source of the content. Add a `data-caption` attribute if you want to show a caption under the content.