io.display.heading
Displays a heading to the action user.
Usage
- TypeScript
- JavaScript
- Python
await io.display.heading("User created!", {
description: "Updated 5 minutes ago",
menuItems: [
{
label: "Edit user",
route: "edit_user",
params: { userId: 12 },
},
],
});
await io.display.heading("User created!", {
description: "Updated 5 minutes ago",
menuItems: [
{
label: "Edit user",
route: "edit_user",
params: { userId: 12 },
},
],
});
await io.display.heading("User created!",
description="Updated 5 minutes ago",
menu_items=[
{
"label": "Edit user",
"action": "edit_user",
"params": { "userId": 12 },
},
],
)
interval.com
Props
- TypeScript
- JavaScript
- Python
description
OptionalNew in 0.32.0
string
Descriptive secondary text displayed below the heading.
level
OptionalNew in 0.32.0
2 | 3 | 4
The heading level, defaults to 2.
menuItems
OptionalNew in 0.32.0
object[]
Array of link buttons to display in a row next to the heading.
{
// the button text
label: string;
// links the item to an external URL
url?: string;
// links the item to another action or page
route?: string;
// arbitrary key/value pairs to send to the linked route
props?: Record<string, any>;
// the style of the item, defaults to "secondary"
theme?: 'primary' | 'secondary' | 'danger';
}[]
Returns
null
description
OptionalNew in 0.32.0
string
Descriptive secondary text displayed below the heading.
level
OptionalNew in 0.32.0
2 | 3 | 4
The heading level, defaults to 2.
menuItems
OptionalNew in 0.32.0
object[]
Array of link buttons to display in a row next to the heading.
{
// the button text
label: string;
// links the item to an external URL
url?: string;
// links the item to another action or page
route?: string;
// arbitrary key/value pairs to send to the linked route
props?: Record<string, any>;
// the style of the item, defaults to "secondary"
theme?: 'primary' | 'secondary' | 'danger';
}[]
Returns
null
description
Optional
str
Descriptive secondary text displayed below the heading.
level
Optional
Literal[2,3,4]
The heading level. Defaults to 2.
menu_items
Optional
Iterable[ButtonItem]
List of link buttons to display in a row next to the heading.
PrimitiveValue = str | int | float | bool | date | time | datetime
class ButtonItem(TypedDict):
label: str
theme: NotRequired[Literal["primary", "secondary", "danger"]]
route: NotRequired[str]
params: NotRequired[Mapping[str, PrimitiveValue]]
url: NotRequired[str]
disabled: NotRequired[bool]
placeholder
Optional
str
Text to display in the input when no value is set.
Returns
None
Was this section useful?