Skip to main content

InputLabel

Library
UDS Base
Repository
github.com/telus/universal-design-system
Package
npmjs.com/package/@telus-uds/ds-allium
Package version
1.14.0
Loading...

Introduction

import { InputLabel } from '@telus-uds/ds-allium'

InputLabel is typically used as part of an input component, but it can also be used separately, or in combination with custom form elements.

Guidance

info

Coming soon!

Accessibility

Make sure to pass the forId and hintId props, and use the hintId identifiers for labelling the input (aria-labelledby). The forId prop will bind the label to the input, keeping the label inaccessible (avoiding a double screenreader's focus on the same label).

Platform considerations

The component is available on both native platforms and web.

info

On Native the aria attributes are replaced with the accessibilityHint prop.

Props

NameTypeDefaultDescription
copy'en' | 'fr''en'Whether the English or French copy will be used (e.g. for accessibility labels).
forIdstringThe id attribute of the input which this label refers to.
hintstringA short description of the expected input.
hintIdstringThe id attribute passed down to the hint element.
hintPosition'inline' | 'below''inline'Position of the hint relative to label. Use 'below' to display a larger hint below the label.
label*stringThe input label.
tokenscustomSystem tokens prop, see tokens for more details
tooltipstringContent of an optional 'Tooltip'. If set, a tooltip button will be shown next to the label.
variantobjectOfSystem variant prop, see variants for more details

Tokens

In exceptional circumstances, the following tokens can be passed to this component to override its default styles. Do not do this unless absolutely necessary. Read more about overriding styles.

View Tokens
Prop NameToken PropertyToken Type
tokensgapsize
colorcolor
fontNamefontName
fontWeightfontWeight
fontSizefontSize
lineHeightlineHeight
hintColorcolor
hintFontNamefontName
hintFontWeightfontWeight
hintFontSizefontSize
hintLineHeightlineHeight

Figma

Variants

This component does not have any stylistic variants.

Feedback