Getting Started
Scroll Animations
Text Animations
Hover & Cursor
Sliders & Carousels
Galleries & Grids
Menus & Navigation
Preloaders & Intros
Page Transitions
3D & WebGL
import { InlineIconTextScroll } from "@/registry/tween/inline-icon-text-scroll"
export function InlineIconTextScrollDemo() {
return <InlineIconTextScroll />
}
import { InlineIconTextScroll } from "@/components/ui/inline-icon-text-scroll"<InlineIconTextScroll
title="Orrery"
icons={["/icons/orbit.svg", "/icons/sketch.svg", "/icons/ship.svg"]}
parts={[null, "Sketch it,", null, "shape it,", null, "ship it."]}
/>The hero pins for pinDistanceFactor viewport heights and one scrubbed ScrollTrigger drives four phases:
The trigger resolves its scroller with usePreviewScroller, and positions are measured relative to the pinned section, so nothing depends on window scroll. With prefers-reduced-motion: reduce the final state is shown.
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | "Orrery" | Header title. |
subtitle | ReactNode | default copy | Header subtitle. |
icons | string[] | 5 SVG icons | Icon images. Icon i flies into placeholder i. |
parts | (string | null)[] | default paragraph | Paragraph parts; null marks an inline icon placeholder. |
outro | ReactNode | "Open beta, Monday" | Text of the section after the pin. |
pinDistanceFactor | number | 8 | Pin length in viewport heights. |
dark | string | "#16130f" | Initial background and paragraph text color. |
light | string | "#ece5d8" | Final background and header text color. |
scroller | HTMLElement | string | null | — | Optional ScrollTrigger scroller; defaults to the preview one. |
className | string | — | Extra classes on the outer container. |