Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Shape

    Thirty-four soft shapes, from circles and pills to cookies, clovers, bursts and pixel shapes. Use them for avatars, image crops, icon containers and small moments of expression. Every shape morphs into every other.

    Install

    npx shadcn@latest add @nelumbo/shape

    Usage

    import { Shape } from "@/components/ui/shape"​<Shape name="cookie-9" className="size-24 bg-brand-container" /><Shape name="arch" className="size-40">  <img src="/samples/organoid.jpg" alt="Liver organoid, day 14" /></Shape>

    Library

    Pick a shape to morph the preview into it, or press Play to run through them all. Every shape has the same number of points, starting at 12 o'clock, so any shape morphs into any other.

    Cookie 9name="cookie-9"

    Avatars

    A shape gives each person a recognizable mark. Keep one shape per person, so the shape itself helps people find someone in a long list.

    Maya Lin
    Tomás Ortega
    Aiko Sato
    Priya Nair
    Jonas Berg

    Icon containers and morphing on hover

    Change the name on hover or selection and the shape morphs with the standard easing, without a bounce. With reduced motion it switches at once.

    1. Extract RNA
    2. Build libraries
    3. Sequence
    4. Analyse

    Loading indicator

    LoadingIndicator morphs through seven shapes from this library: soft burst, cookie 9, pentagon, pill, sunny, clover 4 and oval.

    In your own CSS

    shapePath returns the polygon() for any element, and SHAPE_NAMES lists every name.

    import { shapePath, SHAPE_NAMES } from "@/components/ui/shape"​<figure style={{ clipPath: shapePath("clover-8") }}>…</figure>​// the loading indicator fits shapes in a circle so they can turnshapePath("sunny", { fit: "circle" })

    Props

    PropTypeDefaultNotes
    nameShapeName—One of 34 shapes, e.g. "cookie-9", "arch", "pixel-circle".
    morphbooleantrueMorph when name changes.
    childrenReactNode—Clipped to the shape; an img or video fills it. The clip also cuts shadows and focus rings, so put those on a wrapper.
    shapePath(name, options)string—options.fit "box" (default) or "circle"; options.points (144).