Component Preview Tooltip
Hover a name to show a live miniature of a component.
Import
tsx
import { ComponentPreviewTooltip } from "@cronus-ui/ui";
bash
npx cronus-ui add component-preview-tooltip
Examples
.cronus
No audit fixture declares this family in .cronus yet.
API Reference
Generated from the component's exported types.
ComponentPreviewTooltipLabels
| Prop | Type | Default | Description |
|---|---|---|---|
loading* | string | — | — |
notFound* | string | — | — |
preview* | string | — | — |
ComponentPreviewTooltipProps
Extends VariantProps<typeof componentPreviewTooltipVariants>
| Prop | Type | Default | Description |
|---|---|---|---|
children* | ReactNode | — | Contents of the component. |
componentName | string | — | Accessible name for the preview surface. |
preview | ReactNode | — | Ready-to-render preview. Preferred over `loadPreview`. |
loadPreview | () => Promise<{ default: ComponentType } | ComponentType> | — | Lazy-load a preview module when the tooltip opens. |
width | number | 300 | — |
height | number | 200 | — |
scale | number | 0.8 | — |
side | "top" | "right" | "bottom" | "left" | "right" | — |
className | string | — | Additional class names merged onto the root. |
labels | Partial<ComponentPreviewTooltipLabels> | — | Override default English strings. |
asChild | boolean | — | Render as the child element via Slot. |