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

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

ScrollStack

scroll-stack

Stacks content cards progressively as the page scrolls.

Usage

Basic usage

Wrap each card in ScrollStackItem, each card being pinned to the top, stacked one on top of another, and scaled as you scroll down. A fixed-height container with a rollable interior is required.

01

Collection

Multi-source data access and cleaning, unified into the metadata layer.

02

Modeling

Low-code visual modeling, precipitating business semantics.

03

Arrangement

The node canvas arranges task links and executes them in topological order.

04

Insights

Real-time large screen and indicator board drive decision-making closed loop.

tsx
<div className="h-[28rem] overflow-hidden rounded-xl border border-border">
  <ScrollStack>
    <ScrollStackItem>Card 1</ScrollStackItem>
    <ScrollStackItem>Card 2</ScrollStackItem>
    <ScrollStackItem>Card 3</ScrollStackItem>
  </ScrollStack>
</div>

Sector rotation

rotationAmount Superimpose rotation increments on each layer of cards to form a poker-style fan-shaped dislocation.

01

Collection

Multi-source data access and cleaning, unified into the metadata layer.

02

Modeling

Low-code visual modeling, precipitating business semantics.

03

Arrangement

The node canvas arranges task links and executes them in topological order.

04

Insights

Real-time large screen and indicator board drive decision-making closed loop.

tsx
<ScrollStack rotationAmount={3}>
  <ScrollStackItem>Card 1</ScrollStackItem>
  <ScrollStackItem>Card 2</ScrollStackItem>
</ScrollStack>

Blurred depth of field

When blurAmount > 0, the cards further down are blurred to enhance depth; when reduced-motion, it is automatically turned off.

01

Collection

Multi-source data access and cleaning, unified into the metadata layer.

02

Modeling

Low-code visual modeling, precipitating business semantics.

03

Arrangement

The node canvas arranges task links and executes them in topological order.

04

Insights

Real-time large screen and indicator board drive decision-making closed loop.

tsx
<ScrollStack blurAmount={2}>
  <ScrollStackItem>Card 1</ScrollStackItem>
  <ScrollStackItem>Card 2</ScrollStackItem>
</ScrollStack>

Compact stacking

Make itemDistance smaller, baseScale larger, and itemStackDistance shorter to make the card more tightly packed.

01

Collection

Multi-source data access and cleaning, unified into the metadata layer.

02

Modeling

Low-code visual modeling, precipitating business semantics.

03

Arrangement

The node canvas arranges task links and executes them in topological order.

04

Insights

Real-time large screen and indicator board drive decision-making closed loop.

tsx
<ScrollStack itemDistance={60} baseScale={0.92} itemStackDistance={20}>
  <ScrollStackItem>Card 1</ScrollStackItem>
  <ScrollStackItem>Card 2</ScrollStackItem>
</ScrollStack>

When to use

Use ScrollStack for a narrative section where cards pin and stack as the user scrolls, such as feature explanations or process steps. Use InfiniteMenu for draggable spherical exploration, or FlyingPosters for a flying poster corridor.

Import

ts
import { ScrollStack, ScrollStackItem } from "@hulianui/ui"

Props

ScrollStack:

NameTypeDefaultDescription
itemDistancenumber100Initial vertical distance between cards in pixels.
itemScalenumber0.03Scale increment between adjacent cards.
itemStackDistancenumber30Vertical offset between pinned cards in pixels.
stackPositionstring"20%"Container position at which a card starts pinning.
scaleEndPositionstring"10%"Position at which a card reaches its target scale.
baseScalenumber0.85Base scale of the first, lowest card.
rotationAmountnumber0Rotation increment per stacked layer in degrees.
blurAmountnumber0Blur increment for lower cards in pixels; disabled under reduced motion.
classNamestring-Class name added to the scroll root.
styleCSSProperties-Inline styles forwarded to the scroll root.

ScrollStackItemProps (<ScrollStackItem>, a single card)

NameTypeDefaultDescription
itemClassNamestring-Custom class name added to the outer element of a single card.

Events

EventTypeDescription
onStackComplete() => voidCalled when the last card enters the pinning region.

Slots

SlotTypeDescription
childrenReactNodeCard content, normally wrapped in ScrollStackItem; elements marked data-scroll-stack-card participate.

ScrollStackItem accepts { children?: ReactNode; itemClassName?: string }.

Usage notes

  • The outer viewport must have a fixed height and overflow-hidden; otherwise there is no scroll distance for pinning.
  • Wrap cards in ScrollStackItem or add data-scroll-stack-card so they are included in measurements.
  • Reduced motion switches to a static layout and disables blurAmount. Do not rely on stacking to convey essential information.

Related

Table · Book3D · ProTable · PricingTable · JsonViewer · EditableTable

Playground

01

Collection

Multi-source data access and cleaning, unified into the metadata layer.

02

Modeling

Low-code visual modeling, precipitating business semantics.

03

Arrangement

The node canvas arranges task links and executes them in topological order.

04

Insights

Real-time large screen and indicator board drive decision-making closed loop.

<div className="h-[28rem] overflow-hidden rounded-xl border border-border">
  <ScrollStack
    itemDistance={100}
    itemScale={0.03}
    baseScale={0.85}
    rotationAmount={0}
    blurAmount={0}
  >
    <ScrollStackItem>Card 1</ScrollStackItem>
    <ScrollStackItem>Card 2</ScrollStackItem>
    <ScrollStackItem>Card 3</ScrollStackItem>
  </ScrollStack>
</div>
PreviousMagicBentoData DisplayNextProfileCard

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Events
    • Slots
    • Usage notes
    • Related
  • Playground