Skip to main content

Hero

Rocket 2.0

The Hero component is a banner at the top of a page, with a title, subtitle, key facts and up to two action buttons. Use it for a dashboard greeting or a page header.

Properties​

Property
Description
Expected Value
EyebrowSmall text shown above the title.Text. Default: Operations
TitleMain heading of the banner.Text. Default: Good morning, Ada
SubtitleText shown under the title.Text. Default: Here is what needs you today.
Meta factsShort facts shown as chips under the subtitle, as a list of text or { label, value } objects.Array. Default: ["Sun, 11 Oct", "14 bookings", "3 need a reply"]
Primary action label (empty hides it)Text on the main button. Leave it empty to hide the button.Text. Default: New booking
Secondary action label (empty hides it)Text on the second, outlined button. Leave it empty to hide the button.Text
Aside: a figure, or a list of factsContent shown at the side of the banner: a headline figure, or a list of up to four facts.Text
Aside label (the figure's caption, the facts' heading)Heading shown above the aside figure or facts.Text
Icon (lucide name, e.g. sparkles)Icon shown next to the title, by its Lucide name, such as sparkles.Text
BackgroundLook of the banner panel. Tint, Gradient, Dark and Solid are based on the accent color, Image uses Background image URL, and Plain has no panel.Plain, Tint, Gradient, Image, Dark, Solid. Default: Tint
Background image URL (when Background is Image)Image shown behind the banner when Background is Image.Text
AlignWhether the banner's content is aligned to the left or centered.Left, Center. Default: Left
SizePadding and text size of the banner.Compact, Default, Large. Default: Default
Loading lookWhat the component shows while it is loading: a Spinner or a grey Skeleton placeholder.Spinner, Skeleton. Default: Spinner

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off
Dynamic heightLets the component grow with its content in the running app instead of keeping a fixed height.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On action clickedTriggers when the user clicks the main button.
On secondary action clickedTriggers when the user clicks the second button.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Set visibilityShows the component when true, hides it when false.components.hero1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.hero1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.hero1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
eyebrowSmall text shown above the title.{{components.hero1.eyebrow}}
titleMain heading of the banner.{{components.hero1.title}}
subtitleText shown under the title.{{components.hero1.subtitle}}
metaShort facts shown as chips under the subtitle, as a list of text or { label, value } objects.{{components.hero1.meta}}
actionLabelText on the main button. Leave it empty to hide the button.{{components.hero1.actionLabel}}
secondaryActionLabelText on the second, outlined button. Leave it empty to hide the button.{{components.hero1.secondaryActionLabel}}
asideValueContent shown at the side of the banner: a headline figure, or a list of up to four facts.{{components.hero1.asideValue}}
asideLabelHeading shown above the aside figure or facts.{{components.hero1.asideLabel}}
iconIcon shown next to the title, by its Lucide name, such as sparkles.{{components.hero1.icon}}
backgroundLook of the banner panel. Tint, Gradient, Dark and Solid are based on the accent color, Image uses Background image URL, and Plain has no panel.{{components.hero1.background}}
imageUrlImage shown behind the banner when Background is Image.{{components.hero1.imageUrl}}
alignWhether the banner's content is aligned to the left or centered.{{components.hero1.align}}
sizePadding and text size of the banner.{{components.hero1.size}}
loadingIndicatorWhat the component shows while it is loading: a Spinner or a grey Skeleton placeholder.{{components.hero1.loadingIndicator}}
isVisibleWhether the component is visible.{{components.hero1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.hero1.isLoading}}
isDisabledWhether the component is disabled.{{components.hero1.isDisabled}}

Styles​

Style
Default
Accent colorTheme: Brand primary
Panel background color (replaces the Background choice)—
Title colorTheme: Primary text
Subtitle and meta colorTheme: Placeholder text
Panel radius—
Title typefaceTheme font
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.