Color
A color can be used in place of an avatar. The background color and text color are customizable.
Version 0.5.4
Installation
To install @igloo-ui/color
in your project, you will need to run the following command using npm:
npm install @igloo-ui/color
If you prefer Yarn, use the following command instead:
yarn add @igloo-ui/color
Usage
Then to use the component in your code just import it!
import Color from '@igloo-ui/color';
<Color
color="#FFC3BA"
textColor="#6B2837"
size="large"
name="Awesome Possum Team"
/>;
API
Prop | Type | Default | Description |
---|---|---|---|
appearance | "circular" | "square" | The appearance of the color | |
children | ReactNode | - | The content of the color |
className | string | - | Add a specific class to the color |
color | string | - | The background color |
dataTest | string | - | Add a data-test tag for automated tests |
name | string | - | Specify the name that will be used to create initials |
size | Size | Specifies the size of the color | |
textColor | string | - | The color of the text |