Svrollbar screenshot

Svrollbar

Author Avatar Theme by Daylilyfield
Updated: 17 Apr 2022
85 Stars

simple custom scrollbar made by svelte

Overview:

Svrollbar is a custom scrollbar made by Svelte. It provides the ability to replace the default window scrollbar, create scrollable areas within a website, replace overflow-based scrollbars, integrate with third-party libraries, customize transitions and styles, and control scrollbar visibility. It offers two components, Svrollbar.svelte and Svroller.svelte, that can be used with or without Svelte.

Features:

  • Replace Window Scrollbar: Easily replace the default window scrollbar with a custom scrollbar.
  • Make Scrollable Area: Create scrollable areas within a part of your website.
  • Replace Overflow-based Scrollbar: Use Svrollbar.svelte when you already have a scrollable viewport or contents.
  • Integrate 3rd Party Libraries: Seamlessly integrate Svrollbar into virtual list implementations such as svelte-virtual-list or svelte-tiny-virtual-list.
  • Components Specification: Check the components specification for detailed information.
  • Customize Transition: Replace the default fade animation with your own transition.
  • Customize Style: Customize the appearance of the scrollbar using CSS variables.
  • Customize Scrollbar Visibility: Control the visibility of the scrollbar with configurable properties.

Installation:

To install Svrollbar, you can follow these steps:

  1. Install the package using npm:
npm install svrollbar
  1. Import Svrollbar.Svelte and Svroller.Svelte components into your project:
import { Svrollbar, Svroller } from 'svrollbar';
  1. Use the components in your Svelte templates:
<Svrollbar />
<Svroller />

Summary:

Svrollbar is a powerful custom scrollbar solution for Svelte applications. It offers a range of features including replacing the default window scrollbar, creating scrollable areas, integrating with third-party libraries, customizing transitions and styles, and controlling scrollbar visibility. With easy installation and usage, Svrollbar provides a convenient way to enhance the user experience of your web applications.