Loading…
← All components

Navigation · Glass

Prismatic Island Nav

A floating island navbar cut from prismatic acrylic: a light beam follows the active tab, a refracted spot travels inside the glass and caustics play on the page.

<PrismaticIslandNav />Live

Customize

Beam#a78bfa

Installation

Use it in your project

Or skip the copy-paste

One command: writes the file and installs the dependencies.

$ npx deepui-cli add prismatic-island-nav

Pro component: run npx deepui-cli login first with a token from your library.

01

Install

The 3D packages this component is built on.

$ npm install three @react-three/fiber @react-three/drei && npm install -D @types/three
02

Add the component

One self-contained file: create components/PrismaticIslandNav.tsx and paste it in.

03

Drop it in a page

Updated live with the settings above.

app/page.tsx
1"use client";
2
3import { useState } from "react";
4import PrismaticIslandNav from "@/components/PrismaticIslandNav";
5
6export default function Section() {
7 const [activeId, setActiveId] = useState("product");
8
9 return (
10 // The component fills this box: give it a position and a height
11 <div style={{ position: "relative", width: "100%", height: "240px" }}>
12 <PrismaticIslandNav
13 items={[
14 { id: "product", label: "Product" },
15 { id: "showcase", label: "Showcase" },
16 { id: "pricing", label: "Pricing" },
17 { id: "docs", label: "Docs" },
18 ]}
19 refractionIndex={1.5}
20 causticsIntensity={1}
21 islandTiltMax={7}
22 frostedRoughness={0.18}
23 indicatorGlowColor="#a78bfa"
24 activeId={activeId}
25 onSelect={setActiveId}
26 />
27 </div>
28 );
29}
Next componentKinetic Tactile Button→