Hero
Hero is a large banner section with centered content. Perfect for landing pages and feature highlights.
Basic Example
Centered hero with call-to-action
const { default: Hero } = await import('/components/layout/hero.js');
const { default: Button } = await import('/components/actions/button.js');
const { tags, $ } = Lightview;
const { h1, p } = tags;
const hero = Hero({ class: 'bg-base-200 min-h-64 rounded-box' },
Hero.Content({ center: true },
h1({ class: 'text-5xl font-bold' }, '🚀 Hello Lightview'),
p({ class: 'py-6 max-w-md' },
'Build reactive UIs with a lightweight, powerful library.'
),
Button({ color: 'primary' }, 'Get Started')
)
);
$('#demo').insert(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.
With Overlay
Hello there
Provident cupiditate voluptatem et in.
For more examples, see the
DaisyUI Hero documentation.