1.0.1 • Published 11 months ago

react-hanji-slider v1.0.1

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

React Hanji Slider

React Hanji Slider is a React component that allows users to compare two blocks of content interactively. By dragging a slider control, users can unveil or conceal the respective content blocks, providing a visually engaging method for comparing different types of data or images

Demo

Examples: https://react-hanji-slider-demo.vercel.app/

Installation

If you're using npm, in the command prompt run:

npm install react-hanji-slider --save

If you're using yarn, run:

yarn add react-hanji-slider

Usage

To use the component, first import ReactHanjiSlider into your file:

import ReactHanjiSlider from "react-hanji-slider";
<ReactHanjiSlider
  slidePrimary={<div>Primary Component 🥢</div>}
  slideSecondary={<div>Secondary Component 🍚</div>}
/>

Props

PropertyTypeDefaultDescription
slidePrimaryElementnullUsed to compare with Secondary component
stylePrimarystylesundefinedStyles for Primary component wrap
slideSecondaryElementnullUsed to compare with Primary component
styleSecondarystylesundefinedStyles for Secondary component wrap
styleWrapstylesundefinedStyles for root wrap
defaultPercentagenumber50Default proportion of content visibility
separatorColorstring#fffColor of separator
valuenumberundefinedUsed to set custom scroll position
1.0.1

11 months ago

1.0.0

11 months ago

0.9.9

11 months ago

0.2.0

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago