1.1.0 • Published 6 months ago

react-slide-rule v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

react-slide-rule

npm npm

React-slide-rule is a React component shaped like a ruler/slide rule, allowing users to select a value along a subjective range and step.

More demos available here!

examples

Installation

npm install react-slide-rule

Simple example

simple-example

import React, { useState } from 'react';
import SlideRule from 'react-slide-rule';

const STYLE = {
  display: 'flex',
  flexDirection: 'column',
  alignItems: 'center',
};

export default function () {
  const [value, setValue] = useState(150);

  return (
    <div style={STYLE}>
      <p>{value}</p>
      <SlideRule value={value} onChange={setValue} />
    </div>
  );
}

More examples

Check out the example codes in the repository, or demos.

Props

A list of all props available here.

Hint: Use suggestion/auto complete to find the props in your code editor.

License

This project is licensed under the MIT license.

1.1.0

6 months ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago