For Tailwind CSS v3 docs, click here.

3D文字

A stylish 3D text component with customizable colors, shadows, and animation options.

通过 CLI 安装

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

手动安装

复制并粘贴以下代码:

Text3d.vue

API

Prop 名称类型默认值描述
textColorstring"white"Color of the main text.
letterSpacingnumber-0.1Adjusts the spacing between letters in ch units.
strokeColorstring"black"Color of the text stroke.
shadowColorstring"yellow"Color of the text shadow.
strokeSizenumber20Thickness of the text stroke in pixels.
shadow1Sizenumber7Size of the first shadow layer in pixels.
shadow2Sizenumber10Size of the second shadow layer in pixels.
classstring""Additional CSS classes for custom styling.
animatebooleantrueEnables wiggle animation when set to true.
animationDurationnumber1500Duration of the wiggle animation in milliseconds.

功能特性

  • 3D Text Effect: Adds a three-dimensional stroke and shadow effect to text for a bold, layered look.
  • Customizable Colors & Sizes: Easily adjust text color, stroke size, shadow colors, and letter spacing.
  • Wiggle Animation: Includes an optional wiggle animation to make the text bounce for added emphasis.
  • Flexible Animation Control: Customize the animation speed with the animationDuration prop.