Line Shadow Text
A text component with a moving line shadow.
ShipFast
import { createIsDark } from '@/demos/shared/theme'import { LineShadowText } from '@/registry/magicui/line-shadow-text'
export function LineShadowTextDemo() { const isDark = createIsDark() const shadowColor = () => (isDark() ? 'white' : 'black')
return ( <h1 class=" text-5xl leading-none font-semibold tracking-tighter text-balance sm:text-6xl md:text-7xl lg:text-8xl " > Ship <LineShadowText class="italic" shadowColor={shadowColor()}> Fast </LineShadowText> </h1> )}Installation
Section titled “Installation”pnpm dlx shadcn@latest add @magicui-solid/line-shadow-textbunx shadcn@latest add @magicui-solid/line-shadow-textyarn dlx shadcn@latest add @magicui-solid/line-shadow-textnpx shadcn@latest add @magicui-solid/line-shadow-textImport
Section titled “Import”import { LineShadowText } from '@/components/magicui/line-shadow-text'<LineShadowText>Magic UI</LineShadowText>| Prop | Type | Default | Description |
|---|---|---|---|
shadowColor |
string |
"black" |
The color of the shadow effect |
children |
string |
- |
The text to display with shadow effect |
as |
ValidComponent |
"span" |
The element to render the text as |
Original:
magicui.design/docs/components/line-shadow-text