@uiw/react-color-compact
@uiw/react-color-compact
npm i @uiw/react-color-compact
@uiw/react-color-compact

@uiw/react-color-compact

🎨 Is a tiny color picker widget component for React apps.

by uiwjs

1.1.1 (see all)License:MITTypeScript:Built-In
npm i @uiw/react-color-compact
Readme

React Color Compact

npm bundle size npm version Open in unpkg

Compact Component is a subcomponent of @react-color.

react-color-compact

Install

npm i @uiw/react-color-compact

Usage

import Compact from '@uiw/react-color-compact';

function Demo() {
  const [hex, setHex] = useState("#fff");
  return (
    <Compact
      color={hex}
      onChange={(color) => {
        setHex(color.hex);
      }}
    />
  );
}

Props

import React from 'react';
import { ColorResult, HsvaColor } from '@uiw/color-convert';
export interface CompactProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> {
  prefixCls?: string;
  color?: string | HsvaColor;
  colors?: string[];
  onChange?: (color: ColorResult, evn?: T) => void;
}

License

Licensed under the MIT License.

Downloads/wk

947

GitHub Stars

51

LAST COMMIT

6mos ago

MAINTAINERS

2

CONTRIBUTORS

3

OPEN ISSUES

4

OPEN PRs

0
VersionTagPublished
1.1.1
latest
1mo ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate