The Label component is our wrapper for the HTML label element.
To start using the Label component you need to import it from pol-ui:
import { Label } from "pol-ui";
Default Label
Default Label
import { Label } from "pol-ui";
const LabelComponent = () => {
return <Label>Label</Label>;
};
export default LabelComponent;
Props
The Label component has the following props:
Prop name | Type | Default | Description |
---|---|---|---|
color | Colors | - | The color of the label. |
disabled | boolean | - | If true, the label will be disabled. |
theme | LabelTheme | - | The theme of the label. |
value | string | - | The value of the label. |
className | string | - | The class name of the label. |
💡
You can also provide any prop comming from the HTML label tag.
Theme
To learn more about how to customize the appearance of components, please see the Theme docs.
interface LabelTheme {
base: string;
colors: ColorsType;
disabled: string;
}