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

    Chromosome Ideogram

    A chromosome as its Giemsa bands: dark and light stripes along two arms, pinched at the centromere and rounded at the ends. Grayscale like the stain, so color stays free for what you mark on it.

    Install

    npx shadcn@latest add @nelumbo/chromosome-ideogram

    A chromosome

    Chromosome 17 from UCSC's hg38 band table, read with parseCytobands, and three genes from NCBI Gene: TP53 on the short arm, ERBB2 and BRCA1 on the long one. Hover a band for its name and extent.

    Over a gene model

    region frames a stretch and draws zoom lines to the corners, so whatever sits underneath reads as the close-up: here TP53, in 17p13.1, and its exons.

    Karyotype

    The whole genome at one scale, each chromosome upright with its genes marked (named where the columns have room, and on hover). Pick one, with the pointer or the arrow keys, to see it close.

    Chromosome 13

    Reading the bands

    selectable makes the bands one keyboard stop: arrows move a band, Home and End go to the ends.

    Props

    PropTypeDefaultNotes
    bandsCytoband[]chrom, start, end, name, stain: UCSC's cytoBand.txt through parseCytobands.
    chromosomestringWhich one: "chr17".
    markersIdeogramMarker[]start, end, label, color, description; chrom in a Karyotype. Pills on stems, stacked.
    region / connector{ start, end }, booleantrueA framed stretch, with zoom lines to the corners below.
    labels / rulerbooleantrueBand names where they fit; megabase ticks.
    size"sm" | "default""default"14 or 22 px thick.
    selectable / onActiveChangeboolean, ({ band } | null) => voidfalseA keyboard stop over the bands; the band in focus.
    Karyotypebands, chromosomes, markers, height, chromosome, onChromosomeChangeThe genome side by side at one scale; a radio group when you can pick.
    HelpersparseCytobands, bandAtA band table from text; the band a position falls in ("17p13.1").