Label
A form label with an optional required marker.
import
import { Label } from '@joshicodes/cock';Label
Field does this for you; reach for Label directly when you control the id yourself.
API
Read out of the component sources at build time, so it matches the version you installed.
Every component also takes class, merged
through tailwind-merge so your utility wins.
Props of Label
| Prop | Type | Default |
|---|---|---|
for | string | — |
required | boolean | false |
class | string | — |
Snippets of Label
| Snippet | Type | Default |
|---|---|---|
children | Snippet | — |