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

CurvedLoop

curved-loop

Repeats text along a draggable curved path in a continuous loop.

Usage

Basic usage

The copy scrolls seamlessly along the quadratic Bezier curve. By default, it bends downward and rolls to the left, and can be dragged and moved.

HULIAN · 
tsx
<div className="flex h-44 items-center overflow-hidden rounded-xl">
  <CurvedLoop text="HULIAN · " className="text-white" />
</div>

Curved upward

curveAmount Pass a negative value to make the curve convex upward (positive value is concave downward, 0 is approximately a straight line).

ENTERPRISE UI · 
tsx
<CurvedLoop text="ENTERPRISE UI · " curveAmount={-220} />

Scroll right · High speed

direction="right" scrolls in reverse, speed increases speed.

Hulian component library · 
tsx
<CurvedLoop text="Hulian component library · " direction="right" speed={4} />

Pure display (no dragging)

interactive={false} Turn off drag interaction, only automatic scrolling.

HULIAN UI · 
tsx
<CurvedLoop text="HULIAN UI · " interactive={false} />

When to use

Use CurvedLoop for an arced marquee in a hero or section divider. Choose ScrollVelocity for multiple horizontal rows that accelerate or reverse with page scrolling. Choose CurvedLoop when one curved text strip should loop seamlessly and allow manual dragging.

Import

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

Props

Inherits SVGProps<SVGSVGElement> (removes ref), commonly used as follows:

NameTypeDefaultDescription
textstring"\u745a\u740f \u00b7 HULIAN \u00b7 "Marquee text. The built-in Chinese copy begins with “Hulian”; trailing whitespace is trimmed, non-breaking spaces separate phrases, and the ends are joined to fill the curve seamlessly.
speednumber2Scroll speed in pixels per frame at roughly 60fps; larger values move faster.
curveAmountnumber320Vertical offset of the quadratic Bézier control point in viewBox pixels. Positive values curve down, negative values curve up, and 0 is nearly straight.
direction"left" | "right""left"Automatic scrolling direction.
interactivebooleantrueEnables mouse and touch dragging; after release, scrolling continues in the drag direction.
classNamestring-Text-color class such as text-primary; the default fill uses currentColor from this class or the parent.

Usage guidelines

  • End text with a separator such as " · ". The component inserts non-breaking spacing before joining the end to the start; without a separator, the loop seam reads as one merged phrase.
  • Color inherits currentColor. Set it with a text-* class on className instead of passing fill directly.
  • Reduced-motion mode stops automatic scrolling but keeps manual dragging available. Do not make the animation the only carrier of important information.

Related

Text · Heading · Prose · Markdown · AuroraText · AnimatedShinyText

Playground

HULIAN · 
<div className="flex h-44 items-center overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <CurvedLoop
    text="HULIAN · "
    speed={2}
    curveAmount={320}
    direction="left"
    interactive={true}
    className="text-white"
  />
</div>
PreviousASCIITextTypographyNextFallingText

On this page

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