Search docs/

ion-picker

A Picker is a dialog that displays a row of buttons and columns underneath. It appears on top of the app's content, and at the bottom of the viewport.

Properties

animated

Description

If true, the picker will animate.

Attributeanimated
Typeboolean
Defaulttrue

backdropDismiss

Description

If true, the picker will be dismissed when the backdrop is clicked.

Attributebackdrop-dismiss
Typeboolean
Defaulttrue

buttons

Description

Array of buttons to be displayed at the top of the picker.

TypePickerButton[]
Default[]

columns

Description

Array of columns to be displayed in the picker.

TypePickerColumn[]
Default[]

cssClass

Description

Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces.

Attributecss-class
Typestring | string[] | undefined

duration

Description

Number of milliseconds to wait before dismissing the picker.

Attributeduration
Typenumber
Default0

enterAnimation

Description

Animation to use when the picker is presented.

Type((Animation: Animation, baseEl: any, opts?: any) => Promise<Animation>) | undefined

keyboardClose

Description

If true, the keyboard will be automatically dismissed when the overlay is presented.

Attributekeyboard-close
Typeboolean
Defaulttrue

leaveAnimation

Description

Animation to use when the picker is dismissed.

Type((Animation: Animation, baseEl: any, opts?: any) => Promise<Animation>) | undefined

mode

Description

The mode determines which platform styles to use.

Attributemode
Type"ios" | "md"

showBackdrop

Description

If true, a backdrop will be displayed behind the picker.

Attributeshow-backdrop
Typeboolean
Defaulttrue

Events

NameDescription
ionPickerDidDismissEmitted after the picker has dismissed.
ionPickerDidPresentEmitted after the picker has presented.
ionPickerWillDismissEmitted before the picker has dismissed.
ionPickerWillPresentEmitted before the picker has presented.

Methods

dismiss

Description

Dismiss the picker overlay after it has been presented.

Signaturedismiss(data?: any, role?: string | undefined) => Promise<boolean>

getColumn

Description

Get the column that matches the specified name.

SignaturegetColumn(name: string) => Promise<PickerColumn | undefined>

onDidDismiss

Description

Returns a promise that resolves when the picker did dismiss.

SignatureonDidDismiss() => Promise<OverlayEventDetail<any>>

onWillDismiss

Description

Returns a promise that resolves when the picker will dismiss.

SignatureonWillDismiss() => Promise<OverlayEventDetail<any>>

present

Description

Present the picker overlay after it has been created.

Signaturepresent() => Promise<void>

CSS Custom Properties

NameDescription
--backgroundBackground of the picker
--background-rgbBackground of the picker in rgb format
--border-colorBorder color of the picker
--border-radiusBorder radius of the picker
--border-styleBorder style of the picker
--border-widthBorder width of the picker
--heightHeight of the picker
--max-heightMaximum height of the picker
--max-widthMaximum width of the picker
--min-heightMinimum height of the picker
--min-widthMinimum width of the picker
--widthWidth of the picker
View Source