Atelier UI

搜索组件…

搜索组件…

Particles Background

粒子连线网络画布背景,随鼠标互动,离屏或切后台自动暂停。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

ParticlesBackgroundProps

同时支持以下类型的全部属性: React.ComponentProps<"div">

属性类型默认值说明
densitynumber1.1Particles per 10,000 px² of area
linkDistancenumber120Max distance in px at which two dots are linked
speednumber1Drift speed multiplier
colorstring"currentColor"Dot and line color, any CSS color. Defaults to the inherited text color
mouseRadiusnumber160Radius in px of the pointer's attract/link zone. 0 disables it

安装

$ npx shadcn@latest add https://chromotion.dev/r/particles-background.json

同类组件