Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Text

  • Text
  • Heading
  • SectionHeader
  • Prose
  • Markdown
  • Formula
  • AuroraText
  • LineShadowText
  • AnimatedShinyText
  • AnimatedGradientText
  • WordRotate
  • TypingAnimation
  • SparklesText
  • SplitText
  • BlurText
  • FlipText
  • TextReveal
  • DecryptedText
  • GlitchText
  • CircularText
  • ScrollReveal
  • TrueFocus
  • ASCIIText
  • CurvedLoop
  • FallingText
  • FuzzyText
  • ScrambledText
  • ScrollFloat
  • ScrollVelocity
  • Shuffle
  • TextCursor
  • TextPressure
  • VariableProximity

Code

  • Code
  • CodeBlock
  • Snippet
  • CodeDiff
  • Kbd

LineShadowText

line-shadow-text

Offsets a hard-edged striped shadow behind short display text.

Usage

Basic usage

A static striped shadow that defaults to --color-foreground, so it holds up in both light and dark themes.

HulianHulian
tsx
<LineShadowText className="text-5xl font-bold">Hulian</LineShadowText>

Shadow color

shadowColor accepts any CSS color; a token needs the --color- prefix.

HulianHulian
tsx
<LineShadowText className="text-5xl font-bold" shadowColor="var(--color-primary)">
  Hulian
</LineShadowText>

Stripe width and offset

lineWidth sets the stripe density and offset sets the shadow distance; both use em, so they scale with the font size.

BoldBold
tsx
<LineShadowText className="text-5xl font-bold" lineWidth="0.12em" offset="0.08em">
  Bold
</LineShadowText>

Drift (optional)

animated drifts the stripes slowly along the diagonal. It is off by default because this preset is the most restrained member of the text-effect family, usable on print pages and corporate sites. Even when enabled it still respects prefers-reduced-motion.

MotionMotion
tsx
<LineShadowText className="text-5xl font-bold" animated duration="8s">
  Motion
</LineShadowText>

Accenting a brand word in a hero heading

Shadow only the two-to-four word brand phrase and leave the rest of the heading in ordinary type.

HulianHulian admin component library

tsx
<h1 className="text-4xl font-bold text-foreground">
  <LineShadowText shadowColor="var(--color-primary)">Hulian</LineShadowText> admin component library
</h1>

When to use

Use LineShadowText to give a two-to-four word brand phrase or hero heading a hard-edged diagonal shadow. It is the most restrained member of the text-effect family: static by default, no animation frame loop, pure CSS, so print pages, corporate sites, and prefers-reduced-motion environments can all use it.

For a flowing gradient use AuroraText, for a sweeping highlight use AnimatedShinyText, and for per-character entrances use SplitText. Use Text for ordinary copy.

Import

ts
import { LineShadowText } from "@hulianui/ui"

Props

Inherits the native <span> attributes; children is narrowed below.

NameTypeDefaultDescription
children *string-Text to shadow. Strings only: the shadow layer is a copy of the same text, and non-text nodes cannot be reproduced.
shadowColorstringvar(--color-foreground)Shadow color. Tokens need the --color- prefix; a bare var(--primary) does not resolve under Tailwind v4's @theme.
offsetstring"0.04em"Shadow offset from the text. Using em keeps it proportional to the font size.
lineWidthstring"0.06em"Stripe thickness and spacing. Larger values give coarse stripes, smaller ones approach a solid shadow.
animatedbooleanfalseDrifts the stripes along the diagonal. See Usage guidelines for why this is off by default.
durationstring"15s"Seconds per drift cycle; only effective while animated is true.

Usage guidelines

  • Static by default is deliberate, not unfinished. The value of this preset is precisely "design flourish without motion"; making animated the default would erase what separates it from the rest of the family. Even when enabled, the animation still respects prefers-reduced-motion.
  • children accepts strings only. The shadow layer renders the same text again and clips the stripes to the glyphs with bg-clip-text; passing an icon or nested element only produces visual noise. Use another effect for rich nodes.
  • The shadow layer is a real DOM node marked aria-hidden, not ::after with content: attr(data-text). Some screen readers announce pseudo-element content, which reads the same word twice; a real node can be marked decorative explicitly.
  • Do not apply it to long body copy: at small sizes the stripes blur into a grey fringe, and every glyph carries an extra paint.
  • Do not hard-code the shadow as black (the upstream default): under a dark theme that is an invisible black smudge. Use a token.

Related

AuroraText · AnimatedShinyText · SparklesText · GlitchText · SplitText · Text

Playground

HulianHulian
<LineShadowText offset="0.04em" lineWidth="0.06em">Hulian</LineShadowText>
PreviousAuroraTextTypographyNextAnimatedShinyText

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Usage guidelines
    • Related
  • Playground