Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gartner/react-admin-color-input

<ColorInput> and <ColorField> components for admin-on-rest
https://github.com/gartner/react-admin-color-input

Last synced: 4 months ago
JSON representation

<ColorInput> and <ColorField> components for admin-on-rest

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.

![color-input.gif](color-input.gif)

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

![color-field.png](color-field.png)

## Notice

This module was originally created for [admin-on-rest](https://github.com/marmelab/admin-on-rest) by @dreinke and was forked from his [repository](https://github.com/dreinke/aor-color-input).

## Installation

```sh
npm install react-admin-color-input --save-dev
```

## Usage

```js
import React from 'react';
import {
Show,
TextField,
Edit,
TextInput,
LongTextInput,
} from 'react-admin';

import { ColorField, ColorInput } from 'react-admin-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).