Label

Install and import

yarn add @welcome-ui/label @xstyled/styled-components @xstyled/system react react-dom styled-components
import { Label } from '@welcome-ui/label'

Default

label DOM, use on Field.

Required

With required property.

Variants

error, warning, info or success variant add specific badge, you can add a custom one as well.

More content

Checkboxes and radio buttons are normally nested inside labels. If you do this, make sure there is only one other child (in this example, a div).

Disabled

Customize label for disabled elements.

Properties

NameType(s)DefaultRequired
checkableField
bool
children
node
disabled
bool
disabledIcon
node
icon
node
variant
error
warning
info
success
withDisabledIcon
bool
true

Dependencies

Peer dependencies