BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ForgeUI/cosmicrift

Cosmicrift

forgeui/cosmicrift
FreeComponent

A WebGL-powered animated cosmic background featuring a procedural starfield with twinkling effects and flowing nebula-like wave distortions, rendered in real time using shaders.

Live preview

live · rendered by the registry
Rendered by ForgeUI on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://forgeui.in/r/cosmicrift.json

Source

registry/forgeui/cosmicrift.tsxforgeui.in/r/cosmicrift.json · first 6 KB
1"use client";
2
3import { useEffect, useMemo, useRef } from "react";
4import { cn } from "@/lib/utils";
5
6const vertexShaderGLSL = `
7attribute vec2 position;
8void main() {
9 gl_Position = vec4(position, 0.0, 1.0);
10}
11`;
12
13const fragmentShaderGLSL = `
14precision highp float;
15
16uniform vec2 u_resolution;
17uniform float u_time;
18uniform vec3 u_colorBackground;
19uniform vec3 u_colorStars;
20uniform float u_density;
21uniform float u_speed;
22
23float hash(vec2 p) {
24 return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);
25}
26
27void main() {
28 vec2 uv = gl_FragCoord.xy / u_resolution;
29 float aspect = u_resolution.x / u_resolution.y;
30
31 vec2 p = uv;
32 p.x *= aspect;
33
34 float t = u_time * u_speed * 0.5;
35
36 vec3 color = u_colorBackground;
37
38 float gridSize = 35.0 * u_density;
39 vec2 gridPos = floor(p * gridSize);
40 vec2 localUV = fract(p * gridSize) - 0.5;
41
42 float r = hash(gridPos);
43 float threshold = 0.85; // Low threshold = dense stars
44
45 if (r > threshold) {
46 vec2 offset = vec2(hash(gridPos + 12.0), hash(gridPos + 24.0)) - 0.5;
47 float dist = length(localUV - offset * 0.7);
48
49 float size = 0.025 + (r - threshold) * 0.6;
50 float brightness = smoothstep(size, 0.0, dist);
51
52 float twinkleSpeed = 1.0 + hash(gridPos + 100.0) * 3.0;
53 float twinkle = sin(t * twinkleSpeed * 2.0 + hash(gridPos + 200.0) * 6.28) * 0.5 + 0.5;
54 brightness *= (0.3 + twinkle * 0.7);
55
56 vec3 starCol = mix(u_colorStars, vec3(0.6, 0.8, 1.0), hash(gridPos + 300.0));
57
58 color += starCol * brightness * (r - threshold) * 7.0;
59 }
60
61 vec2 cuv = uv * 2.0 - 1.0;
62 cuv.x *= aspect;
63
64 vec3 waveColor = vec3(0.0);
65
66 for(float i = 1.0; i <= 4.0; i++) {
67 float xDistort = sin(cuv.y * 2.0 * i + t * (0.5 + i * 0.15)) * 0.2;
68 float yDistort = cos(cuv.x * 2.0 * i - t * 0.4) * 0.15;
69
70 vec2 distortedUV = cuv + vec2(xDistort, yDistort);
71 float dist = abs(distortedUV.y);
72
73 float glow = 0.015 / (dist + 0.015);
74
75 vec3 c1 = vec3(0.1, 0.02, 0.3);
76 vec3 c2 = vec3(0.0, 0.9, 1.0);
77 vec3 c3 = vec3(0.9, 0.1, 0.7);
78
79 vec3 layerCol = mix(c1, c2, sin(cuv.x * 2.5 + t + i) * 0.5 + 0.5);
80 layerCol = mix(layerCol, c3, cos(cuv.y * 3.0 - t) * 0.5 + 0.5);
81
82 waveColor += layerCol * glow * (1.5 / i);
83 }
84
85 float mask = smoothstep(1.0, 0.05, abs(cuv.y));
86
87 color += waveColor * mask;
88
89 float vignette = uv.x * (1.0 - uv.x) * uv.y * (1.0 - uv.y) * 15.0;
90 color *= pow(vignette, 0.15);
91
92// … truncated

Files it writes

  • registry/forgeui/cosmicrift.tsx

Facts

Registry
ForgeUI
Type
registry:ui
Access
Free
Files written
1
Licence
NOASSERTION
In the index
at or before 2026-08-08
Last confirmed
today

Go to the source

Docs on ForgeUI forgeui.in AmanShakya0018/forgeui on GitHub Raw registry item This item as JSON

More from ForgeUI

All 28 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Formanimated-formForgeUIComponentsFreeno deps
Animated OTPanimated-otpForgeUIComponentsFreeno deps
Animated Tabsanimated-tabsForgeUIComponentsFreeno deps
AuralisauralisForgeUIComponentsFreeno deps
Bot Detectionbot-detectionForgeUIComponentsFreeno deps
Chromatic Fluidchromatic-fluidForgeUIComponentsFreeno deps
CloudscapecloudscapeForgeUIComponentsFreeno deps
Expandable Cardexpandable-cardForgeUIComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex