All Projects → transitive-bullshit → react-before-after-slider

transitive-bullshit / react-before-after-slider

Licence: other
A sexy image comparison slider for React.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to react-before-after-slider

Pandiff
Prose diffs for any document format supported by Pandoc
Stars: ✭ 110 (+74.6%)
Mutual labels:  comparison
Image Comparison
Published on Maven Central and jCenter Java Library that compares 2 images with the same sizes and shows the differences visually by drawing rectangles. Some parts of the image can be excluded from the comparison. Can be used for automation qa tests.
Stars: ✭ 145 (+130.16%)
Mutual labels:  comparison
Survivor
Toolset for SV simulation, comparison and filtering
Stars: ✭ 180 (+185.71%)
Mutual labels:  comparison
Css In Js
A thorough analysis of all the current CSS-in-JS solutions with SSR & TypeScript support for Next.js
Stars: ✭ 127 (+101.59%)
Mutual labels:  comparison
Benchmarks
Comparison tools
Stars: ✭ 139 (+120.63%)
Mutual labels:  comparison
Es6
ES5 vs ES6 Reference
Stars: ✭ 158 (+150.79%)
Mutual labels:  comparison
Approx
Approximate floating point equality comparisons and assertions
Stars: ✭ 96 (+52.38%)
Mutual labels:  comparison
Rust Web Framework Comparison
A comparison of some web frameworks and libs written in Rust
Stars: ✭ 2,852 (+4426.98%)
Mutual labels:  comparison
Sitediff
SiteDiff makes it easy to see differences between two versions of a website.
Stars: ✭ 139 (+120.63%)
Mutual labels:  comparison
Objectscomparer
C# Framework provides mechanism to compare complex objects, allows to override comparison rules for specific properties and types.
Stars: ✭ 161 (+155.56%)
Mutual labels:  comparison
Vectoriconsroundup
A comparison between popular vectorial icon fonts
Stars: ✭ 126 (+100%)
Mutual labels:  comparison
Typescript Vs Flowtype
Differences between Flowtype and TypeScript -- syntax and usability
Stars: ✭ 1,671 (+2552.38%)
Mutual labels:  comparison
Rosettagit
Solutions to tasks in over 700 programming languages
Stars: ✭ 160 (+153.97%)
Mutual labels:  comparison
Volley
Volley is a benchmarking tool for measuring the performance of server networking stacks.
Stars: ✭ 119 (+88.89%)
Mutual labels:  comparison
Inspectdf
🛠️ 📊 Tools for Exploring and Comparing Data Frames
Stars: ✭ 195 (+209.52%)
Mutual labels:  comparison
Vps Comparison
A comparison between some VPS providers. It uses Ansible to perform a series of automated benchmark tests over the VPS servers that you specify. It allows the reproducibility of those tests by anyone that wanted to compare these results to their own. All the tests results are available in order to provide independence and transparency.
Stars: ✭ 1,357 (+2053.97%)
Mutual labels:  comparison
Shallowequal
↔️ Like lodash v3.x isEqualWith but for shallow equal.
Stars: ✭ 151 (+139.68%)
Mutual labels:  comparison
Awesome Ci
List of Continuous Integration services
Stars: ✭ 2,737 (+4244.44%)
Mutual labels:  comparison
Styled Components Vs Emotion
a short doc comparing the popular CSS-in-JS libraries styled-components and emotion
Stars: ✭ 204 (+223.81%)
Mutual labels:  comparison
Are We Fast Yet
Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays
Stars: ✭ 161 (+155.56%)
Mutual labels:  comparison

react-before-after-slider (demo)

A sexy image comparison slider for React.

NPM Build Status JavaScript Style Guide

This component is perfect for displaying the differences between two images, allowing the user to slide over them for an enticing before & after reveal effect.

Install

npm install --save react-before-after-slider

Usage

Check out the demo.

import React, { Component } from 'react'

import BeforeAfterSlider from 'react-before-after-slider'

class Example extends Component {
  render () {
    const before = 'https://...example1.jpg'
    const after = 'https://...example2.jpg'

    return (
      <BeforeAfterSlider
        before={before}
        after={after}
        width={640}
        height={480}
      />
    )
  }
}

Props

Property Type Default Description
before string Required URL of before image to use.
after string Required URL of after image to use.
width number Required Width in pixels for the component.
height number Required Height in pixels for the component.
defaultProgress number 0.5 Where the progress slider should start (float between 0 and 1).
className string Class name to add to root div element.
beforeClassName string Class name to add to before element.
afterClassName string Class name to add to after element.
beforeProps object { } Optional extra props to pass to the before BlockImage.
afterProps object { } Optional extra props to pass to the after BlockImage.
... ... undefined Any other props are applied to the root div element.

Note that by default, both before and after will be displayed as background images with background-size: cover via react-block-image.

Todo

  • Remove restriction on passing a hard-coded width and height

Related

License

MIT © transitive-bullshit

Support my OSS work by following me on twitter twitter

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].