feat(ui): eliminate zoom effect with fixed 16:9 landscape aperture, add aiease-style interactive hero showcase with borderbeam and quick chips

This commit is contained in:
2026-11-04 18:22:18 +05:30
parent cd98c1a483
commit 6349eb1f71
20 changed files with 679 additions and 139 deletions
+66
View File
@@ -0,0 +1,66 @@
'use client';
import React from 'react';
import { cn } from '@/lib/utils';
interface BorderBeamProps {
className?: string;
size?: number;
duration?: number;
borderWidth?: number;
anchor?: number;
colorFrom?: string;
colorTo?: string;
delay?: number;
}
export function BorderBeam({
className,
size = 250,
duration = 12,
borderWidth = 1.5,
anchor = 90,
colorFrom = '#3b82f6',
colorTo = '#8b5cf6',
delay = 0,
}: BorderBeamProps) {
return (
<div
style={
{
'--size': `${size}px`,
'--duration': `${duration}s`,
'--anchor': `${anchor}%`,
'--border-width': `${borderWidth}px`,
'--color-from': colorFrom,
'--color-to': colorTo,
'--delay': `-${delay}s`,
} as React.CSSProperties
}
className={cn(
'pointer-events-none absolute inset-0 rounded-[inherit] overflow-hidden',
className
)}
>
<div
className="absolute inset-0 rounded-[inherit]"
style={{
padding: `${borderWidth}px`,
mask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
WebkitMask: 'linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)',
maskComposite: 'exclude',
WebkitMaskComposite: 'xor',
}}
>
<div
className="absolute inset-[-100%] animate-spin pointer-events-none"
style={{
animationDuration: `${duration}s`,
animationDelay: `${delay}s`,
background: `conic-gradient(from 0deg at 50% 50%, transparent 0deg, transparent 270deg, ${colorFrom} 315deg, ${colorTo} 360deg)`,
}}
/>
</div>
</div>
);
}