Socket
Socket
Sign inDemoInstall

@highlight-ui/color-picker

Package Overview
Dependencies
30
Maintainers
10
Versions
141
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @highlight-ui/color-picker

This is the color picker component used in Personio


Version published
Weekly downloads
3.4K
increased by24.04%
Maintainers
10
Created
Weekly downloads
 

Readme

Source

npm personio.design storybook.personio.design

@highlight-ui/color-picker

Installation

Using npm:

npm install @highlight-ui/color-picker

Using yarn:

yarn add @highlight-ui/color-picker

Using pnpm:

pnpm install @highlight-ui/color-picker

In your (S)CSS file:

@import url('@highlight-ui/color-picker');

Once the package is installed, you can import the library:

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

Usage

import React, { useState } from 'react';
import { ColorPicker } from '@highlight-ui/color-picker';

export default function ColorPickerExample() {
  return (
    <ColorPicker
      title="Pick a color"
      closeOnSelect
      palette="main"
      onChange={callback(action('Selected a color'), '(_: string) => void')}
    />
  );
}

Props 📜

PropTypeRequiredDefaultDescription
titlestringYesSets the title text on the color picker
palette'main', 'pastelNomainSets the selectable color palette
initialColorstringNoSets the "selected" color on the button
closeOnSelectbooleanNofalseIf true, closes picker when a color is selected
disabledbooleanNofalseSets a disabled state on the button
onChange(_: string) => voidNoCallback fired once a color is selected, parameter is a hex value

Contributing 🖌️

Please visit personio.design for usage guidelines and visual examples.

If you're interested in contributing, please visit our contribution page.

FAQs

Last updated on 23 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc