Skip to content
Forms

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

PropTypeDefault
for
string—
required
booleanfalse
class
string—

Snippets of Label

SnippetTypeDefault
children
Snippet—

See also

cock. Yes, it stands for core component kit. We checked twice.