For Tailwind CSS v3 docs, click here.

交互网格背景

A interactive background grid pattern made with SVGs, fully customizable.

通过 CLI 安装

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

手动安装

复制并粘贴以下代码:

InteractiveGridPattern.vue

示例

API

Props

Prop 名称类型默认值描述
classNamestring-Additional classes for styling the component.
squaresClassNamestring-Additional classes for styling the squares.
widthnumber40Width of the square in pixels.
heightnumber40Height of the square in pixels.
squares[number, number][24, 24]Number of squares in the grid pattern.

感谢