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

@snack-uikit/scroll

v1.0.1

Published

`npm i @snack-uikit/scroll`

Readme

Scroll

Installation

npm i @snack-uikit/scroll

Changelog

Description

  • Пакет @snack-uikit/scroll предоставляет компонент Scroll для создания прокручиваемых контейнеров с кастомизируемыми скроллбарами на основе библиотеки OverlayScrollbars.
  • Компонент поддерживает различные размеры скроллбаров (size: "s" | "m") и стратегии их скрытия (barHideStrategy): всегда показывать, скрывать при уходе курсора, показывать только при скроллинге или при движении курсора.
  • Позволяет настроить автоскролл при монтировании и изменении размера контента в направлении вниз (autoscrollTo: "bottom") или вправо (autoscrollTo: "right"), что удобно для чатов, логов и динамически обновляемого контента.
  • Поддерживает настройку возможности изменения размера контейнера (resize): запрет изменения, только горизонтальное, только вертикальное или в обеих координатах.
  • Предоставляет возможность отключить клик по скроллбару для прокрутки (clickScrolling) и сделать скроллбары недоступными для взаимодействия мышью (untouchableScrollbars).
  • Компонент возвращает ref на viewport-элемент и поддерживает колбэки для событий скролла (onScroll) и инициализации (onInitialized).
  • Figma: Scroll.

Example

import { Scroll } from '@snack-uikit/scroll';
import { Card } from '@snack-uikit/card';

function Example() {
  return (
    <Scroll
      size="m"
      barHideStrategy="leave"
      autoscrollTo="bottom"
      onScroll={(event) => console.log('Scrolled', event)}
    >
      <div>
        {Array.from({ length: 10 }).map((_, index) => (
          <Card key={index} header={<Card.Header title={`Card ${index + 1}`} />} outline>
            Контент карточки с прокруткой
          </Card>
        ))}
      </div>
    </Scroll>
  );
}

setNonce

setNonce

Установить nonce атрибут для инлайн стилей.

Scroll

Props

| name | type | default value | description | |------|------|---------------|-------------| | className | string | - | CSS-класс | | size | enum Size: "s", "m" | m | Размер скролбаров | | clickScrolling | boolean | true | Скролить ли по клику в скроллбар. | | autoscrollTo | enum AutoscrollTo: "bottom", "right" | - | Включает автоскрол при маунте и изменении размера контента: - bottom - автоскрол вниз, - right - автоскрол вправо, | | barHideStrategy | enum BarHideStrategy: "never", "leave", "scroll", "move" | leave | Управление скрытием скролл баров: - Never - показывать всегда - Leave - скрывать когда курсор покидает компонент - Scroll - показывать только когда происходит скроллинг - Move - показывать при движении курсора над компонентом | | onScroll | (event?: Event) => void | - | Колбек события скрола. | | resize | enum Resize: "none", "horizontal", "vertical", "both" | none | Настройка возможности регулировать Scroll-контейнер: - None - нельзя изменять размер - Horizontal - можно изменять размер только по горизонтали - Vertical - можно изменять размер только по вертикали - Both - можно изменять размер в обеих координатах | | untouchableScrollbars | boolean | - | Отключает возможность взаимодействовать со скролбарами мышью. | | paddingAbsolute | boolean | - | Должны ли паддинги быть абсолютными | | onInitialized | () => void | - | Коллбэк вызывающийся на инициализацию скролла | | ref | LegacyRef<HTMLElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} | | key | Key | - | |