Hero is a large banner section with centered content. Perfect for landing pages and feature highlights.
Basic Example
Centered hero with call-to-action
await import('/components/layout/hero.js');
await import('/components/actions/button.js');
const { tags, $ } = Lightview;
const { h1, p, Hero, Button } = tags;
const hero = Hero({ style: 'background-color: oklch(var(--b2)); min-height: 16rem; border-radius: 1rem;' },
Hero.Content({ position: 'center' },
h1({ style: 'font-size: 3rem; line-height: 1; font-weight: 800;' }, '🚀 Hello Lightview'),
p({ style: 'padding: 1.5rem 0; max-width: 28rem;' },
'Build reactive UIs with a lightweight, powerful library.'
),
Button({ color: 'primary' }, 'Get Started')
)
);
$('#example').content(hero);
Sub-components
| Component | Props | Description |
|---|---|---|
Hero.Content |
center | Content container |
Hero.Overlay |
- | Dark overlay for background images |
With Figure
Box Office News!
Provident cupiditate voluptatem et in.