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

TiltedCard

tilted-card

Tilts an image card toward the pointer with optional caption and scale.

Usage

Basic usage

The pointer moves on the card surface to tilt 3D, and captionText renders a floating prompt bubble following the pointer.

Hulian component library

Moving mouse experience 3D Tilt

Hover me
tsx
<TiltedCard
  cardWidth="240px"
  cardHeight="240px"
  containerWidth="240px"
  containerHeight="240px"
  captionText="Hover me"
>
  <div className="flex h-full flex-col items-center justify-center gap-2 p-6 text-center">
    <p className="text-lg font-semibold text-foreground">Hulian Component Library</p>
    <p className="text-xs text-muted-foreground">Move the mouse to feel 3D tilt</p>
  </div>
</TiltedCard>

Overlay content

displayOverlayContent + overlayContent Raise the subtitle/title along with the tilt 3D.

NEW
tsx
<TiltedCard
  cardWidth="240px"
  cardHeight="240px"
  containerWidth="240px"
  containerHeight="240px"
  showTooltip={false}
  displayOverlayContent
  overlayContent={
    <span className="absolute left-3 top-3 rounded-full bg-primary px-2.5 py-1 text-xs font-medium text-primary-foreground">
      NEW
    </span>
  }
>
  <div
    className="h-full w-full rounded-2xl"
    style={{ background: "linear-gradient(135deg, var(--color-chart-1), var(--color-chart-3))" }}
  />
</TiltedCard>

Adjust the tilt amplitude

rotateAmplitude controls the maximum tilt angle, scaleOnHover controls hovering and zooming in, the larger it is, the more three-dimensional it is.

rotateAmplitude = 22
More three-dimensional
tsx
<TiltedCard
  cardWidth="240px"
  cardHeight="240px"
  containerWidth="240px"
  containerHeight="240px"
  rotateAmplitude={22}
  scaleOnHover={1.15}
  captionText="More three-dimensional"
>
  <div className="flex h-full items-center justify-center text-sm text-foreground">
    rotateAmplitude = 22
  </div>
</TiltedCard>

When to use

Use TiltedCard as a lightweight primitive for adding pointer-driven 3D tilt, scaling, and a floating caption to an image or content card. Use ProfileCard for a structured profile, PixelCard for pixel waves, or MagicBento for a spotlight grid.

Import

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

Props

NameTypeDefaultDescription
imageSrcstring-Image URL filling the card; it can be combined with or replaced by children.
altTextstring"Tilted card"Accessible image alternative; replace the generic default with content-specific text.
containerHeightCSSProperties["height"]"300px"Perspective container height.
containerWidthCSSProperties["width"]"100%"Perspective container width.
cardHeightCSSProperties["height"]"300px"Tilting card height.
cardWidthCSSProperties["width"]"300px"Tilting card width.
scaleOnHovernumber1.1Hover scale.
rotateAmplitudenumber14Maximum tilt in degrees.
showTooltipbooleantrueShows the pointer-following caption when content exists.
displayOverlayContentbooleanfalseShows overlayContent.
classNamestring-Class name merged into the outer <figure>.
styleCSSProperties-Inline styles merged into the perspective container.

Slots

SlotTypeDescription
captionTextReactNodePointer-following caption; empty content renders no caption.
overlayContentReactNodeBadge or title raised above the card and moving with its tilt.
childrenReactNodeCard content above the image and below the overlay.

Usage notes

  • Tilt requires a pointing device. Keep essential information available on touch and keyboard-only devices.
  • Container and card dimensions are separate; normally set matching pairs to avoid unexpected offsets.
  • Reduced motion disables tilt. [[motion-v12-interrupted-animation-promise-never-settles]]: when composing additional Motion sequences, an interrupted animation promise may never settle.

Related

Table · Book3D · ProTable · PricingTable · JsonViewer · EditableTable

Playground

TiltedCard
Hover me
<TiltedCard
  cardWidth="240px"
  cardHeight="240px"
  rotateAmplitude={14}
  scaleOnHover={1.1}
  showTooltip={true}
  captionText="Hover me"
>
  <div className="flex h-full items-center justify-center">TiltedCard</div>
</TiltedCard>
PreviousProfileCardData DisplayNextPixelCard

On this page

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