https://github.com/gartner/ra-color-input
https://github.com/gartner/ra-color-input
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/gartner/ra-color-input
- Owner: gartner
- Created: 2025-02-18T20:19:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-20T07:26:44.000Z (over 1 year ago)
- Last Synced: 2025-10-07T20:03:18.541Z (10 months ago)
- Language: TypeScript
- Size: 360 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ` and `
A color picker for [react-admin](https://github.com/marmelab/react-admin) using [React Color](http://casesandberg.github.io/react-color/), a collection of color pickers.

Also includes a color field for just displaying the color value.

## Installation
```sh
npm install @palustris/ra-color-input --save-dev
```
## Usage
```js
import React from 'react';
import {
Show,
TextField,
Edit,
TextInput,
LongTextInput,
} from 'react-admin';
import { ColorField, ColorInput } from 'ra-color-input';
export const PostShow = (props) => (
);
export const PostEdit = (props) => (
);
```
You can customize the color picker using the `picker` attribute.
```js
```
### Pickers
- Alpha
- Block
- Chrome (default)
- Circle
- Compact
- Github
- Hue
- Material
- Photoshop
- Sketch
- Slider
- Swatches
- Twitter
## License
This library is licensed under the [MIT Licence](LICENSE).