@types/react-color

  • Version 3.0.5
  • Published
  • 18.9 kB
  • 2 dependencies
  • MIT license

Install

npm i @types/react-color
yarn add @types/react-color
pnpm add @types/react-color

Overview

TypeScript definitions for react-color

Index

Functions

function CustomPicker

CustomPicker: <A>(
component:
| ComponentClass<A & InjectedColorProps>
| StatelessComponent<A & InjectedColorProps>
) => any;

    Classes

    class AlphaPicker

    class AlphaPicker extends Component<AlphaPickerProps> {}

      class BlockPicker

      class BlockPicker extends Component<BlockPickerProps> {}

        class Checkboard

        class Checkboard extends Component<CheckboardProps> {}

          class ChromePicker

          class ChromePicker extends Component<ChromePickerProps> {}

            class CirclePicker

            class CirclePicker extends Component<CirclePickerProps> {}

              class CompactPicker

              class CompactPicker extends Component<CompactPickerProps> {}

                class GithubPicker

                class GithubPicker extends Component<GithubPickerProps> {}

                  class HuePicker

                  class HuePicker extends Component<HuePickerProps> {}

                    class MaterialPicker

                    class MaterialPicker extends Component<MaterialPickerProps> {}

                      class PhotoshopPicker

                      class PhotoshopPicker extends Component<PhotoshopPickerProps> {}

                        class SketchPicker

                        class SketchPicker extends Component<SketchPickerProps> {}

                          class SliderPicker

                          class SliderPicker extends Component<SliderPickerProps> {}

                            class SwatchesPicker

                            class SwatchesPicker extends Component<SwatchesPickerProps> {}

                              class TwitterPicker

                              class TwitterPicker extends Component<TwitterPickerProps> {}

                                Interfaces

                                interface AlphaPickerProps

                                interface AlphaPickerProps extends ColorPickerProps<AlphaPicker> {}

                                  property height

                                  height?: string | undefined;

                                    property styles

                                    styles?: Partial<Classes<AlphaPickerStylesProps>> | undefined;

                                      property width

                                      width?: string | undefined;

                                        interface BlockPickerProps

                                        interface BlockPickerProps extends ColorPickerProps<BlockPicker> {}

                                          property colors

                                          colors?: string[] | undefined;

                                            property styles

                                            styles?: Partial<Classes<BlockPickerStylesProps>> | undefined;

                                              property triangle

                                              triangle?: 'hide' | 'top' | undefined;

                                                property width

                                                width?: string | undefined;

                                                  method onSwatchHover

                                                  onSwatchHover: (color: ColorResult, event: MouseEvent) => void;

                                                    interface CheckboardProps

                                                    interface CheckboardProps extends ClassAttributes<Checkboard> {}

                                                      property grey

                                                      grey?: string | undefined;

                                                        property size

                                                        size?: number | undefined;

                                                          property white

                                                          white?: string | undefined;

                                                            interface ChromePickerProps

                                                            interface ChromePickerProps extends ColorPickerProps<ChromePicker> {}

                                                              property disableAlpha

                                                              disableAlpha?: boolean | undefined;

                                                                property styles

                                                                styles?: Partial<Classes<ChromePickerStylesProps>> | undefined;

                                                                  interface CirclePickerProps

                                                                  interface CirclePickerProps extends ColorPickerProps<CirclePicker> {}

                                                                    property circleSize

                                                                    circleSize?: number | undefined;

                                                                      property circleSpacing

                                                                      circleSpacing?: number | undefined;

                                                                        property colors

                                                                        colors?: string[] | undefined;

                                                                          property styles

                                                                          styles?: Partial<Classes<CirclePickerStylesProps>> | undefined;

                                                                            property width

                                                                            width?: string | undefined;

                                                                              method onSwatchHover

                                                                              onSwatchHover: (color: ColorResult, event: MouseEvent) => void;

                                                                                interface ColorPickerProps

                                                                                interface ColorPickerProps<A> extends ClassAttributes<A> {}

                                                                                  property className

                                                                                  className?: string | undefined;

                                                                                    property color

                                                                                    color?: Color | undefined;

                                                                                      property onChange

                                                                                      onChange?: ColorChangeHandler | undefined;

                                                                                        property onChangeComplete

                                                                                        onChangeComplete?: ColorChangeHandler | undefined;

                                                                                          property styles

                                                                                          styles?: Partial<Classes<any>> | undefined;

                                                                                            interface ColorResult

                                                                                            interface ColorResult {}

                                                                                              property hex

                                                                                              hex: string;

                                                                                                property hsl

                                                                                                hsl: HSLColor;

                                                                                                  property rgb

                                                                                                  rgb: RGBColor;

                                                                                                    interface CompactPickerProps

                                                                                                    interface CompactPickerProps extends ColorPickerProps<CompactPicker> {}

                                                                                                      property colors

                                                                                                      colors?: string[] | undefined;

                                                                                                        property styles

                                                                                                        styles?: Partial<Classes<CompactPickerStylesProps>> | undefined;

                                                                                                          method onSwatchHover

                                                                                                          onSwatchHover: (color: ColorResult, event: MouseEvent) => void;

                                                                                                            interface CustomPickerProps

                                                                                                            interface CustomPickerProps<A> extends ClassAttributes<A> {}

                                                                                                              property className

                                                                                                              className?: string | undefined;

                                                                                                                property color

                                                                                                                color?: Color | undefined;

                                                                                                                  property onChange

                                                                                                                  onChange: ColorChangeHandler;

                                                                                                                    property pointer

                                                                                                                    pointer?: ReactNode | undefined;

                                                                                                                      property styles

                                                                                                                      styles?: Partial<Classes<any>> | undefined;

                                                                                                                        interface GithubPickerProps

                                                                                                                        interface GithubPickerProps extends ColorPickerProps<GithubPicker> {}

                                                                                                                          property colors

                                                                                                                          colors?: string[] | undefined;

                                                                                                                            property styles

                                                                                                                            styles?: Partial<Classes<GithubPickerStylesProps>> | undefined;

                                                                                                                              property triangle

                                                                                                                              triangle?: 'hide' | 'top-left' | 'top-right' | undefined;

                                                                                                                                property width

                                                                                                                                width?: string | undefined;

                                                                                                                                  method onSwatchHover

                                                                                                                                  onSwatchHover: (color: ColorResult, event: MouseEvent) => void;

                                                                                                                                    interface HSLColor

                                                                                                                                    interface HSLColor {}

                                                                                                                                      property a

                                                                                                                                      a?: number | undefined;

                                                                                                                                        property h

                                                                                                                                        h: number;

                                                                                                                                          property l

                                                                                                                                          l: number;

                                                                                                                                            property s

                                                                                                                                            s: number;

                                                                                                                                              interface HuePickerProps

                                                                                                                                              interface HuePickerProps extends ColorPickerProps<HuePicker> {}

                                                                                                                                                property height

                                                                                                                                                height?: string | undefined;

                                                                                                                                                  property styles

                                                                                                                                                  styles?: Partial<Classes<HuePickerStylesProps>> | undefined;

                                                                                                                                                    property width

                                                                                                                                                    width?: string | undefined;

                                                                                                                                                      interface InjectedColorProps

                                                                                                                                                      interface InjectedColorProps {}

                                                                                                                                                        property hex

                                                                                                                                                        hex?: string | undefined;

                                                                                                                                                          property hsl

                                                                                                                                                          hsl?: HSLColor | undefined;

                                                                                                                                                            property onChange

                                                                                                                                                            onChange?: ColorWrapChangeHandler | undefined;

                                                                                                                                                              property rgb

                                                                                                                                                              rgb?: RGBColor | undefined;

                                                                                                                                                                interface MaterialPickerProps

                                                                                                                                                                interface MaterialPickerProps extends ColorPickerProps<MaterialPicker> {}

                                                                                                                                                                  property styles

                                                                                                                                                                  styles?: Partial<Classes<MaterialPickerStylesProps>> | undefined;

                                                                                                                                                                    interface PhotoshopPickerProps

                                                                                                                                                                    interface PhotoshopPickerProps extends ColorPickerProps<PhotoshopPicker> {}

                                                                                                                                                                      property header

                                                                                                                                                                      header?: string | undefined;

                                                                                                                                                                        property onAccept

                                                                                                                                                                        onAccept?: ColorChangeHandler | undefined;

                                                                                                                                                                          property onCancel

                                                                                                                                                                          onCancel?: ColorChangeHandler | undefined;

                                                                                                                                                                            property styles

                                                                                                                                                                            styles?: Partial<Classes<PhotoshopPickerStylesProps>> | undefined;

                                                                                                                                                                              interface RGBColor

                                                                                                                                                                              interface RGBColor {}

                                                                                                                                                                                property a

                                                                                                                                                                                a?: number | undefined;

                                                                                                                                                                                  property b

                                                                                                                                                                                  b: number;

                                                                                                                                                                                    property g

                                                                                                                                                                                    g: number;

                                                                                                                                                                                      property r

                                                                                                                                                                                      r: number;

                                                                                                                                                                                        interface SketchPickerProps

                                                                                                                                                                                        interface SketchPickerProps extends ColorPickerProps<SketchPicker> {}

                                                                                                                                                                                          property disableAlpha

                                                                                                                                                                                          disableAlpha?: boolean | undefined;

                                                                                                                                                                                            property presetColors

                                                                                                                                                                                            presetColors?: PresetColor[] | undefined;

                                                                                                                                                                                              property styles

                                                                                                                                                                                              styles?: Partial<Classes<SketchPickerStylesProps>> | undefined;

                                                                                                                                                                                                property width

                                                                                                                                                                                                width?: string | undefined;

                                                                                                                                                                                                  method onSwatchHover

                                                                                                                                                                                                  onSwatchHover: (color: ColorResult, event: MouseEvent) => void;

                                                                                                                                                                                                    interface SliderPickerProps

                                                                                                                                                                                                    interface SliderPickerProps extends ColorPickerProps<SliderPicker> {}

                                                                                                                                                                                                      property styles

                                                                                                                                                                                                      styles?: Partial<Classes<SliderPickerStylesProps>> | undefined;

                                                                                                                                                                                                        interface SwatchesPickerProps

                                                                                                                                                                                                        interface SwatchesPickerProps extends ColorPickerProps<SwatchesPicker> {}

                                                                                                                                                                                                          property colors

                                                                                                                                                                                                          colors?: string[][] | undefined;

                                                                                                                                                                                                            property height

                                                                                                                                                                                                            height?: number | undefined;

                                                                                                                                                                                                              property styles

                                                                                                                                                                                                              styles?: Partial<Classes<SwatchesPickerStylesProps>> | undefined;

                                                                                                                                                                                                                property width

                                                                                                                                                                                                                width?: number | undefined;

                                                                                                                                                                                                                  method onSwatchHover

                                                                                                                                                                                                                  onSwatchHover: (color: ColorResult, event: MouseEvent) => void;

                                                                                                                                                                                                                    interface TwitterPickerProps

                                                                                                                                                                                                                    interface TwitterPickerProps extends ColorPickerProps<TwitterPicker> {}

                                                                                                                                                                                                                      property colors

                                                                                                                                                                                                                      colors?: string[] | undefined;

                                                                                                                                                                                                                        property styles

                                                                                                                                                                                                                        styles?: Partial<Classes<TwitterPickerStylesProps>> | undefined;

                                                                                                                                                                                                                          property triangle

                                                                                                                                                                                                                          triangle?: 'hide' | 'top-left' | 'top-right' | undefined;

                                                                                                                                                                                                                            property width

                                                                                                                                                                                                                            width?: string | undefined;

                                                                                                                                                                                                                              method onSwatchHover

                                                                                                                                                                                                                              onSwatchHover: (color: ColorResult, event: MouseEvent) => void;

                                                                                                                                                                                                                                Type Aliases

                                                                                                                                                                                                                                type Color

                                                                                                                                                                                                                                type Color = string | HSLColor | RGBColor;

                                                                                                                                                                                                                                  type ColorChangeHandler

                                                                                                                                                                                                                                  type ColorChangeHandler = (
                                                                                                                                                                                                                                  color: ColorResult,
                                                                                                                                                                                                                                  event: React.ChangeEvent<HTMLInputElement>
                                                                                                                                                                                                                                  ) => void;

                                                                                                                                                                                                                                    Package Files (16)

                                                                                                                                                                                                                                    Dependencies (2)

                                                                                                                                                                                                                                    Dev Dependencies (0)

                                                                                                                                                                                                                                    No dev dependencies.

                                                                                                                                                                                                                                    Peer Dependencies (0)

                                                                                                                                                                                                                                    No peer dependencies.

                                                                                                                                                                                                                                    Badge

                                                                                                                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/react-color.

                                                                                                                                                                                                                                    • Markdown
                                                                                                                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/react-color)
                                                                                                                                                                                                                                    • HTML
                                                                                                                                                                                                                                      <a href="https://www.jsdocs.io/package/@types/react-color"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>