Skip to contentSkip to navigationSkip to topbar
Paste assistant Assistant
Figma
Star

Label

Version 13.1.1GithubStorybook

A Label is text that provides a visible and accessible name to a form element.

Installation

Installation page anchor
yarn add @twilio-paste/label - or - yarn add @twilio-paste/core
import {Input} from '@twilio-paste/core/input';
import {Label} from '@twilio-paste/core/label';
import {HelpText} from '@twilio-paste/core/help-text';

const Component = () => (
  <>
    <Label htmlFor="foo" required>
      foo
    </Label>
    <Input aria-describedby="foo_text" id="foo" name="foo" type="text" placeholder="foo" onChange={FOO} required />
    <HelpText id="foo_text">Enter some text.</HelpText>
  </>
);

Label

Label page anchor

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
'REQUIRED_DOT'

i18nLabel

Type
string