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

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

Events

EventPayloadDescription
errorErrorEmitted when an error occurs
PageSight | PageSight