Skip to content
Overlays & Tooltips

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.

React onlyParity: Not portedParity scoreboard

API Reference

Generated from the component's exported types.

ComponentPreviewTooltipLabels

Skip ComponentPreviewTooltipLabels props table
PropTypeDefaultDescription
loading*
string
notFound*
string
preview*
string

ComponentPreviewTooltipProps

Extends VariantProps<typeof componentPreviewTooltipVariants>

Skip ComponentPreviewTooltipProps props table
PropTypeDefaultDescription
children*
ReactNodeContents of the component.
componentName
stringAccessible name for the preview surface.
preview
ReactNodeReady-to-render preview. Preferred over `loadPreview`.
loadPreview
() => Promise<{ default: ComponentType } | ComponentType>Lazy-load a preview module when the tooltip opens.
width
number300
height
number200
scale
number0.8
side
"top" | "right" | "bottom" | "left""right"
className
stringAdditional class names merged onto the root.
labels
Partial<ComponentPreviewTooltipLabels>Override default English strings.
asChild
booleanRender as the child element via Slot.