Skip to main content

Entity Hero

A hero section component for displaying entity details with full-width image background, glassmorphism panels, and animated content. Supports ViewTransition for smooth page transitions.

Installation

$ npx shadcn@latest add @orecus/entity-hero
Dependencies:
motion
Registry:
skeleton@orecus/use-reduced-motion@orecus/color-utils

Component

Hero image

Mountain Vista Resort

A luxury mountain retreat featuring stunning panoramic views and world-class amenities.

Props

PropTypeDefaultDescription
entity*T extends BaseEntity | undefined | nullThe entity data to display. Shows skeleton when undefined/null.
image*HeroImage<T>Image configuration with key, alt, and fallback URL
ImageComponentReact.ElementType'img'Image component to use (e.g., next/image for Next.js)
panelType'normal' | 'subtle' | 'strong''normal'Glass panel type for all content panels
panelInvertbooleantrueUse inverted glass style (light on light, dark on dark)
height'sm' | 'md' | 'lg''md'Height preset (sm: 250/300px, md: 300/400px, lg: 400/500px)
classNamestringAdditional CSS classes

Compound Components

EntityHero.Above

Content at the very top of the hero, above TopLeft/TopRight. Useful for embedded page headers.

PropTypeDefaultDescription
panelbooleanfalseWhether to show glass panel background
classNamestringAdditional CSS classes

EntityHero.TopLeft

Content in the top left corner

PropTypeDefaultDescription
panelbooleanfalseWhether to show glass panel background
classNamestringAdditional CSS classes

EntityHero.TopRight

Content in the top right corner

PropTypeDefaultDescription
panelbooleanfalseWhether to show glass panel background
classNamestringAdditional CSS classes

EntityHero.Header

Content above the main panel (e.g., category badge)

PropTypeDefaultDescription
panelbooleantrueWhether to show glass panel background
classNamestringAdditional CSS classes

EntityHero.Content

Main content panel for title, description, and custom content

PropTypeDefaultDescription
panelbooleantrueWhether to show glass panel background
classNamestringAdditional CSS classes