Skip to main content

InputLabel

Library
UDS Base
Repository
github.com/telus/universal-design-system
Package
npmjs.com/package/@telus-uds/components-base
Package version
1.6.1
Loading...

Introduction

import { InputLabel } from '@telus-uds/components-base'

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

info

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

Props

NameTypeDefaultDescription
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.
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.
tooltipstringContent of an optional `Tooltip`. If set, a tooltip button will be shown next to the label.
tokenscustomSystem tokens prop, see tokens for more details
variantobjectOfSystem variant prop, see variants for more details