Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/gartner/react-admin-color-input
- Owner: gartner
- License: mit
- Fork: true (vascofg/react-admin-color-input)
- Created: 2020-10-11T06:45:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-17T17:59:35.000Z (over 2 years ago)
- Last Synced: 2024-09-04T15:53:56.658Z (5 months ago)
- Homepage:
- Size: 549 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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## License
This library is licensed under the [MIT Licence](LICENSE).