Next Generation AI Platform
Transform your workflow with cutting-edge artificial intelligence and machine learning solutions.
Fast Processing
Process data at lightning speed with our optimized algorithms
Advanced Security
Enterprise-grade security with end-to-end encryption
Smart Analytics
Gain insights with real-time data analysis
John Doe
CEO, TechCorp
"This platform has revolutionized how we handle our data processing. The speed and accuracy are unmatched."
Jane Smith
CTO, DataFlow
"The security features and analytics capabilities have exceeded our expectations. Highly recommended!"
Starter
- 5 Projects
- 10GB Storage
- Basic Analytics
Pro
- Unlimited Projects
- 100GB Storage
- Advanced Analytics
Enterprise
- Custom Solutions
- Unlimited Storage
- Premium Support
Ready to Get Started?
Join thousands of companies already using our platform to transform their business.
Installation
Copy and paste the following code into your project.
components/ui/beam-portal.tsx
import React from "react";
import { cn } from "@/lib/utils";
export type PortalVariant =
| "matrix"
| "sunset"
| "aurora"
| "cosmic"
| "cyber"
| "frost"
| "fire"
| "void";
export type PortalPattern = "linear" | "radial" | "wave" | "pulse" | "zigzag";
export interface BeamPortalProps extends React.HTMLAttributes<HTMLDivElement> {
className?: string;
/** Color scheme of the portal. Default is aurora */
colorScheme?: PortalVariant;
/** Animation pattern for beams. Default is radial */
pattern?: PortalPattern;
/** Animation intensity level. Default is active */
intensity?: "calm" | "active" | "intense";
/** Whether to reverse the animation direction */
reverse?: boolean;
/** Whether to add a shimmer effect */
shimmer?: boolean;
/** Whether to add a pulse effect */
pulse?: boolean;
/** Whether to use random distribution for beams */
randomize?: boolean;
/** Blur amount for glow effects (px) */
blurAmount?: number;
/** Children to render in portal */
children: React.ReactNode;
}
const colorSchemes = {
matrix: {
primary: "0, 255, 0",
secondary: "0, 200, 0",
tertiary: "0, 150, 0",
},
sunset: {
primary: "255, 100, 0",
secondary: "255, 50, 100",
tertiary: "200, 0, 150",
},
aurora: {
primary: "0, 255, 200",
secondary: "100, 200, 255",
tertiary: "150, 100, 255",
},
cosmic: {
primary: "255, 0, 255",
secondary: "150, 0, 255",
tertiary: "50, 0, 200",
},
cyber: {
primary: "0, 255, 255",
secondary: "0, 150, 255",
tertiary: "0, 100, 255",
},
frost: {
primary: "200, 255, 255",
secondary: "150, 200, 255",
tertiary: "100, 150, 255",
},
fire: {
primary: "255, 150, 0",
secondary: "255, 100, 0",
tertiary: "255, 50, 0",
},
void: {
primary: "100, 0, 255",
secondary: "50, 0, 200",
tertiary: "25, 0, 150",
},
};
const intensitySettings = {
calm: { speed: 10, opacity: 0.2, count: 4, delay: 0.5 },
active: { speed: 7, opacity: 0.3, count: 6, delay: 0.3 },
intense: { speed: 5, opacity: 0.4, count: 8, delay: 0.2 },
};
const patternStyles = {
linear: {
transform: "translateY(var(--offset))",
animation: "beam-drop",
},
radial: {
transform: "rotate(var(--beam-angle))",
animation: "beam-drop",
},
wave: {
transform: "rotate(var(--beam-angle)) translateX(var(--wave-offset))",
animation: "beam-wave",
},
pulse: {
transform: "scale(var(--pulse-scale))",
animation: "beam-pulse",
},
zigzag: {
transform: "rotate(var(--beam-angle)) translateX(var(--zigzag-offset))",
animation: "beam-zigzag",
},
};
function BeamRing({
colors,
count,
radius,
settings,
pattern,
reverse,
shimmer,
pulse,
randomize,
blurAmount,
rotateSpeed,
}: {
colors: { base: string; glow: string };
count: number;
radius: string;
settings: { speed: number; opacity: number; delay: number };
pattern: PortalPattern;
reverse?: boolean;
shimmer?: boolean;
pulse?: boolean;
randomize?: boolean;
blurAmount?: number;
rotateSpeed?: number;
}) {
const getPosition = React.useCallback(
(index: number) => {
if (!randomize) {
return index * (360 / count);
}
const hash = (index * 1337) % 360;
return hash;
},
[count, randomize],
);
const getBeamStyle = (index: number) => {
const angle = getPosition(index);
const delay = settings.delay * index;
const patternStyle = patternStyles[pattern];
const animations = [
`${patternStyle.animation} ${settings.speed}s cubic-bezier(0.4, 0.26, 0, 0.97) ${delay}s infinite ${
reverse ? "reverse" : ""
}`,
];
if (pulse) {
animations.push(
`beam-pulse ${settings.speed * 1.5}s ease-in-out ${delay}s infinite`,
);
}
if (shimmer) {
animations.push(
`beam-shimmer ${settings.speed}s linear ${delay}s infinite`,
);
}
return {
"--beam-angle": `${angle}deg`,
"--offset": "0px",
"--wave-offset": "0px",
"--pulse-scale": "1",
"--zigzag-offset": "0px",
transform: patternStyle.transform,
animation: animations.join(", "),
filter: `blur(${blurAmount || 6}px)`,
} as React.CSSProperties;
};
return (
<div
className="absolute inset-0 dark:opacity-80"
style={{
animation: rotateSpeed
? `spin ${rotateSpeed}s linear infinite${reverse ? " reverse" : ""}`
: undefined,
}}
>
{Array.from({ length: count }).map((_, i) => (
<div
key={i}
className="absolute left-1/2 top-1/2 h-full origin-bottom"
style={{ transform: `translateX(-50%) rotate(${getPosition(i)}deg)` }}
>
<div
className="absolute left-0 top-0 h-full w-[1px] overflow-hidden"
style={{
backgroundColor: `rgba(${colors.base}, ${settings.opacity})`,
}}
>
<div
className="absolute left-0 top-[-50%] h-[15vh] w-full"
style={{
background: `linear-gradient(to bottom, rgba(${colors.glow}, 0) 0%, rgba(${colors.glow}, 1) 75%, rgba(${colors.glow}, 1) 100%)`,
...getBeamStyle(i),
}}
/>
</div>
</div>
))}
</div>
);
}
export function BeamPortal({
className,
colorScheme = "aurora",
pattern = "radial",
intensity = "active",
reverse = false,
shimmer = false,
pulse = false,
randomize = false,
blurAmount = 6,
children,
...props
}: BeamPortalProps) {
const colors = colorSchemes[colorScheme];
const settings = intensitySettings[intensity];
return (
<div
className={cn(
"group relative min-h-[300px] overflow-hidden rounded-xl bg-zinc-100 dark:bg-zinc-950",
className,
)}
{...props}
>
<BeamRing
colors={{ base: colors.primary, glow: colors.primary }}
count={12}
radius="100%"
settings={settings}
pattern={pattern}
reverse={reverse}
shimmer={shimmer}
pulse={pulse}
randomize={randomize}
blurAmount={blurAmount}
rotateSpeed={20}
/>
<div className="absolute inset-[15%]">
<BeamRing
colors={{ base: colors.secondary, glow: colors.secondary }}
count={8}
radius="85%"
settings={{
...settings,
speed: settings.speed * 0.8,
}}
pattern={pattern}
reverse={!reverse}
shimmer={shimmer}
pulse={pulse}
randomize={randomize}
blurAmount={blurAmount}
rotateSpeed={15}
/>
</div>
<div className="absolute inset-[30%]">
<BeamRing
colors={{ base: colors.tertiary, glow: colors.tertiary }}
count={6}
radius="70%"
settings={{
...settings,
speed: settings.speed * 0.6,
}}
pattern={pattern}
reverse={reverse}
shimmer={shimmer}
pulse={pulse}
randomize={randomize}
blurAmount={blurAmount}
rotateSpeed={10}
/>
</div>
<div
className="absolute inset-0"
style={{
background: `radial-gradient(circle at 50% 50%,
rgba(${colors.tertiary}, 0.1) 0%,
rgba(${colors.secondary}, 0.05) 45%,
rgba(${colors.primary}, 0.02) 70%,
transparent 100%
)`,
}}
/>
<div className="relative z-10 flex h-full min-h-[300px] items-center justify-center p-8">
<div className="rounded-lg bg-white/50 p-6 backdrop-blur-xs dark:bg-black/50">
{children}
</div>
</div>
</div>
);
}
Update your globals.css
Add the following animations to your globals.css
:
@theme {
--animate-beam-drop: beam-drop 7s cubic-bezier(0.4, 0.26, 0, 0.97) infinite;
--animate-beam-wave: beam-wave 10s ease-in-out infinite;
--animate-beam-pulse: beam-pulse 4s ease-in-out infinite;
--animate-beam-zigzag: beam-zigzag 6s ease-in-out infinite;
--animate-beam-shimmer: beam-shimmer 7s linear infinite;
--animate-spin: spin 10s linear infinite;
@keyframes beam-drop {
0% {
opacity: 0;
--offset: -100%;
}
5% {
opacity: 1;
}
90% {
opacity: 1;
}
100% {
opacity: 0;
--offset: 100%;
}
}
@keyframes beam-wave {
0% {
--wave-offset: -20px;
}
50% {
--wave-offset: 20px;
}
100% {
--wave-offset: -20px;
}
}
@keyframes beam-pulse {
0% {
opacity: 0.3;
--pulse-scale: 0.95;
}
50% {
opacity: 1;
--pulse-scale: 1.05;
}
100% {
opacity: 0.3;
--pulse-scale: 0.95;
}
}
@keyframes beam-zigzag {
0% {
--zigzag-offset: -20px;
}
25% {
--zigzag-offset: 20px;
}
50% {
--zigzag-offset: -20px;
}
75% {
--zigzag-offset: 20px;
}
100% {
--zigzag-offset: -20px;
}
}
@keyframes beam-shimmer {
0% {
opacity: 0.3;
}
50% {
opacity: 1;
}
100% {
opacity: 0.3;
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
}
Update the import paths to match your project setup.
import BeamPortal from "@/components/ui/beam-portal";
Usage
import BeamPortal from "@/components/ui/beam-portal";
export default function Example() {
return (
<BeamPortal
colorScheme="matrix"
pattern="radial"
intensity="active"
shimmer={true}
>
<div className="text-center">
<h3 className="text-2xl font-bold text-green-400">Matrix Portal</h3>
<p className="text-zinc-300">Digital rain effect</p>
</div>
</BeamPortal>
);
}
Core Features
1. Color Schemes
Eight predefined themes to match your design:
<BeamPortal colorScheme="cyber">{/* Content */}</BeamPortal>
Available schemes:
matrix
: Digital green cyberpunksunset
: Warm orange to purpleaurora
: Northern lights effectcosmic
: Deep space ambiancecyber
: Neon blue tech themefrost
: Ice-cold crystallinefire
: Dynamic flame effectvoid
: Dark purple mystique
2. Animation Patterns
Five distinct beam patterns:
<BeamPortal pattern="wave">{/* Content */}</BeamPortal>
linear
: Straight beam pathsradial
: Circular rotationwave
: Fluid undulationpulse
: Energy pulsationzigzag
: Lightning patterns
3. Intensity Levels
Control the animation energy:
<BeamPortal intensity="intense">{/* Content */}</BeamPortal>
calm
: Subtle, slow movementsactive
: Balanced animationintense
: High-energy motion
Props
Prop | Type | Default | Description |
---|---|---|---|
colorScheme | ColorScheme | "aurora" | Portal color theme |
pattern | Pattern | "radial" | Animation pattern |
intensity | Intensity | "active" | Animation intensity |
reverse | boolean | false | Reverse animation |
shimmer | boolean | false | Add shimmer effect |
pulse | boolean | false | Add pulse effect |
randomize | boolean | false | Random beam distribution |
blurAmount | number | 6 | Glow blur radius (px) |
Examples
Hero Section
<BeamPortal
colorScheme="aurora"
pattern="radial"
intensity="active"
shimmer={true}
className="min-h-[400px]"
>
<div className="max-w-2xl space-y-6 text-center">
<h1 className="text-5xl font-bold">
Next Generation
<span className="bg-linear-to-r from-blue-400 to-emerald-400 bg-clip-text text-transparent">
Platform
</span>
</h1>
<p className="text-xl text-zinc-300">
Transform your workflow with cutting-edge solutions
</p>
</div>
</BeamPortal>
Feature Card
<BeamPortal colorScheme="cyber" pattern="wave" intensity="calm" shimmer={true}>
<div className="space-y-4 text-center">
<div className="mx-auto h-12 w-12 rounded-full bg-cyan-500/20 p-2">
<IconComponent className="h-8 w-8 text-cyan-400" />
</div>
<h3 className="text-xl font-bold text-cyan-400">Fast Processing</h3>
<p className="text-zinc-300">
Lightning-fast data processing with optimized algorithms
</p>
</div>
</BeamPortal>
Call to Action
<BeamPortal
colorScheme="matrix"
pattern="radial"
intensity="intense"
pulse={true}
shimmer={true}
>
<div className="space-y-6 text-center">
<h3 className="text-3xl font-bold text-green-400">Ready to Get Started?</h3>
<p className="text-lg text-zinc-300">
Join thousands of companies transforming their business
</p>
<div className="flex justify-center gap-4">
<Button size="lg">Start Free Trial</Button>
<Button size="lg" variant="outline">
Schedule Demo
</Button>
</div>
</div>
</BeamPortal>
Customization
Theme Combinations
Mix and match effects for unique visuals:
<BeamPortal
colorScheme="void"
pattern="zigzag"
intensity="intense"
shimmer={true}
pulse={true}
randomize={true}
blurAmount={10}
>
{/* Creates a dynamic void portal effect */}
</BeamPortal>