@pikas-ui/color-picker

This package contains a color-picker component that can be used to pick a color.

Change Log

Requirements

To use this package, you must install the @pikas-ui/styles package.

Installation

You can install this package using npm, yarn, or pnpm.

npm install @pikas-ui/color-picker
yarn add @pikas-ui/color-picker
pnpm add @pikas-ui/color-picker

Usage

ColorPicker

The color picker component is a component that can be used to pick a color. You can select a color by clicking on the color picker or by typing a color in the textfield.

*

This is a description

import { ColorPicker } from '@pikas-ui/color-picker';

const Example: React.FC = () => {
  return (
    <ColorPicker
      label="Color Picker"
      description="This is a description"
      required
      defaultValue="#52A2FF"
    />
  );
};

Props

PropDescriptionTypeDefault
valueThe value of the color pickerstring-
defaultValueThe default value of the color pickerstring"#FFFFFF'
onChangeThe onChange function of the color picker(value: string) => void-
cssThe css objectColorPickerCSS-
descriptionThe description of the color pickerstring-
infoThe info of the color pickerReactNode-
labelThe label of the color pickerstring or ReactNode-
fontSizeThe font size of the color pickerPikasFontSize"em-base'
widthThe width of the color pickernumber or string"100%'
maxWidthThe max width of the color pickernumber or string"100%'
minWidthThe min width of the color pickernumber or string-
disabledIf the color picker is disabledboolean-
idThe id of the color pickerstring-
requiredIf the color picker is requiredboolean-
textErrorThe text error of the color pickerstring-
textfieldThe textfield props of the color pickerTextfieldProps-
hideTextfieldIf the textfield is hiddenbooleanfalse

Contributing

This documentation can be edited on GitHub here