Socket
Socket
Sign inDemoInstall

tailwind-modern-scroll

Package Overview
Dependencies
126
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tailwind-modern-scroll

It's a customizable scroll bar plugin for the tailwind css framework.


Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Tailwind Modern Scrollbars

This plugin provides dynamic directives that allow you to format scrollbars and scroll thumbs in your projects that use the tailwind framework.

installation

First, you have to download the plugin to your project.

npm i tailwind-modern-scroll -D

configuration

You need to add the plugin to the main tailwind configuration file.

your-project/tailwind.config.js

const  modernScroll  =  require( "tailwind-modern-scroll" );

module.exports  =
{
	// other configs...
	
	plugins:
	[
		modernScroll,
		// ...other plugins
	],
	
	// ...other configs
}

Usage

If you prefer to use VS Code and installed tailwind intellisense extension our directives will suggest to you in it.

base class

First of all you have to add modern-scroll base class to your items that have scroll bars. This provides the basic features that meet the minimum requirements for the scrollbar to look modern.

<div class="h-96 w-full overflow-auto modern-scroll"></div>

coloring

You can change both the scroll bar background and the scroll thumb background colors with theme colors or direct colors.

<div class="... modern-scroll scroll-sky-100 thumb-[#fc0]"></div>

You can even use opacity modifiers too.

<div class="... scroll-[#000]/20 thumb-[#000]/20"></div>

width

You can only change scroll wrapper width and not thumb's.

<div class="... scroll-w-10"></div>

thumb height limiting

You can specify the minimum and maximum height of the slider.

<div class="... thumb-min-h-10 thumb-max-h-20"></div>

rounding

You can round the edges both of the scroll wrapper and the thumb.

<div class="... scroll-round-full thumb-round-full"></div>

Keywords

FAQs

Last updated on 07 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc