Vue Component
Single-file Vue 3 component for displaying rich link previews using the PageSight API.
PageSightLinkPreview.vue
Copy this entire file to your project. It's a complete, standalone Vue 3 component using the Composition API with TypeScript support. The component handles API calls, loading states, error handling, and rendering.
PageSightLinkPreview.vue
Loading code...
Usage
Import and use the component in your Vue 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 |
Events
| Event | Payload | Description |
|---|---|---|
error | Error | Emitted when an error occurs |
Note
This is a complete, single-file Vue component. Simply copy the code above into a .vue file in your project and import it where needed. Requires Vue 3 with Composition API support.
PageSight