Products · Dash API
UI
Show an alert, or let the person pick a date or a time with the phone's own pickers.
dash.ui.alert
dash.ui.alert(options: AlertOptions, callOptions?: CallOptions): DashRequest<AlertResult>Shows the phone's own alert. Resolves with the action the person chose.
Types: AlertOptions, AlertResult
dash.ui.pickDate
dash.ui.pickDate(options?: PickDateOptions, callOptions?: CallOptions): DashRequest<string>Opens the phone's own calendar. Resolves with the chosen date, such as "2026-10-24", or rejects with cancelled if the person closes it.
Types: PickDateOptions
dash.ui.pickTime
dash.ui.pickTime(options?: PickTimeOptions, callOptions?: CallOptions): DashRequest<string>Opens the phone's own clock. Resolves with the chosen time in 24 hours, such as "19:30", or rejects with cancelled if the person closes it.
Types: PickTimeOptions
Types
AlertAction
| Field | Type | What it is |
|---|---|---|
id | string | What the alert resolves with, as action, when the person chooses this action. |
label | string | |
role (optional) | 'default' | 'cancel' | 'destructive' | cancel closes the alert, and on Android, Back or a tap outside the alert chooses it too. Without a cancel action, the alert stays until the person picks one. destructive marks something that can't be undone. |
AlertOptions
| Field | Type | What it is |
|---|---|---|
title | string | |
message (optional) | string | Dash ends it with a line naming the dot, such as "From Plasas Kitchen". |
actions (optional) | AlertAction[] | Default: one OK button. An empty list fails with invalid. |
AlertResult
| Field | Type | What it is |
|---|---|---|
action | string | The id of the action the person chose. |
PickDateOptions
| Field | Type | What it is |
|---|---|---|
title (optional) | string | |
value (optional) | string | The date chosen when the picker opens, such as "2026-10-24". |
min (optional) | string | The earliest date the person can pick, such as "2026-10-01". |
max (optional) | string | The latest date the person can pick, such as "2026-12-31". |
PickTimeOptions
| Field | Type | What it is |
|---|---|---|
title (optional) | string | |
value (optional) | string | A time of day in 24 hours, such as "19:30", chosen when the picker opens. |
Keep reading
SystemVibrate, use the torch, keep the screen on, copy, share, open the dialer or a web page, wait, and read facts about the phone.MediaLet the person take or choose a photo, choose a file from their phone, or scan a QR code.ContactsLet the person choose a phone number from their contacts.AccountSign the person in to your dot with their Dash account.