LinkPreview
A link enriched with what the destination is.
One normaliser, normalizeLinkPreview, turns the app's preview payload into a kind (repository, video, article, social post, docs, Wikipedia, package, image, file, internal post or website) and the rich fields that kind earns; three variants present it.
Installation
Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.
Usage
Examples
Playground
Link previews
States
API
15 props
Accessibility
Every variant is a real link with a readable name; the hover card opens on focus too and only adds detail. Unavailable links (400, 404, 410) say so in their accessible name, and stats are read as "1.3K stars", not bare numbers.
Notes
- The app owns fetching: Gaudi only calls an endpoint the app configures, never third-party pages, and derives no image URLs itself.
- usePreviewData caches responses (LRU, one hour; failures for a minute) and deduplicates concurrent requests.