Skip to content
Magic UI SolidMagicUI Solid

Line Shadow Text

A text component with a moving line shadow.

ShipFast

@/demos/LineShadowTextDemo.tsx
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>
)
}
Terminal window
pnpm dlx shadcn@latest add @magicui-solid/line-shadow-text
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