Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-touch-drag-slider

> 编程语言
Open source

Touch and drag slider carousel component for React

191 stars0 likes1 views
WebsiteGitHub

About

Touch and drag slider carousel component for React

react-touch-drag-slider

Touch and drag slider carousel component for React

  • Touch friendly on mobile
  • Responsive to viewport resizing
  • Supports mouse drag by default
  • Simple API
  • Sizes to any size parent container
  • small bundle size with zero dependencies

Install

bash
npm i react-touch-drag-slider

Usage

…

Available Props

Prop Type Default Description
onSlideComplete (completedIndex: number) => void A function that gets called when finished
onSlideStart (startIndex: number) => void A function that gets called on start
activeIndex number 0 Set to start on this index or use state to update the current index
threshold number 100 A pixel value that must be dragged before slide snaps to position
transition number 0.3 The CSS snap duration in seconds (ignored when spring is enabled)
scaleOnDrag boolean false Should the individual slide scale while dragging
navigateOnArrowKeys boolean true Whether arrow keys navigate while the slider is focused
spring boolean false Settle with spring physics instead of a CSS transition
stiffness number 180 Spring stiffness (used when spring is enabled)
damping number 16 Spring damping (used when spring is enabled)
mass number 1 Spring mass (used when spring is enabled)

Docs & Examples

Full documentation, prop reference, and live demos are on the docs site:

  • Usage
  • Props
  • Examples
  • Accessibility

For agents and RAG pipelines, a machine-readable summary is available at https://react-touch-drag-slider.netlify.app/llms.txt (spec v2 index) and https://react-touch-drag-slider.netlify.app/llms-full.txt (all content inlined).

For example of use in a full screen modal with a gallery, please checkout any of the galleries in Bushblade Knives

License

MIT © bushblade

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言