Isaiah

BJORK Lattice orb

Component 19

About

Lattice orb is a production-ready ai component from BJORK UI, packaged for shadcn registries.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds BJORK Lattice orb to your project and fits it to your theme.

Code

How BJORK Lattice orb is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";
import { ThemeProvider as BjorkDemoThemeProvider } from "next-themes";
import { useState } from "react";
import { LatticeOrb, type LatticeOrbHit, type OrbState } from "@/components/ui/bjork-lattice-orb";

const PREVIEW_HITS: LatticeOrbHit[] = [
  { lat: 0.35, lon: 0.6 },
  { lat: -0.2, lon: 2.1 },
  { lat: 0.1, lon: 3.4 },
  { lat: -0.4, lon: 5.0 },
];

const SMALL_ORBS: { value: OrbState; label: string }[] = [
  { value: "connecting", label: "Connecting" },
  { value: "composing", label: "Composing" },
  { value: "error", label: "Error" },
];
function SourceDemo(){
const isPreview = false;
const [state, setState] = useState<OrbState>("searching");
const [hits, setHits] = useState<LatticeOrbHit[]>([]);
const demo = isPreview ? (
    <LatticeOrb state="searching" hits={PREVIEW_HITS} size={320} time={1.4} />
  ) : (
    <div className="flex w-[min(420px,calc(100vw-56px))] flex-col items-center gap-7">
      <LatticeOrb state={state} hits={hits} size={320} />

      <div className="flex items-start justify-center gap-6">
        {SMALL_ORBS.map((option) => (
          <LatticeOrb key={option.value} state={option.value} size={72} label={option.label} showCaption={false} />
        ))}
      </div>
    </div>
  );
return <>

      {demo}
    
</>;
}
export default function BjorkRegistryPreview(){return <BjorkDemoThemeProvider attribute="class" defaultTheme="dark" enableSystem={false} storageKey="bjork-review-demo-theme"><div data-component-demo className="dark flex min-h-screen w-full items-center justify-center bg-[var(--bjork-bg)] p-8 text-[var(--bjork-text)]"><div className="w-full max-w-[850px]"><SourceDemo/></div></div></BjorkDemoThemeProvider>}

Dependencies

More by Isaiah

View all
  • Agent Plan

    Agent Plan

    2.2K
  • Video Scroll Hero

    Video Scroll Hero

    1.4K
  • Voice Powered Orb

    Voice Powered Orb

    1.3K
  • Reveal Text

    Reveal Text

    1.1K
  • Leads Data Table

    Leads Data Table

    935
  • Portfolio Gallery

    Portfolio Gallery

    923
  • Message Dock

    Message Dock

    833
  • Ruler Carousel

    Ruler Carousel

    618