Skip to main content
Version: Next

TextFieldProps

Home > @backstage/canon > TextFieldProps

Signature:

export interface TextFieldProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> 

Extends: Omit<React.ComponentPropsWithoutRef<'input'>, 'size'>

Properties

Property

Modifiers

Type

Description

className?

string

(Optional) The class name of the text field

description?

string

(Optional) The description of the text field

error?

string | null

(Optional) The error message of the text field

hideLabelAndDescription?

boolean

(Optional) Hide the label and description but still visible to screen readers

icon?

ReactNode

(Optional) An icon to render before the input

label?

string

(Optional) The label of the text field

labelSize?

'small' | 'medium'

(Optional) The size of the label and description

name

string

The name of the text field

onClear?

MouseEventHandler<HTMLButtonElement>

(Optional) Handler to call when the clear button is pressed

secondaryLabel?

string

(Optional) The secondary label of the text field

size?

'small' | 'medium' | Partial<Record<Breakpoint, 'small' | 'medium'>>

(Optional) The size of the text field