All Projects → fancyapps → ui

fancyapps / ui

Licence: other
JavaScript UI component library, includes the latest Fancybox

Programming Languages

javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
HTML
75241 projects

Projects that are alternatives of or similar to ui

react-gallery-carousel
Mobile-friendly gallery carousel 🎠 with server side rendering, lazy loading, fullscreen, thumbnails, touch, mouse emulation, RTL, keyboard navigation and customisations.
Stars: ✭ 178 (-19.82%)
Mutual labels:  lightbox, carousel
Ngx Gallery
Angular Gallery, Carousel and Lightbox
Stars: ✭ 417 (+87.84%)
Mutual labels:  lightbox, carousel
fancybox
jQuery lightbox script for displaying images, videos and more. Touch enabled, responsive and fully customizable.
Stars: ✭ 7,261 (+3170.72%)
Mutual labels:  lightbox, fancybox
ngx-slick-carousel
Angular 11+ wrapper for slick plugin
Stars: ✭ 82 (-63.06%)
Mutual labels:  carousel
vue-piece-slider
animated slides in a fragmented look 🐞🌳✡️📐
Stars: ✭ 95 (-57.21%)
Mutual labels:  carousel
react-native-image-page
react-native image-carousel with zoom-pan gestures and full-screen support, work on both iOS and Android
Stars: ✭ 19 (-91.44%)
Mutual labels:  carousel
react-flickity-component
A React.js component for using @desandro's Flickity
Stars: ✭ 258 (+16.22%)
Mutual labels:  carousel
react-cool-virtual
😎 ♻️ A tiny React hook for rendering large datasets like a breeze.
Stars: ✭ 1,031 (+364.41%)
Mutual labels:  carousel
tobii
An accessible, open-source lightbox with no dependencies
Stars: ✭ 132 (-40.54%)
Mutual labels:  lightbox
hes-gallery
Light, dependency free, responsive gallery script
Stars: ✭ 27 (-87.84%)
Mutual labels:  lightbox
ngx-glide
Angular wrapper component of Glide carousel library
Stars: ✭ 22 (-90.09%)
Mutual labels:  carousel
SRCarouselView
A carousel view that only uses two UIImageView to achieve infinite carousel.
Stars: ✭ 56 (-74.77%)
Mutual labels:  carousel
vue-it-bigger
A simple image / (YouTube) video lightbox component for Vue.js.
Stars: ✭ 174 (-21.62%)
Mutual labels:  lightbox
skeleton-carousel
Carousel component. Horizontal and vertical swipe navigation
Stars: ✭ 31 (-86.04%)
Mutual labels:  carousel
vue-tinybox
🌌 A slick, yet tiny lightbox gallery for Vue.js
Stars: ✭ 93 (-58.11%)
Mutual labels:  lightbox
vue-carousel
Infinite image carousel built with Vue.js
Stars: ✭ 43 (-80.63%)
Mutual labels:  carousel
react-carousel-minimal
React.js Responsive Minimal Carousel
Stars: ✭ 76 (-65.77%)
Mutual labels:  carousel
svelte-commerce
Svelte ecommerce - Headless, Authentication, Cart & Checkout, TailwindCSS, Server Rendered, Proxy + API Integrated, Animations, Stores, Lazy Loading, Loading Indicators, Carousel, Instant Search, Faceted Filters, Typescript, Open Source, MIT license. 1 command deploy to your own server, 1 click deploy to netlify.
Stars: ✭ 695 (+213.06%)
Mutual labels:  carousel
mini-rpc
Spring + Netty + Protostuff + ZooKeeper 实现了一个轻量级 RPC 框架,使用 Spring 提供依赖注入与参数配置,使用 Netty 实现 NIO 方式的数据传输,使用 Protostuff 实现对象序列化,使用 ZooKeeper 实现服务注册与发现。使用该框架,可将服务部署到分布式环境中的任意节点上,客户端通过远程接口来调用服务端的具体实现,让服务端与客户端的开发完全分离,为实现大规模分布式应用提供了基础支持
Stars: ✭ 221 (-0.45%)
Mutual labels:  lightbox
react-google-photo
React lightbox component using the google photo style
Stars: ✭ 18 (-91.89%)
Mutual labels:  lightbox

