Label
Install and import
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
Name | Type(s) | Default | Required |
---|---|---|---|
checkableField | bool | ||
children | node | ||
disabled | bool | ||
disabledIcon | node | ||
icon | node | ||
variant | error warning info success | ||
withDisabledIcon | bool | true |
Dependencies
- - @welcome-ui/icons.lock^3.0.0-alpha.2
- - @welcome-ui/system^3.0.0-alpha.2
- - @welcome-ui/utils^3.0.0-alpha.2
- - @welcome-ui/variant-icon^3.0.0-alpha.2
Peer dependencies
- - @xstyled/styled-components^2.1.0
- - @xstyled/system^2.1.0
- - react^16.10.2 || ^17.0.1
- - react-dom^16.10.2 || ^17.0.1
- - styled-components^5.0.0