Crystalline

Physics-based fragmentation with rotating crystal shards.

Main Features of Crystalline

How to Use Crystalline in Next.js

Installation Guide for Crystalline

Props

Customize the component with these props

PropertyTypeDefaultDescription
backgroundColor
stringbg-zinc-950Background color of the component
title
stringCrystallineTitle text displayed
subtitle
stringMove quickly to see shardsSubtitle text displayed
velocityThreshold
number5Velocity threshold for shard creation
particleColor
stringrgba(255, 255, 255, 1)Color of the shard particles
sizeMin
number2Minimum shard size
sizeMax
number8Maximum shard size
lifeDecay
number0.02Shard life decay rate
gravity
number2Gravity effect on shards
spinRange
[number, number][-5, 5]Range of spin rotation
angleRange
[number, number][0, 360]Range of initial angles
className
stringAdditional CSS classes

When to Use

Perfect for tech-focused portfolios, digital product launches, and Next.js applications with a 'crystalline' or 'geometric' design system. Use this React component to add a sharp, high-energy fragmentation effect that triggers when the user moves their cursor quickly.

Best Practices

Optimize for performance by ensuring the `velocityThreshold` is high enough so shards only appear during intentional quick movements. To follow React best practices, use the `gravity` prop to ensure shards fall off-screen naturally without cluttering the viewport. Maintain consistent spacing within your design system by keeping the `sizeMax` within a professional range.

Why This Component Matters in Modern UI Development

Crystalline and fragmentation effects are at the forefront of modern UI design for technical brands. This animated UI component helps شما build an interface that feels reactive and precise, adding semantic authority and visual depth to your real-world application architecture.

Frequently Asked Questions

QCan I use custom icons as shards?

The current version uses geometric polygons for performance, but the drawing loop can be extended to support custom SVG paths or icons.

QWhat triggers the shatter effect?

The effect is triggered by mouse velocity; once the movement speed exceeds the `velocityThreshold`, new shards are instantiated.

QIs the rotation random?

Yes, each shard is assigned a random spin from the `spinRange` to ensure the fragmentation looks organic and unscripted.

Crystalline - React Magnetic Cursor & Hover Effects | Uilora