Link Preview
Dynamic link previews for your anchor tags
Note: This component requires qss
npm package as a dependency.
Please install qss using following commands.
API
Prop Name | Type | Default | Description |
---|---|---|---|
class | string | "" | Custom class applied to the main element. |
linkClass | string | "" | Custom class applied to the link element. |
width | number | 200 | Width of the preview image. |
height | number | 125 | Height of the preview image. |
isStatic | boolean | false | Determines if the preview image is static or a URL preview (set to true for static mode). |
imageSrc | string | "" | The source of the image to display (required if isStatic is true ). |
url | string | "" | URL for the link and for generating the preview image (required if isStatic is false ). |
Component Code
You can copy and paste the following code to create these components:
LinkPreview.vue
Credits
- Credits to M Atif for porting this component.
- Ported from Aceternity UI's Link Preview.