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

@chronos/b7-carousel

v3.0.4

Published

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg?style=flat-square)](https://www.webcomponents.org/element/balint777/b7-carousel) [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20

Downloads

16

Readme

Published on webcomponents.org Published on Vaadin Directory Stars on vaadin.com/directory

<b7-carousel>

b7-carousel is a carousel designed for real-world use. It is a simplistic approach to a functionally complete carousel element. The main design goal is to have a minimal performance footprint to be well fit for mobile devices. The element features

  • Native performance scrolling and paging
  • A trivial API
  • High level of customizability, with minimal assumptions to the use-cases
  • Touch Scrolling
  • Mouse scrolling
  • Keyboard scrolling
  • Responsive layout

Dependencies

Intersection Observer API

Basic b7-carousel demo

<b7-carousel style="height: 10em">
	<img src="http://placekitten.com/g/640/480">
	<img src="http://placekitten.com/g/480/640">
	<img src="http://placekitten.com/g/600/640">
	<img src="http://placekitten.com/g/300/400">
	<img src="http://placekitten.com/g/200/400">
	<img src="http://placekitten.com/g/500/200">
	<img src="http://placekitten.com/g/640/480">
	<img src="http://placekitten.com/g/480/640">
	<img src="http://placekitten.com/g/600/640">
	<img src="http://placekitten.com/g/300/400">
	<img src="http://placekitten.com/g/200/400">
	<img src="http://placekitten.com/g/500/200">
</b7-carousel>

Customized b7-carousel demo

<style>
	/**
	 * Just a custom chevron
	 */
	b7-carousel#customized .chevron {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 3em;
		color: black;
		font-size: 2em;
		font-family: monospace;
		transition: color 1s ease-in-out;
	}
	b7-carousel#customized .chevron:hover {
		color: #bbb;
	}
	
	/**
	 * The b7-carousel does not make any assumptions on the size, the
	 * type nor the number of items in the carousel, so you are free to
	 * style and compose them.
	 * There are a couble of things though you can not style. These
	 * values are explicitly controlled by b7-carousel
	 * - max-height
	 * - max-width
	 */
	b7-carousel#customized > .item {
		margin: 0 1em;
		box-shadow: 0 .1em 1.5em rgba(0,0,0,0.2);
		/* b7-carousel items are flex aligned to the center by default */
		align-self: center;
	}
	b7-carousel#customized > div.item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: flex-end;
	}

	/**
	 * Child elements of b7-carousel will receive a b7-visible class
	 * whenever they are visible on the sceen. You can use this property
	 * to create an enry-exit animation for your carousel items
	 */
	b7-carousel#customized > .item {
		opacity: 0;
		transform: perspective(10px) translateZ(-10px);
		transition:
			opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
			transform 1s cubic-bezier(0.075, 0.82, 0.165, 1);
	}
	b7-carousel#customized > .item.b7-visible {
		opacity: 1;
		transform: perspective(100px) translateZ(0px);
	}
	
</style>
<b7-carousel id="customized" style="height: 15em">
	<div slot="prev" class="chevron">&lt;</div>
	<div slot="next" class="chevron">&gt;</div>

	<img class="item" src="https://picsum.photos/100/100?image=10"/>
	<div class="item">
		<img src="https://picsum.photos/100/100?image=11"/>
		<p>The Rouge One</p>
	</div>
	<img class="item" src="https://picsum.photos/100/100?image=12"/>
	<img class="item" src="https://picsum.photos/100/100?image=13"/>
	<img class="item" src="https://picsum.photos/100/100?image=14"/>
	<img class="item" src="https://picsum.photos/100/100?image=15"/>
	<img class="item" src="https://picsum.photos/100/100?image=16"/>
	<ul class="item" style="padding: 2em">
		<li>I</li>
		<li>am</li>
		<li>a</li>
		<li>list</li>
	</ul>
	<img class="item" src="https://picsum.photos/100/100?image=17"/>
	<img class="item" src="https://picsum.photos/100/100?image=18"/>
	<img class="item" src="https://picsum.photos/100/100?image=19"/>
	<img class="item" src="https://picsum.photos/100/100?image=20"/>
</b7-carousel>

Development guide

Install the Polymer-CLI

First, make sure you have the Polymer CLI installed. Then run polymer serve to serve your element locally.

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.