链接预览
鼠标放置到链接上可动态预览该链接。
注意: This component uses qss
npm package as a dependency.
通过 CLI 安装
手动安装
API
Prop 名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
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 ). |
感谢
- Credits to M Atif for porting this component.
- Ported from Aceternity UI's Link Preview.