Svelte Component

Single-file Svelte component for displaying rich link previews using the PageSight API.

PageSightLinkPreview.svelte

Copy this entire file to your project. It's a complete, standalone Svelte component with TypeScript support. The component handles API calls, loading states, error handling, and rendering using Svelte's reactive syntax.

PageSightLinkPreview.svelte
Loading code...

Usage

Import and use the component in your Svelte application.

Loading code...

Component Props

PropTypeRequiredDescription
urlstringYesThe URL to preview
apiKeystringYesYour PageSight API key
categoriesstring[]NoCategories to extract (default: ['metadata'])
classNamestringNoCustom CSS classes
PageSight | PageSight