@molecule/app-page-chrome-solid

Feature · page-chrome · App (browser) · v1.1.2 · Apache-2.0

Solid page-header / hero-section primitives for SaaS apps

npm install @molecule/app-page-chrome-solid

npm · Source on GitHub

How it works

@molecule/app-page-chrome-solid is a ready-made page-chrome feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { createSignal } from 'solid-js'
import { HeroSection, PageHeader } from '@molecule/app-page-chrome-solid'
import { Button } from '@molecule/app-ui-solid'

export function ProjectsPage() {
  const [open, setOpen] = createSignal(false)
  return (
    <>
      <PageHeader
        title="Projects"
        subtitle="Manage your active projects"
        actions={<Button onClick={() => setOpen(true)}>New project</Button>}
      />
      <HeroSection
        eyebrow="Welcome back"
        title="Your workspace"
        description="Everything you need to ship faster."
        primaryAction={<Button variant="solid">Get started</Button>}
      />
    </>
  )
}

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid page-header and hero-section primitives — the Solid counterpart of @molecule/app-page-chrome-react: the same props (React names), the same DOM for the same input.

Exports:

  • <PageHeader> — top-of-page header with breadcrumbs + title/subtitle + leading icon + right-aligned actions + meta row. emphasis="extrabold" switches the title to the larger dashboard treatment.
  • <HeroSection> — dashboard/landing hero with text + optional media column; align="center" for marketing-style heroes.

Both accept className for per-brand accent styling and dataMolId for AI-agent selectors.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { createSignal } from 'solid-js'
import { HeroSection, PageHeader } from '@molecule/app-page-chrome-solid'
import { Button } from '@molecule/app-ui-solid'

export function ProjectsPage() {
  const [open, setOpen] = createSignal(false)
  return (
    <>
      <PageHeader
        title="Projects"
        subtitle="Manage your active projects"
        actions={<Button onClick={() => setOpen(true)}>New project</Button>}
      />
      <HeroSection
        eyebrow="Welcome back"
        title="Your workspace"
        description="Everything you need to ship faster."
        primaryAction={<Button variant="solid">Get started</Button>}
      />
    </>
  )
}

Type

feature

Installation

npm install @molecule/app-page-chrome-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

PageHeaderProps

Props accepted by the PageHeader component.

interface PageHeaderProps {
  /** Primary heading (usually `t('...')`). */
  title: JSX.Element
  /** Optional subheading rendered below the title. */
  subtitle?: JSX.Element
  /** Optional leading icon next to the title. */
  icon?: JSX.Element
  /** Optional breadcrumb trail rendered above the title row. */
  breadcrumbs?: JSX.Element
  /** Right-aligned actions (buttons, menus, etc.). */
  actions?: JSX.Element
  /** Optional meta row rendered below the title/subtitle (status chips, timestamps, etc.). */
  meta?: JSX.Element
  /**
   * Title emphasis level. Both values resolve their weight through
   * `cm.fontWeight(...)`, so the class is a real, theme-scanned utility.
   * - `'normal'` (default) — 3xl `cm.fontWeight('bold')`, for general /
   *   reusable list-page headers.
   * - `'extrabold'` — the larger 4xl `cm.fontWeight('extrabold')` dashboard
   *   treatment (`font-extrabold` is safelisted by `@molecule/app-ui-tailwind`'s
   *   base.css, so it always generates).
   */
  emphasis?: 'normal' | 'extrabold'
  /** `data-mol-id` for AI-agent selectors. */
  dataMolId?: string
  /** Extra classes on the outer wrapper. */
  className?: string
}

HeroSectionProps

Props accepted by the HeroSection component.

interface HeroSectionProps {
  /** Small eyebrow line above the headline. */
  eyebrow?: JSX.Element
  /** Primary headline. */
  title: JSX.Element
  /** Supporting description. */
  description?: JSX.Element
  /** Primary call-to-action. */
  primaryAction?: JSX.Element
  /** Optional secondary call-to-action. */
  secondaryAction?: JSX.Element
  /** Optional visual / illustration slot, positioned to the right at md+. */
  media?: JSX.Element
  /** Horizontal alignment — defaults to `start`. */
  align?: 'start' | 'center'
  /** Extra classes. */
  className?: string
  /** `data-mol-id` for AI-agent selectors. */
  dataMolId?: string
}

Functions

HeroSection(props)

Dashboard / landing hero. Text column on the left, optional media on the right. Alignment defaults to start for dashboards; use align="center" for marketing-style landing heroes.

function HeroSection(props: HeroSectionProps): JSX.Element
  • props — Component props (see HeroSectionProps).

Returns: The rendered hero section.

PageHeader(props)

Standard page-top header with optional breadcrumbs, leading icon, title / subtitle pair, meta row, and right-aligned actions.

Layout: breadcrumbs, then a two-column row with title+subtitle on the left and actions on the right, then optional meta.

function PageHeader(props: PageHeaderProps): JSX.Element
  • props — Component props (see PageHeaderProps).

Returns: The rendered page header.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.14.0 || ^4.0.0
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid
  • @molecule/app-ui
  • @molecule/app-ui-solid
  • solid-js

Not to be confused with @molecule/app-ui-solid's own <PageHeader> (props: title/description/actions/breadcrumbs): THIS PageHeader takes subtitle (not description) and adds icon, meta, and emphasis. Import from the package that matches the props you pass. Styling resolves via getClassMap() from @molecule/app-ui, so a ClassMap bond (e.g. @molecule/app-ui-tailwind) must be wired before render.