Skip to main content
Clever Ops

Specimen Orb

A contained WebGL specimen viewer: a gyroid TPMS lattice raymarched inside a glass orb, refracting the token bench with a primary glint. Slow ambient orbit, eased drag momentum, arrow keys rotate.

Preview & code

Loading Specimen Orb preview

Installation

pnpm dlx shadcn@latest add @cleverui/specimen-orb

Requires the @cleverui registry in your components.json, a one-off, two-line setup.

Usage

tsx
import { SpecimenOrb } from '@/components/ui/specimen-orb'
Exampletsx
import { SpecimenOrb } from '@/components/ui/specimen-orb'

export default function SpecimenOrbDemo() {
  return (
    <section className="bg-background py-16 sm:py-24">
      <div className="mx-auto max-w-6xl px-4 sm:px-6">
        <div className="grid items-center gap-10 sm:gap-14 lg:grid-cols-2">
          <div>
            <p className="font-mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground sm:text-xs">
              Lattice Atlas · Specimen viewer
            </p>
            <h2 className="mt-4 max-w-xl text-3xl font-semibold tracking-tight text-balance text-foreground sm:text-4xl">
              Every specimen, catalogued to the unit cell.
            </h2>
            <p className="mt-4 max-w-md text-sm leading-relaxed text-muted-foreground sm:text-base">
              The Atlas indexes 14,200 characterised TPMS structures, each with
              measured porosity, surface area and elastic response. Search by
              application, from heat exchangers to bone scaffolds, and shortlist
              candidates in minutes.
            </p>
            <p className="mt-4 max-w-md text-sm leading-relaxed text-muted-foreground sm:text-base">
              Open any entry in the specimen viewer to inspect the lattice under
              glass. Orbit it by hand, read the strut thickness at the glint,
              then push its parameters straight into a simulation run.
            </p>
          </div>
          <SpecimenOrb className="mx-auto" />
        </div>
      </div>
    </section>
  )
}

API reference

SpecimenOrb accepts the following props.

PropTypeDefaultDescription
sizenumber440max pixel size of the square widget; it scales down with its column (default 440)
speednumber1ambient orbit speed multiplier; 0 parks the orb (default 1)
specimenstring'SPEC-043'specimen number printed in the caption plate (default 'SPEC-043')
densitynumber9.5gyroid lattice frequency: 5 is coarse, 13 is dense (default 9.5)

…plus everything from React.HTMLAttributes<HTMLElement>: className, event handlers, aria attributes and the rest pass straight through.

Frequently asked questions

How do I install the Specimen Orb component?

Register the @cleverui registry in your components.json ("@cleverui": "https://cleverops.com.au/r/{name}.json"), then run `npx shadcn@latest add @cleverui/specimen-orb`. The shadcn CLI copies the source into your project, you own the code from that point. You can also copy the source directly from this page.

What dependencies does Specimen Orb require?

Specimen Orb uses motion and ogl on top of React and Tailwind CSS. You don't need to install them manually, the shadcn CLI resolves and installs npm dependencies automatically when you add the component.

Can I theme Specimen Orb to match my brand?

Yes. The component is styled entirely with Tailwind utilities over standard design tokens (primary, background, muted, border), so it inherits your existing shadcn/ui theme automatically. Change your CSS variables and the component follows, no source edits needed for palette, radius, or fonts.

Want this built for you?

CleverUI is built by the Clever Ops web team. If you'd rather ship a hand-coded, fast, custom website than assemble one, we build them for Australian businesses every week.

Explore web development services