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

InfiniteMenu

infinite-menu

Navigates an endless spherical menu of image-linked items.

Usage

Basic usage

items are evenly arranged around the sphere and can be dragged and rotated; the item facing the camera is the active item, and its title/description is displayed on the overlay. When image is omitted, the card displays the first character of the title.

O
T
M
D
D
S
N
A

Overview

Project global view

tsx
<div
  className="relative h-80 overflow-hidden rounded-xl"
  style={{ background: "oklch(0.16 0.02 255)" }}
>
  <InfiniteMenu
    items={[
      { title: "Overview", description: "Project Global View" },
      { title: "Task", description: "Workflow in progress" },
      { title: "Members", description: "Team and Permissions" },
    ]}
  />
</div>

Enlarge the sphere · Large card

scale zooms in on the sphere, itemSize zooms in on the single card diameter.

O
T
M
D
D
S
N
A

Overview

Project global view

tsx
<InfiniteMenu items={items} scale={1.15} itemSize={104} />

Turn off auto-rotation

autoRotate={0} Turn off spin, the sphere only rotates when dragged.

O
T
M
D
D
S
N
A

Overview

Project global view

tsx
<InfiniteMenu items={items} autoRotate={0} />

When to use

Use InfiniteMenu to turn navigation or gallery entries into an exploratory draggable sphere on a creative home page or portfolio. Use FlyingPosters for a scrolling poster corridor, or TiltedCard for a single 3D-tilting card.

Import

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

Props

NameTypeDefaultDescription
itemsInfiniteMenuItem[][]Items distributed with a Fibonacci sphere. The front item becomes active; an empty array renders a placeholder sphere.
scalenumber1Sphere scale. Larger values bring larger cards closer.
itemSizenumber88Item diameter in pixels.
autoRotatenumber6Y-axis rotation in degrees per second. Zero disables it; reduced motion forces zero.
classNamestring-Class name forwarded to the root.
styleCSSProperties-Inline styles forwarded to the root.

InfiniteMenuItem

NameTypeDefaultDescription
imagestring-Card image URL, cropped to fill the circular card. Without it only the title's first character shows.
titlestring-Title shown in the overlay while the item is active.
descriptionstring-Secondary copy shown in the overlay while the item is active.
linkstring-Destination for the action arrow. Values starting with http open in a new tab; anything else is handed to the onItemActivate callback.

Events

EventTypeDescription
onActiveItemChange(item: InfiniteMenuItem, index: number) => voidCalled after drag snapping selects the front item.
onItemActivate(item: InfiniteMenuItem, index: number) => void | falseCalled from the active action. Return false to prevent the default window.open.

InfiniteMenuItem is { image?: string; title?: string; description?: string; link?: string }. An HTTP link opens in a new tab; other links are left to onItemActivate. Without an image, the title's first character is shown.

Usage notes

  • The host needs explicit dimensions because sphere geometry is measured from it.
  • Non-HTTP links do not navigate automatically; handle them with onItemActivate, for example with router.push.
  • The component uses CSS 3D and RAF. Reduced motion disables auto-rotation; use a real browser to verify interaction states.
  • The action label is built from "\u6253\u5f00 " (“Open ”) plus the active title, or falls back to "\u6253\u5f00\u6fc0\u6d3b\u9879" (“Open active item”). Placeholder titles use "\u83dc\u5355\u9879 N" (“Menu item N”) and descriptions use "\u5360\u4f4d\u9879 \u00b7 \u4f20\u5165 items \u66ff\u6362" (“Placeholder · pass items to replace”).

Related

Table · Book3D · ProTable · PricingTable · JsonViewer · EditableTable

Playground

O
T
M
D
D
S
N
A

Overview

Project global view

<div className="relative h-80 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.16 0.02 255)" }}>
  <InfiniteMenu
    items={items}
    scale={1}
    itemSize={88}
    autoRotate={6}
  />
</div>
PreviousFlyingPostersData DisplayNextMagicBento

On this page

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