Skip to main content
Version: Next

SelectProps

Home > @backstage/canon > SelectProps

Signature:

export interface SelectProps 

Properties

Property

Modifiers

Type

Description

className?

string

(Optional) The class name of the select field

defaultValue?

string

(Optional) The default value of the select field, if nothing has been selected yet

description?

string

(Optional) The description of the select field

disabled?

boolean

(Optional) Whether the select field should ignore user input

error?

string

(Optional) The error message of the select field

label?

string

(Optional) The label of the select field

name

string

The name of the select field

onBlur?

(event: FocusEvent<HTMLSelectElement>) => void

(Optional) onBlur handler for form integration

onChange?

(event: ChangeEvent<HTMLSelectElement>) => void

(Optional) onChange handler for form integration

onOpenChange?

(open: boolean) => void

(Optional) Callbak that is called when the select field is opened or closed

onValueChange?

(value: string) => void

(Optional) Callback that is called when the value of the select field changes

options?

Array<{ value: string; label: string; disabled?: boolean; }>

(Optional) The options of the select field

placeholder?

string

(Optional) A placeholder text to show if nothing has been selected and there's no default value

required?

boolean

(Optional) Whether the select field is required

size?

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

(Optional) The size of the select field

style?

React.CSSProperties

(Optional) The style of the select field

value?

string

(Optional) The current value of the select field