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

react-swipeable-views

> 前端框架
开源

一个用于可滑动视图的 React 组件。 :snowflake:

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

工具介绍

一个用于可滑动视图的 React 组件。 :snowflake:

react-swipeable-views

A React component for swipeable views.

Package Version Download Size (kB gzipped) react-swipeable-views 5.08 react-swipeable-views-utils 3.52 react-swipeable-views-native ?

Documentation

Get started

  • Installation
  • Usage
  • Example projects
  • Supported projects

Component API

  • Component API

More

  • Supported projects
  • Demos

Installation

Browser

npm install --save react-swipeable-views

Native (experimental)

npm install --save react-swipeable-views-native

The problem solved

Check out the demos from a mobile device (real or emulated). It's tiny (<10 kB gzipped), it quickly renders the first slide, then lazy-loads the others.

Simple example

Browser

import React from 'react';
import SwipeableViews from 'react-swipeable-views';

const styles = {
  slide: {
    padding: 15,
    minHeight: 100,
    color: '#fff',
  },
  slide1: {
    background: '#FEA900',
  },
  slide2: {
    background: '#B3DC4A',
  },
  slide3: {
    background: '#6AC0FF',
  },
};

const MyComponent = () => (
  <SwipeableViews>
    

    

    

  </SwipeableViews>
);

export default MyComponent;

Native (experimental)

react-native support is experimental and I have no plan pushing it forward. I start to think that lower level abstraction to share the implementation between the platforms are more appropriate. We have two different implementations of the react-swipeable-views API.

…

Who's using react-swipeable-views?

  • Doctolib
  • mastodon
  • Material-UI
  • Tinder
  • Uber
  • Are you using this library? Add your company or project.

License

This project is licensed under the terms of the MIT license.

GitHub Issues· 0 开放

在 GitHub 查看全部

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

核心特点

  • •Installation
  • •Example projects
  • •Supported projects
  • •Component API
  • •Supported projects
  • •Doctolib
  • •mastodon
  • •Material-UI
  • •Are you using this library? Add your company or project.

> 标签

JavaScriptcomponentreactreact-nativeswipe

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

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架