npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@crystalui/angular-lightbox

v1.1.8

Published

Angular library for viewing images in a pop-up window with touch screen support.

Downloads

1,787

Readme

Lightbox for Angular

A simple, responsive lightbox component.

Demo

http://ivylab.space/lightbox

Installation

Install npm package for Angular version 8+:

npm i @crystalui/angular-lightbox --save

For Angular 7 and earlier:

npm i @crystalui/[email protected] --save

Import module:

import {CrystalLightboxModule} from '@crystalui/angular-lightbox';

@NgModule({
    imports: [CrystalLightboxModule]
})

Usage

You can cluster images into group.

<div lightbox-group>
    <img src="path_to_image" lightbox [fullImage]="{path: 'path_to_fullimage'}" />
</div>

Or keep them as separate images.

<img src="path_to_image" lightbox [fullImage]="{path: 'path_to_fullimage'}" />

You don’t need to specify the path to the large image, it’ll work either way.

<img src="path_to_image" lightbox />

Properties

imageMaxHeight: string = "100%"
// Maximum image height.

imageMaxWidth: string = "100%"
// Maximum image width.

counter: boolean = false
// Image counter.

counterSeparator: string = "/"
// The text separator counter.

backgroundColor: "black" | "white" = "black"
// Background color. Inverts the black and white colors of the controls and the background.

backgroundOpacity: number = "0.85"
// Lightbox background opacity.

animationDuration: number = "400"
// Speed of opening and closing animation.

animationTimingFunction: string = "cubic-bezier(0.475, 0.105, 0.445, 0.945)"
// Smooth opening and closing animation function.

closeButtonText: string = "Close"
// The Close button text.

hideThumbnail: boolean = true
// Hide the thumbnail when opening the lightbox.

disable: boolean = false
// Disable the lightbox.

Events

thumbnail:click
{type: "thumbnail:click"}
// Click on the thumbnail.

show-state:initial
{type: "show-state:initial"}
// Preparing styles for starting the lightbox display animation and the preloader display.

show-state:animation
{type: "show-state:animation"}
// Starting the lightbox display animation.

show-state:animation-end
{type: "show-state:animation-end"}
// Ending the lightbox display animation.

closing-state:initial
{type: "closing-state:initial"}
// Preparing styles for starting the lightbox closing animation.

closing-state:animation
{type: "closing-state:animation"}
// Starting the lightbox closing animation.

closing-state:animation-end
{type: "closing-state:animation-end"}
// Ending the lightbox closing animation.

Browser support

| NAME | VERSION | |------------------------|-------------------------| | Chrome / Chrome for Android | 50+ / Android 4.4+ | | FireFox | 48+ | | Opera | 44+ | | Safari / iOS Safari | 10.1, 11.1 / iOS 9+ | | Internet Explorer | Edge 15+ |