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

    Variant Badge

    A variant's clinical classification on the ACMG/AMP five-tier scale. Color carries the meaning, red toward pathogenic and green toward benign, and five pips show where on the scale it sits, so the tier reads without color too.

    Install

    npx shadcn@latest add @nelumbo/variant-badge

    Five tiers

    Pathogenic and benign at full strength, the likely tiers lighter, uncertain significance neutral. ClinVar's conflicting and not provided sit off the scale. A badge is as wide as its text; give them className="w-full justify-center" in a grid to line them up at one width.

    PathogenicLikely pathogenicUncertain significanceLikely benignBenign
    ConflictingNot provided

    Styles and sizes

    Tonal (default), outline for dense tables, solid for the one call that matters most. notation="short" gives P, LP, VUS, LB and B.

    PathogenicLikely pathogenicUncertain significanceLikely benignBenign
    PathogenicLikely pathogenicUncertain significanceLikely benignBenign
    PathogenicLikely pathogenicUncertain significanceLikely benignBenign
    PathogenicPathogenicPathogenicBenign

    Review status

    review adds ClinVar's stars: how well reviewed the classification is, from no criteria to a practice guideline.

    Pathogenic, 0 of 4 stars, no assertion criteriaNo assertion criteria
    Likely pathogenic, 1 of 4 stars, criteria provided, single submitterCriteria provided, single submitter
    Uncertain significance, 2 of 4 stars, criteria provided, multiple submitters, no conflictsMultiple submitters, no conflicts
    Likely benign, 3 of 4 stars, reviewed by expert panelReviewed by expert panel
    Benign, 4 of 4 stars, practice guidelinePractice guideline

    From the evidence

    classifyVariant combines ACMG/AMP criteria by the 2015 rules, ClinGen's strength suffixes included (PM2_Supporting). VariantEvidence shows the criteria as chips: red argue pathogenic, green benign, and the bars give each one's strength. Pick some.

    Pathogenic criteria
    Benign criteria
    PathogenicCauses disease
    • PVS1, pathogenic, very strong
    • PM2, pathogenic, supporting
    • PP3, pathogenic, supporting

    In a table

    TP53 variants as ClinVar classifies them, paired with Amino Acid Change.

    • R175Hc.524G>APathogenic
    • R248Qc.743G>APathogenic
    • R273Hc.818G>APathogenic
    • P72Rc.215C>GBenign

    Props

    PropTypeDefaultNotes
    classificationVariantClassification | stringpathogenic, likely-pathogenic, uncertain, likely-benign, benign, conflicting, not-provided; or text such as "VUS" or "Likely benign".
    notation"full" | "short""full"Pathogenic or P.
    variant"tonal" | "outline" | "solid""tonal"Fill strength.
    size"sm" | "default" | "lg""default"20, 24 or 32 px tall.
    scalebooleantrueFive pips for the tier.
    review0 to 4ClinVar review stars.
    VariantEvidence{ criteria: string[], size }ACMG criteria as chips, by direction and strength.
    HelpersclassifyVariant, parseCriterion, toClassification, VARIANT_CLASSESThe 2015 combining rules; a criterion's direction and strength; text to a classification; names and tiers.