omi/components/slider
YunYouJun 3a3d695206 refactor(common): change common/theme.scss to common/scss/theme.scss 2021-09-08 21:26:12 +08:00
..
scripts refactor(slider): using the new template 2021-08-13 12:53:52 +08:00
src refactor(common): change common/theme.scss to common/scss/theme.scss 2021-09-08 21:26:12 +08:00
test test(slider): added basic tests for slider 2021-08-19 22:54:54 +08:00
.gitignore refactor(slider): using the new template 2021-08-13 12:53:52 +08:00
README.md fix(slider): made look on broswers (firefox) consistent 2021-08-20 19:00:19 +08:00
index.html feat(slider): support dynamic theme switching 2021-08-31 18:10:21 +08:00
package.json Update package.json 2021-09-01 14:33:10 +08:00
tsconfig.json fix(slider): import issues 2021-08-25 13:06:49 +08:00
vite.config.ts fix(slider): import issues 2021-08-25 13:06:49 +08:00

README.md

Slider

used for dragging through content on page

Import

import '@omiu/slider'

Or use script tag to ref it.

<script src="https://unpkg.com/@omiu/slider"></script>

Usage

<o-slider></o-slider>

API

Props

{
  min?: number
  max?: number
  step?: number
  value?: number
  second_value?: number
  size: 'small' | 'normal' | 'large'
  range: 'single' | 'double'
  orient?: 'vertical' | 'horizontal'
  shape: 'square' | 'round'
  tooltip?: boolean
  disabled?: boolean
  reversed?: boolean
}

Default Props

{
  //default a single round range slider
  min: undefined,
  max: undefined,
  step: 1,
  value: undefined,
  second_value: undefined,
  range: 'single',
  size: 'normal',
  orient: 'horizontal',
  shape: 'round',
  tooltip: false,
  disabled: false,
  reversed: false,
}

Events

  • input
  • change