For Tailwind CSS v3 docs, click here.

链接预览

鼠标放置到链接上可动态预览该链接。

通过 CLI 安装

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://registry.inspira-ui.com/link-preview.json"

手动安装

Install the dependencies

npm
pnpm
bun
yarn
npm install qss

复制并粘贴以下代码:

API

Prop 名称类型默认值描述
classstring""Custom class applied to the main element.
linkClassstring""Custom class applied to the link element.
widthnumber200Width of the preview image.
heightnumber125Height of the preview image.
isStaticbooleanfalseDetermines if the preview image is static or a URL preview (set to true for static mode).
imageSrcstring""The source of the image to display (required if isStatic is true).
urlstring""URL for the link and for generating the preview image (required if isStatic is false).

感谢