Link Preview
Hover a URL to unfurl title, description, and thumbnail.
Import
tsx
import { LinkPreview } from "@cronus-ui/ui";
bash
npx cronus-ui add link-preview
Examples
.cronus
No audit fixture declares this family in .cronus yet.
API Reference
Generated from the component's exported types.
LinkPreviewLabels
| Prop | Type | Default | Description |
|---|---|---|---|
invalidUrl* | string | — | — |
failed* | string | — | — |
unavailable* | string | — | — |
preview* | string | — | — |
favicon* | string | — | — |
LinkPreviewProps
| Prop | Type | Default | Description |
|---|---|---|---|
href* | string | — | — |
children* | ReactNode | — | Contents of the component. |
className | string | — | Additional class names merged onto the root. |
endpoint | string | "https://api.microlink.io" | Endpoint that returns URL metadata as JSON. Receives the target URL as a `url` query param and must return microlink.io shape (`{ title, description, image, logo, publisher }` or `{ data: … }`). |
fetcher | (href: string, endpoint: string) => Promise<LinkPreviewMetadata> | fetchLinkPreviewMetadata | — |
labels | Partial<LinkPreviewLabels> | — | Override default English strings. |