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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bananin/bcarousel

v1.0.43

Published

Carousel de Bananin

Downloads

256

Readme

Carousel con Bananin

Carousel vanilla de Bananin

Install

In head tag

<script src="https://unpkg.com/@bananin/bcarousel@latest/js/bCarrusel.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://unpkg.com/@bananin/bcarousel@latest/css/b-carrusel.css" />

Setting

Inside Html body:

<!-- html -->
<div id="bCar">               <!-- parent div with an id -->
    <itenes>                       <!-- tag itenes that will contain the carousel items -->
        <div class="item">   <!-- div with class item and inside this what you want to be displayed -->
            <div>1</div>
        </div>
        <div class="item"><div>2</div></div>
        <div class="item"><div>3</div></div>
        <div class="item"><div>4</div></div>
        <div class="item"><div>5</div></div>
        <div class="item"><div>6</div></div>
        <div class="item"><div>7</div></div>
        <div class="item"><div>8</div></div>
        <div class="item"><div>9</div></div>
        <div class="item"><div>n</div></div>
    </itenes>
</div>

Javascript code:

//Javascript
var mCar=new mCarrusel({
    //required
    id:"bCar",              //id that was used in the parent div

    //optional
    margin:10,              //space that will have between items by default 0 (both horizontal and vertical)
    auto:0,                 //time in seconds to automatically go to the next item by default 0 (0 does not play automatically)
    vert:false,             //If the carousel renders vertically; by default false
    vertr: [{m:x,v:true}],  //You can specify specific sizes to make the carousel vertical or horizontal [{m:px minimum container,v:boolean (vertical=true,horizontal=false)}]; by default null
    puntos:true,            //the points you have at the bottom as pagination (dots); by default false
    nav:"normal",           //previous and next bottom buttons by default no, "no":no navs, "normal":bottom navs,"centro":horizontal centering,"interno":inside items
    wheel:true,             //if the carousel can be manipulated with the mouse wheel; by default false
    fill:false,             //makes sure to fill the entire container space so no gaps are visible; by default false
    center:true,            //wrap content to be centered (doesn't work if fill is true); defaults to false
    items:2,                //items that are displayed by default in the allocated space
    filas:2,                //rows that the default carousel will have 1 (only applies if the horizontal carousel is shown)
    cercano:{w:300,h:100},  //if you want it to automatically calculate the sizes of the items in width (w) and height (h), for it to work you must not specify anything in responsive
    responsive:[{m:0,i:2},{m:400,i:2},{m:1400,i:3}],//changes according to the space that the carousel has when it is horizontal (not full screen) [{m:px minimum of the container,i:items to show}] by default null
    loop:"rewind",          //loop effect, "no"=when reaching the end you must return manually, "rewind": after the last element returns to the beginning, "loop": creates an infinite loop (BETA)
    autow:true,             //use the best possible size (beta)
    change:cambia           //callback for when the current item changes; by default null
}).refrescar();

function cambia(x){
    console.log("slide "+x);
}

//to update the carousel
mCar.refrescar();

Methods:

//to update the carousel
mCar.refrescar();

//to change it to vertical
mCar.vertical(true);

License

MIT

Sponsor

With your help I can continue paying the server <3