Kinetic UI
Back to Introduction
Premium Cards

Floating 3D Card

A stunning premium card that renders an interactive WebGL 3D object responding to the user's mouse.

Quick Actions
CLI Installation
npx kinetic-ui-cli@latest add floating-3d-card

The Floating3DCard bridges the gap between traditional UI design and advanced WebGL experiences. Utilizing React Three Fiber, it renders a high-performance 3D scene directly inside a standard DOM layout with 5 unique geometry variants.

Live Preview

Floating 3D Card
Wireframe

Crystal Architecture

A wireframe icosahedron with a semi-transparent glass inner core. Reacts smoothly to your cursor with metallic reflections.

Installation

npx kinetic-ui-cli@latest add floating-3d-card

Variants

| Variant | Geometry | Material | Best For | |---|---|---|---| | crystal | Wireframe Icosahedron + Glass Core | Physical + Clearcoat | SaaS, Developer tools | | nebula | Distorted Sphere | MeshDistort | AI/ML, Creative platforms | | prism | Glass Octahedron + Orbital Ring | Physical Transmission | Analytics, Data products | | plasma | Organic Blob | Distort + Emissive | Gaming, Entertainment | | ring | Torus Knot | Physical Metallic | Fintech, Luxury brands |

How it works

This component encapsulates a Canvas from React Three Fiber. Inside the Canvas, it renders one of five geometry variants, each with its own Scene sub-component. During each frame, useFrame reads state.pointer (normalized mouse position) and smoothly interpolates the 3D object's rotation to follow the cursor. The Float helper from drei adds organic hovering motion. Environment provides realistic image-based lighting and ContactShadows grounds the object in the card.

Usage Guide

1. Import the Component

Import the component into your React or Next.js page:

import { Floating3DCard } from "@/components/creative/floating-3d-card";

2. Implementation Example

Render the component and customize its behavior by passing props:

import { Floating3DCard } from "@/components/creative/floating-3d-card";

export default function Example() {
  return (
    <div className="w-full flex items-center justify-center p-8">
      <Floating3DCard
      >
        <div>Content goes here</div>
      </Floating3DCard>
    </div>
  );
}
Performance Notes
  • Uses CSS hardware acceleration via GPU transform-binds.
  • Damped interpolation minimizes paint-redraw flashes.
  • Tree-shakable import: only compiles elements requested.
Accessibility Notes
  • Full keyboard focus-ring navigation support (`Tab`/`Shift+Tab`).
  • ARIA roles mapped correctly for assistive screen readers.
  • Respects `prefers-reduced-motion` system toggles.