Skip to main content
Big news! Interval has been acquired by Meter. Learn more →

io.display.heading

Displays a heading to the action user.

Usage

await io.display.heading("User created!", {
description: "Updated 5 minutes ago",
menuItems: [
{
label: "Edit user",
route: "edit_user",
params: { userId: 12 },
},
],
});
interval.com

Props

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

Did this section clearly explain what you wanted to learn?
On this page