Solar Flare Hero

Dark split hero: title, description and buttons beside a solar flare orb, with a page-colored gradient keeping the text clear. Title, description, actions and the orb art are props.

Installation

npx shadcn@latest add @01orbital/solar-flare-hero

Usage

import { SolarFlareHero } from "@/components/hero/solar-flare-hero"
import { DemoLabel } from "@/components/text/demo-label"

// The copy: change text here, not in the markup.
const COPY = {
  title: "Interfaces with atmosphere.",
  description:
    "Distinctive React components, page sections and generative artwork. Install and make it yours.",
  captions: {
    default: "Default orb",
    custom: "Orb: your own art",
    titleOnly: "Title only: no description, no actions",
  },
} as const

const ACTIONS = [
  { label: "Browse components", href: "#" },
  { label: "View examples", href: "#" },
] as const

/** Solar Flare Hero with its default orb, with an orb of your own, and with
 * only a title. */
export default function SolarFlareHeroDemo() {
  return (
    <div className="grid w-full gap-8">
      <div className="grid gap-2">
        <SolarFlareHero
          level={2}
          className="min-h-0"
          title={COPY.title}
          description={COPY.description}
          actions={ACTIONS}
        />
        <DemoLabel className="px-6">{COPY.captions.default}</DemoLabel>
      </div>
      <div className="grid gap-2">
        <SolarFlareHero
          level={2}
          className="min-h-0"
          title={COPY.title}
          description={COPY.description}
          actions={ACTIONS}
          orb={
            <div className="absolute inset-[18%] rounded-full bg-linear-to-br from-primary/60 via-primary/10 to-transparent blur-2xl lg:left-[40%]" />
          }
        />
        <DemoLabel className="px-6">{COPY.captions.custom}</DemoLabel>
      </div>
      <div className="grid gap-2">
        <SolarFlareHero level={2} className="min-h-0" title={COPY.title} />
        <DemoLabel className="px-6">{COPY.captions.titleOnly}</DemoLabel>
      </div>
    </div>
  )
}

This example installs with everything it uses:

npx shadcn@latest add @01orbital/solar-flare-hero-demo

API reference

A dark split hero: the title, text and buttons on the left and a solar flare orb on the right, which stacks below the text on narrower screens. On wide screens a gradient in the page's own color keeps the copy clear of the flare. The hero is always dark, whatever the page's theme. Other props go to the Hero.

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: cn. The CLI installs it for you.

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

Used in blocks

One block is built with Solar Flare Hero.

Last updated on