Cover
A flexible cover component for displaying featured images with optional action buttons for changing or removing the cover.
Preview
Installation
Use the CLI to add this component to your project.
Usage
tsx
15 linesCopy
Sizes
Default (35vh)
Small (12vh)
Large (50vh)
No Image (Placeholder)
No cover image
With Children
Hero Title
Subtitle or description text
Props
| Prop | Type | Default | Description |
|---|---|---|---|
url | string | undefined | The URL of the cover image |
size | 'default' | 'sm' | 'lg' | 'full' | default | The height of the cover |
preview | boolean | false | If true, hides action buttons (view-only mode) |
onChange | () => void | undefined | Callback when 'Change cover' button is clicked |
onRemove | () => void | undefined | Callback when 'Remove' button is clicked |
children | ReactNode | undefined | Content to render inside the cover (e.g., overlays) |
className | string | undefined | Additional CSS classes |