{"id":23516828,"url":"https://github.com/951565664/react-slider-light","last_synced_at":"2025-04-19T16:28:43.325Z","repository":{"id":57344908,"uuid":"120268674","full_name":"951565664/react-slider-light","owner":"951565664","description":"a light react-slider","archived":false,"fork":false,"pushed_at":"2019-03-08T23:55:39.000Z","size":482,"stargazers_count":31,"open_issues_count":12,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-22T22:05:03.060Z","etag":null,"topics":["carousel","react","react-component","reactjs","slick","slider"],"latest_commit_sha":null,"homepage":"https://951565664.github.io/react-slider-light/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/951565664.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-05T07:15:51.000Z","updated_at":"2023-10-30T12:11:14.000Z","dependencies_parsed_at":"2022-09-16T08:01:02.676Z","dependency_job_id":null,"html_url":"https://github.com/951565664/react-slider-light","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/951565664%2Freact-slider-light","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/951565664%2Freact-slider-light/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/951565664%2Freact-slider-light/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/951565664%2Freact-slider-light/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/951565664","download_url":"https://codeload.github.com/951565664/react-slider-light/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231248753,"owners_count":18347530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carousel","react","react-component","reactjs","slick","slider"],"created_at":"2024-12-25T15:15:09.082Z","updated_at":"2024-12-25T15:15:09.782Z","avatar_url":"https://github.com/951565664.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-slider-light\n\na lightweight Slider component built with [react](https://github.com/facebook/react). \n一个轻量级的 [react](https://github.com/facebook/react) 轮播组件\n\n---\n\n\n\n## Table of Contents\n\n* [Demos演示](#demos)\n* [Features特性](#features)\n* [Getting Started快速开始](#getting-started)\n  *  [Install](#install)\n  *  [Use](#use)\n  *  [Development](#development)\n  *  [Props](#props)\n## Demos\n\n[Demos and codes 演示和代码](https://951565664.github.io/react-slider-light/)\n\n## Features\n\n* **Easy to use 使用简单**: detailed documents and examples 详细的文档和例子\n* **Support custom 支持自定义**: Can change style,such as dots and arrows 能够改变样式位置，例如 分页符和箭头\n* **Support vertical 支持竖直**\n* **Support gallery 支持缩略图**:Dots are gallery\n\n![avatar](./readme/1.png)\n![avatar](./readme/2.png)\n\n## Getting Started\n\n#### Install\nImportant: be sure that you have installed [react](https://github.com/facebook/react). \n\n重要提醒：请确保先安装了 [react](https://github.com/facebook/react). \n\n```bash\n# Install\n$ npm install react-slider-light\n```\n\n#### Use\n```js\nimport React, { Component } from 'react';\nimport Slider from 'react-slider-light';\nimport 'react-slider-light/lib/index.css';\n\nexport default class Wrapper extends Component {\n    render(){\n        return \u003cSlider\u003e\n            \u003cdiv\u003epage1\u003c/div\u003e\n            \u003cdiv\u003epage2\u003c/div\u003e\n        \u003c/Slider \u003e\n    }\n}\n```\n\n#### Development\n\nWant to run demos locally 本地启动演示\n```bash\ngit clone https://github.com/951565664/react-slider-light.git\ncd react-slick\nnpm install\nnpm start\nopen http://localhost:8080\n```\n[more example 更多例子](https://951565664.github.io/react-slider-light/)\n\n#### Props\n\nProps | Type | Default Value | Description | Required\n---------------- | --------------- | ------------------------------- | ----------- | -------\n`defaultSliderIndex`  | `number` | `0` | 默认初始滑动开始位置 | No\n`sliderIndex`         | `number` | `0` | 控制滑动的页面 | No\n`delay`      | `number`          | `1800` | 延迟的时间 (ms) | No\n`speed`      | `number`          | `500` | 延迟的时间 (ms)| No\n`sliderToShow`      | `number`          | `1` | 每次展示页面 | No\n`sliderToScroll`      | `number`          | `1` | 每次滚动的页面数量 | No\n`autoPaly`      | `bool`          | `true` | 是否自动开始轮播 | No\n`isDots`      | `bool`          | `false` | 是否需要dots | No\n`vertical`      | `bool`          | `false` | 是否垂直滚动 | No\n`dots`      | `enum` or `func`          | `circle` | dots 的种类，值为circle,gallery,diamond,square,({index,item})=\u003e{ return ReactDom} | No\n`dotStyle`      | `object`          | ```{listStyle: 'none',display: 'inline-block',margin: '0px 8px',cursor: 'pointer',overflow:'hidden'}``` | dots 的样式\n`dotX`      | `string` or `number`          | `center` |dot的水平位置 ，可以是```right``` ```left``` ```center```这样的字符串 ,也可以是 30 -20, 表示距离左边的像素，负数表示距右边的像素| No\n`dotY`      | `string` or `number`          | `middle` |dot的垂直位置 ，可以是```top``` ```bottom``` ```middle```这样的字符串 ,也可以是 30 -20, 表示距离底部的像素，负数表示距顶部的像素| No\n`isArrows`      | `bool`          | `false` | 是否需要箭头 | No\n`arrowRender`      | `func`          | `null` | 箭头的渲染函数  ```(type)=\u003e{//type:'backward ' .'forward'}``` | No \n`arrowsY`      | `string` or `number`          | `middle` |arrows的垂直位置 ，可以是```top``` ```bottom``` ```middle```这样的字符串 ,也可以是 30 -20, 表示距离底部的像素，负数表示距顶部的像素| No\n### Filing issues\nPlease replicate your issue with [CodeSandbox template](https://codesandbox.io/s/zzloxr09mp) and post it along with issue to make it easy for me to debug.\n\n## Change Log\n\n#### 1.0.1\n `2018-2-15`\n \n#### 2.0.3\n `2018-2-25`\n-\t测试垂直\n#### 3.0.1\n `2018-2-25`\n-\t修改bug\n#### 3.1.0\n `2018-6-19`\n-\t增加滚动到最后一张时，取消动画，即立刻回到第一张\n#### 4.0.0(已删)\n `2018-6-21`\n-\t修改处理props值的方式，提高性能，修改sliderIndex的bug,。\n#### 4.0.1\n `2018-6-22`\n-\t增加beforeSliderCallback 和 afterSliderCallback两个props。\n#### 4.1.0\n `2018-6-25`\n-\tprops里的dots增加gallery选项。\n#### 4.1.1\n `2018-6-25`\n-\t实现4.1.0的gallery不能垂直显示的问题。\n#### 4.2.0\n `2018-6-25`\n-\t修改4.1版本中受控功能中第一张（sliderIndex为0）的 [bug](https://github.com/951565664/react-slider-light/issues/4)。\n-\t修改4.x版本后出现垂直滚动失效bug。\n## FAQ\n\n#### Will be updated regularly? 是否会经常更新\n\n\u003e Of course, at least 4 hours a week will be taken out for maintenance and development\n\u003e 当然会，至少每周会抽出4个小时来维护和开发\n\n#### Does it support IE8?是否支持 IE 8\n\nNo. 想多了老铁\n\n#### 其他的需求\n\nhttps://github.com/951565664/react-slider-light/issues/3\n## Next\n\n#### Add some basic function.增加一些基本功能\n\n* Scroll vertically 垂直滚动(v2.0.3已实现)\n* gallery 缩略图(v4.1.0已实现)\n\n#### Contributing\n\n编译react-slider-light\n```bash \nnpm run buildPublish \n```\n编译demo\n```bash \nnpm run build\n```\n启动demo\n```bash \nnpm run start\n```\n#### Want more?\n\n* [The author's other projects 作者的其他项目](https://github.com/951565664)\n\n## License\n\n[MIT](https://tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F951565664%2Freact-slider-light","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F951565664%2Freact-slider-light","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F951565664%2Freact-slider-light/lists"}