Header
fun-header is a sticky, slot-driven page header.
- Attaches a scroll listener to the nearest scrollable parent, falling back to
window. - Switches between
defaultandscrolledmodes using a configurable breakpoint with hysteresis to avoid rapid toggling. - Content is composed entirely through named slots — the component has a minimal prop surface.
Built-in Behavior
- Scroll-driven mode: switches to
scrolledmode once scroll offset exceedsbreakpoint + breakpointHysteresis; returns todefaultbelowbreakpoint - breakpointHysteresis. - Title: accepts either a
pageTitlestring prop or aslot="title"element (e.g.fun-field-label). Both are single-line with end-truncated ellipsis. The title shrinks fromh1toh2in scrolled mode. - Subtitle: collapses with a CSS grid animation when scrolled. Always single-line with ellipsis.
- Auto slot assignment: direct unslotted
fun-buttonchildren are automatically assignedslot="primary"(variantprimary) orslot="secondary"(all other variants). - Action button sizing:
fun-buttonelements inslot="primary",slot="secondary", and insidefun-button-group[slot="primary"]are kept atsize="md"via aMutationObserver. - Actions layout (left to right):
slot="super"→slot="tertiary"→slot="secondary"→slot="primary". Each action slot only renders if content is present. slot="super": optional superuser dropdown — quiet button trigger with eye + caret-down icons in warning colour. Hidden from regular users.slot="tertiary": optional overflow dropdown — secondary button trigger with an ellipsis icon. Items receive full-width layout inside the dropdown.slot="secondary": inline secondary actions. Button text is hidden on mobile via CSS.slot="primary": inline primary action, rightmost. Supports a singlefun-buttonor afun-button-group. Button text is hidden on mobile via CSS.- Extra row (
slot="extra"+slot="extra-right"): collapses with a CSS grid animation when scrolled, unlessshowExtraOnScrollistrue. - Breadcrumbs: rendered above the header when
breadcrumbsLinkshas at least one link and a title is present. Hidden when total crumb count (links + current) is one or fewer.
Examples
Index pages
Here is an example of typical index page. Full page demo here
- Does not have breadcrumb
- Has description
- Actions:
- One primary action : either Button group or regular button
- Max. 1 secondary action with icon
- No tertiary actions
- Optional super user actions
Details pages
Here is an example of typical details page. Full page demo here
- Required breadcrumb starting fron index page (moving away from home as root)
- Text or FunFieldLabel (fun-field-label) as title
- Optional badge for
- Status (fill with color, no icons)
- Type (Outline neutral with icon/brandlogo)
- Actions:
- Max one primary button based on the context.
- Max. 2 secondary action with icon. Edit is always secondary.
- Tertiary actions in dropdown triggered by ellipsis (awalwys in the order of below with divider between each section)
- Data exploration : Open in data explorer, Open in data chat
- Entity speicific actions : Edit name, Reconnect etc.
- Duplicate, Copy to workspace(s)
- Disable & delete (always in text-fun-danger)
- Optional super actions
Edit pages
Here is an example of typical Edit page. Full page demo here
- Breadcrumb: Starts from index page (not home)> entity > Edit
- Title: always the name of the enitity either as text or FunFieldLabel (fun-field-label)
- Actions
- Primary: Save (with icon: check)
- Secondary: Cancel (with icon: times)
Create page: Default
Here is an example of typical Edit page. Full page demo here
- Breadcrumb:
- Rule: Always ends with create
- Entity > Listing [optiona] > Create (ex: Expors > Destinations > Create, Metrics > Create)
- Header:
- Title should always be similar to the CTA that triggers it (ex: Connect data source, Crate export etc)
- When the create is a step after slecting from list - it should be in a badge - outlined, neutral with brand logo.
- Actions:
- Save & Cancel
Create page: with wizerd
Here is an example of typical Edit page. Full page demo here
- Breadcrumb:
- Rule: Always ends with create
- Entity > Listing [optiona] > Create (ex: Expors > Destinations > Create, Metrics > Create)
- Header:
- Title should always be similar to the CTA that triggers it (ex: Connect data source, Crate export etc)
- When the create is a step after slecting from list - it should be in a badge - outlined, neutral with brand logo.
- Actions:
- Save & Cancel
Specifications
Properties
| Property | Type | Default | Description |
|---|---|---|---|
pageTitle | string | undefined | Title text shown in the header. |
subtitle | string | undefined | Subtitle text shown next to the title. |
breadcrumbsLinks | BreadcrumbLink[] | [] | Breadcrumb links shown in fallback fun-breadcrumbs. |
breakpoint | number | 33 | Base scroll threshold for switching mode. |
breakpointHysteresis | number | 30 | Extra threshold offset used to avoid rapid toggling. |
showExtraOnScroll | boolean | false | Keeps the extra slot visible when scrolled. Subtitle still collapses. |
Slots
| Slot | Description |
|---|---|
badge | Optional badge shown to the right of the title. |
super | Items rendered inside the super actions dropdown. |
secondary | Secondary actions. Collapses behind the mobile more menu. |
primary | Primary actions shown as the main right-side action(s). |
extra | Optional content row rendered below the main title/actions row. |
extra-right | Optional right-aligned content area rendered next to extra. |