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
| Prop | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The URL to preview |
apiKey | string | Yes | Your PageSight API key |
categories | string[] | No | Categories to extract (default: ['metadata']) |
className | string | No | Custom CSS classes |
Note
This is a complete, single-file Svelte component. Simply copy the code above into a .svelte file in your project and import it where needed. Works with Svelte 3+ and includes TypeScript support.
PageSight