Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tailwind-scroll-behavior

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwind-scroll-behavior

Tailwind plugin to create scroll behavior classes

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

TailwindCSS Scroll Behavior Plugin

npm

This plugin generates scroll-behavior classes.

A scroll-smooth and scroll-auto class will be created.

It is recommended that you use scroll-smooth in combination with Tailwind's motion-safe variant. This will only enable smooth scrolling for users who have not specified they prefer reduced motion.

Installation

Add to your project via:

# Install using npm
npm install -D tailwind-scroll-behavior

# Install using yarn
yarn add -D tailwind-scroll-behavior

Add it to the plugins array of your Tailwind config.

plugins: [
  require('tailwind-scroll-behavior')(), // no options to configure
]

By default, this plugin works with the motion-safe and motion-reduce variants. However, you can customise the variants for the plugin, by adding to the variants section of your Tailwind config.

variants: {
	scrollBehavior: ['motion-safe', 'motion-reduce', 'responsive']
}

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 10 Jul 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc