Super tiny color input ranges for React.

Overview

react-color-range ·

Tiny color input for React, made with native input ranges. react-color-range leverages the native input type="range" and CSS linear gradients to reduce the bundle size.

react-blur

Usage

import { HueSelector } from 'react-color-range';
import 'react-color-range/style.css';

[...]

// with hex colors
<HueSelector
  value={colorHex}
  onChange={color => {
    changeColorHook(color.hex); // also `color.hsl`, `color.h`, `color.s` and `color.l`
  }}
/>

<SaturationSelector
  value={colorHex}
  onChange={color => {
    changeColorHook(color.hex);
  }}
/>

<LuminositySelector
  value={colorHex}
  onChange={color => {
    changeColorHook(color.hex);
  }}
/>

Each of the three components accepts the following props:

  • value: Either a hex color (example: #FFFFFF) or hsl color expressed with degrees for hue and percentages for saturation and luminosity separated by commas (example: hsl(0, 100%, 50%)). Please note that using hsl colors as the source is preferred to prevent color resolution lost on high and low luminosities.
  • onChange: Function that will return an object when the color is changed.
    • On change response: And object with the following properties:
      • hsl: String. New hsl color
      • hex: String. New hex color
      • h, s, l: Int. Hue, saturation and luminosity, components of the hsl color
You might also like...

Tiny and powerful state management library.

Tiny and powerful state management library.

BitAboutState Tiny and powerful React state management library. 100% Idiomatic React. Install npm install --save @bit-about/state Features 100% Idioma

Nov 5, 2022

Fast, tiny and solid hooks system for Javascript and Node.js

Fast, tiny and solid hooks system for Javascript and Node.js

Uncino 🪝 Fast, tiny and solid hooks system for Javascript and NodeJS Uncino is italian word for hook Do you know Wordpress hooks system? Uncino is a

Dec 7, 2022

React Starter Kit — isomorphic web app boilerplate (Node.js, Express, GraphQL, React.js, Babel, PostCSS, Webpack, Browsersync)

React Starter Kit — isomorphic web app boilerplate (Node.js, Express, GraphQL, React.js, Babel, PostCSS, Webpack, Browsersync)

React Starter Kit — "isomorphic" web app boilerplate React Starter Kit is an opinionated boilerplate for web development built on top of Node.js, Expr

Dec 30, 2022

📋 React Hooks for forms validation (Web + React Native)

📋 React Hooks for forms validation (Web + React Native)

English | 繁中 | 简中 | 日本語 | 한국어 | Français | Italiano | Português | Español | Русский | Deutsch | Türkçe Features Built with performance and DX in mind

Dec 29, 2022

:black_medium_small_square:React Move | Beautiful, data-driven animations for React

:black_medium_small_square:React Move | Beautiful, data-driven animations for React

React-Move Beautiful, data-driven animations for React. Just 3.5kb (gzipped)! Documentation and Examples Features Animate HTML, SVG & React-Native Fin

Jan 1, 2023

React features to enhance using Rollbar.js in React Applications

Rollbar React SDK React features to enhance using Rollbar.js in React Applications. This SDK provides a wrapper around the base Rollbar.js SDK in orde

Jan 3, 2023

🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

toastify-react-native 🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense! De

Oct 11, 2022

Soft UI Dashboard React - Free Dashboard using React and Material UI

Soft UI Dashboard React - Free Dashboard using React and Material UI

Soft UI Dashboard React Start your Development with an Innovative Admin Template for Material-UI and React. If you like the look & feel of the hottest

Dec 28, 2022

A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router.

A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router.

A web application to search all the different countries in the world and get details about them which can include languages, currencies, population, domain e.t.c This application is built with CSS, React, Redux-Toolkit and React-Router. It also includes a theme switcher from light to dark mode.

Jun 5, 2022
Owner
Javier Bórquez
I want to become stronger.
Javier Bórquez
:art: Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more

React Color 13 Different Pickers - Sketch, Photoshop, Chrome and many more Make Your Own - Use the building block components to make your own Demo Liv

case 11.2k Jan 6, 2023
A simple project to refresh on the usage of js canvas and getContext('2d') to create four interactive squares on the canvas when hovered changes color.

A simple project to refresh on the usage of js canvas and getContext('2d') to create four interactive squares on the canvas when hovered changes color. Can also be clicked to work on mobile devices.

DandaIT04 1 Jan 1, 2022
JAVASCRIPT library recognition of signs input from the smartphone display

Recosigns Demo: https://gaidadei.ru/recosigns/demo/ Documentation: https://gaidadei.ru/recosigns/ Download: https://gaidadei.ru/recosigns/recosigns.zi

null 23 Nov 12, 2022
Return an optimized avatar image from a domain name input.

IndieWeb Avatar API A runtime service to extract avatar images from: <link rel="apple-touch-icon"> <link rel="apple-touch-icon-precomposed"> <link rel

Eleventy 45 Aug 28, 2022
TV Show App is an application that allows to searh tv shows based on user input. Each tv show is displayed in a Bulma Card component and when clicked, heads you to the official tv show site

TV SHOW APP TV Show App is an application that allows to search tv shows based on user input. Each tv show is displayed in a Bulma* Card component and

HENDEL SAMY 1 Dec 19, 2021
Phonemask - Library for processing the phone input field in the web form. Only native javascript is used

phonemask Library for processing the phone input field in the web form. Only native javascript is used Usage: Adding a library to HTML <script type="a

Neovav 2 Sep 20, 2022
📌 A chips input designed for MUI (Material ui) V5

MUI chips input A chips input designed for the React library MUI Installation // with npm npm install mui-chips-input // with yarn yarn add mui-chips

Victor de la Fouchardière 21 Dec 23, 2022
Recoil is an experimental state management library for React apps. It provides several capabilities that are difficult to achieve with React alone, while being compatible with the newest features of React.

Recoil · Recoil is an experimental set of utilities for state management with React. Please see the website: https://recoiljs.org Installation The Rec

Facebook Experimental 18.2k Jan 8, 2023
🔮 tiny robust state management

?? snapstate tiny robust state management ?? npm install @chasemoskal/snapstate ??️ watch for changes to properties ??️ track only the properties you

Chase Moskal 5 Dec 23, 2022
A tiny package for JavaScript Web App's state management based on RxJS & Immer

A tiny package for JavaScript Web App's state management based on RxJS & Immer

Xiao Junjiang 12 Oct 19, 2022