百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-touch-drag-slider

> 编程语言
开源

用于 React 的触摸和拖动滑块轮播组件

191 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于 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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

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