Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Vue slider component with touch and mouse support. Only JSX

License

NotificationsYou must be signed in to change notification settings

piyushchauhan2011/vue-simple-slider

Repository files navigation

vue-simple-slider

Vue slider component with touch and mouse support.

Modern browsers and IE10+ (IE9 should work, but as flex is not supported you'll need to change CSS).

Features

  • Lightweight, no dependencies
  • Navigation, pager and arrows
  • Swipe and Mouse support, with velocity detection
  • Works only with JSX syntax currently

Usage

import'node_modules/vue-simple-slider/dist/Slider.css'importSliderfrom'vue-simple-slider'conststyle={height:'250px',display:'flex',justifyContent:'center',alignItems:'center',color:'#fafafa'}exportdefault{components:{    Slider},render(h){return(<Slider><divstyle={{background:'#21BB9A', ...style}}><h1>A</h1></div><divstyle={{background:'#329ADD', ...style}}><h1>B</h1></div><divstyle={{background:'#9A5CB9', ...style}}><h1>C</h1></div><divstyle={{background:'#E64C3C', ...style}}><h1>D</h1></div><divstyle={{background:'#2D3F52', ...style}}><h1>E</h1></div></Slider>)}}

Screenshot

screen shot 2017-06-13 at 2 43 31 am

Build Setup

# install dependenciesnpm i -g vue-clinpm install# serve with hot reload at localhost:4000npm run dev# build for production with minificationnpm run build

For detailed explanation on how things work, consult thedocs for vue-build.

License

vue-simple-slider is open source and released under theMIT License.

Copyright (c) 2017Piyush Chauhan.

PS: I would love to know if you're using vue-simple-slider. Tweet to me at@piyushpsycho.

Credits

Shamelessy copied from react communityReact Simple Slider

About

Vue slider component with touch and mouse support. Only JSX

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp