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

esenlerotogari

v4.1.2

Published

`esenlerotogari` is a Svelte carousel built for horizontally browsable content like cards, product rows, media rails, featured lists, and custom sliders.

Readme

esenlerotogari

esenlerotogari is a Svelte carousel built for horizontally browsable content like cards, product rows, media rails, featured lists, and custom sliders.

It helps you give users a smoother way to explore wide sets of content without building carousel logic from scratch. You can reveal partially hidden items, move page by page, jump to a specific card, and keep control over how the scroll aligns and animates.

Installation

pnpm add esenlerotogari

You can also install it with npm or yarn if that matches your project.

Basic Usage

<script lang="ts">
	import { expoOut } from 'svelte/easing';
	import { Carousel } from 'esenlerotogari';

	let carousel: Carousel;
	const items = Array.from({ length: 6 }, (_, i) => ({ title: `Card ${i + 1}` }));
</script>

<Carousel
	gap={16}
	padding={24}
	easingFunction={expoOut}
	easingDuration={500}
	onPageData={(data) => console.log(data)}
	bind:this={carousel}
>
	{#each items as item, i}
		<div style="width: 280px; height: 160px;" on:click={() => carousel.goTo(i + 1)}>
			{item.title}
		</div>
	{/each}
</Carousel>

<button on:click={() => carousel.goToPreviousPage()}>Previous</button>
<button on:click={() => carousel.goToNextPage()}>Next</button>

Props

| Prop | Type | Default | Description | | ---------------- | -------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------- | | gap | number | 0 | Gap between carousel items in pixels. | | padding | number | 0 | Safe padding on the left and right edges when calculating visibility and alignment. | | easingFunction | ((t: number) => number) \| undefined | undefined | Optional easing function for custom animated scrolling. If omitted, native smooth scrolling is used. | | easingDuration | number | 500 | Duration in milliseconds for custom eased scrolling. | | onPageData | (data) => void | () => {} | Called after initial mount and after programmatic goTo(...) navigation. |

Instance API

Bind the component with bind:this to access its methods.

goTo(index, forceAlign?)

Scrolls to a specific item using a 1-based index.

  • index: item number starting from 1
  • forceAlign: 'left' | 'right' | false, defaults to false

When forceAlign is omitted or set to false, the carousel only scrolls as much as needed to bring the item into view. When forceAlign is set to 'left' or 'right', the scroll position is fully aligned to that side of the target item.

goToNextPage()

Moves to the next calculated page.

goToPreviousPage()

Moves to the previous calculated page.

scrollTo(px)

Scrolls to a raw horizontal pixel offset.

getVisibleItems()

Returns the current item visibility state:

{
	visible: number[];
	hidden: number[];
	fullyVisible: number[];
	partiallyVisible: number[];
}

All item numbers are 1-based.

getPageData()

Returns the current pagination snapshot:

{
	totalPages: number;
	currentPage: number;
	currentPageFloat: number;
	maxItemsPerPage: number;
	pageProgress: number;
	canGoLeft: boolean;
	canGoRight: boolean;
}

Behavior Notes

  • The component renders children in a single horizontal flex row.
  • Direct children are set to flex-shrink: 0, so items keep their width.
  • For best results, give each child an explicit width or min-width.
  • Page calculations are based on how many items are fully visible in the viewport.
  • Item and page navigation use 1-based indexing, not 0-based indexing.