Fancyapps UI

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:

npm install @fancyapps/ui
// or
yarn add  @fancyapps/ui

Import one or more components:

import { Fancybox, Carousel, Panzoom } from "@fancyapps/ui";

Import the appropriate CSS file, example:

import "@fancyapps/ui/dist/fancybox.css";

CDN

A pre-bundled scripts that contain components are available on CDN.

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.

<script src="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox.umd.js"></script>

Or use ES6 import:

<script type="module">
  import { Fancybox } from "https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox.esm.js";
</script>

Remember to include the appropriate CSS file, example:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox.css" />

Usage

Fancybox

There are two ways to use Fancybox.

Declarative

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.

<a href="https://lipsum.app/id/1/1024x768" data-fancybox="gallery" data-caption="Optional caption">
  Image
</a>
<a href="http://media.w3.org/2010/05/sintel/trailer.mp4" data-fancybox>
  Video
</a>
<a
  href="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d10500.902039411158!2d2.2913514905137315!3d48.85391001859112!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1slv!2slv!4v1622011463926!5m2!1slv!2slv"
  data-fancybox
  data-type="iframe"
  data-preload="false"
  data-width="640"
  data-height="480"
>
  Iframe
</a>
<button data-fancybox data-src="#dialog-content">
  HTML element
</button>

<div id="dialog-content" style="display:none;">
  <h2>Hello, world!</h2>
  <p>
    <input type="text" value="See if changes remain after closing the dialog" />
  </p>
</div>

Customize options:

Fancybox.bind("[data-fancybox]", {
  // Your options go here
});

Programmatic

// Image gallery
var gallery = [
  {
    src: "https://lipsum.app/id/2/800x600",
    thumb: "https://lipsum.app/id/2/80x80",
    caption: "First image",
  },
  {
    src: "https://lipsum.app/id/3/800x600",
    thumb: "https://lipsum.app/id/3/80x80",
    caption: "Second image",
  },
  {
    src: "https://lipsum.app/id/4/800x600",
    thumb: "https://lipsum.app/id/4/80x80",
    caption: "Third image",
  },
];

Fancybox.show(gallery, {
  // Your options go here
});

// HTML element
Fancybox.show([{ src: "#dialog-content", type: "inline" }]);

// A copy of HTML element
Fancybox.show([{ src: "#dialog-content", type: "clone" }]);

// Any HTML content
Fancybox.show([{ src: "<p>Lorem ipsum dolor sit amet.</p>", type: "html" }]);

Carousel

Add HTML markup

<div id="myCarousel" class="carousel">
  <div class="carousel__slide">1</div>
  <div class="carousel__slide">2</div>
  <div class="carousel__slide">3</div>
</div>

Initialise Carousel

const myCarousel = new Carousel(document.querySelector("#myCarousel"), {
  // Your options go here
});

Optionally, use CSS to customize container, navigation elements and slides

.carousel {
  color: #170724;

  --carousel-button-bg: #fff;
  --carousel-button-shadow: 0 2px 1px -1px rgb(0 0 0 / 20%), 0 1px 1px 0 rgb(0 0 0 / 14%), 0 1px 3px 0 rgb(0 0 0 / 12%);

  --carousel-button-svg-width: 20px;
  --carousel-button-svg-height: 20px;
  --carousel-button-svg-stroke-width: 2.5;
}

.carousel__slide {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 80%;
  height: 160px;
  margin-right: 6px;

  background-color: #eee;
  border-radius: 6px;
}

Panzoom

Add HTML markup

<div id="myPanzoom" class="panzoom">
  <img class="panzoom__content" src="https://lipsum.app/id/3/2000x1500" alt="" />
</div>

Initialise Panzoom

const myPanzoom = new Panzoom(document.querySelector("#myPanzoom"), {
  // Your options go here
});

Optionally, use CSS to customize container

.panzoom {
  width: 400px;
  height: 300px;
}

License

This is commercial software. See LICENSE.md for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].