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

    Accordion

    A stack of headings that each open to show more. Use it for questions and answers, or for settings that would otherwise make a long page. Built on Radix, with shadcn's API.

    Install

    npx shadcn@latest add @nelumbo/accordion

    Plain, one open at a time

    type="single" with collapsible lets the open item close again. Rows sit on the surface and are spaced apart, with no divider lines.

    Orders leave the studio within a day. Delivery takes two to four working days in the EU and the UK, and five to eight elsewhere. You get a tracking link as soon as it ships.

    Segmented, several open

    variant="segmented" puts each item on its own tile, like List. The open tile is a touch more prominent and rounds all round. type="multiple" lets any number stay open; icon and description add a leading symbol and a second line.

    Plain, with icons

    The plain variant takes icons and descriptions too. Keyboard: Tab to a heading, Enter or Space to open it, Up and Down to move between headings, Home and End to jump.

    Usage

    import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"​// shadcn's API<Accordion type="single" collapsible>  <AccordionItem value="shipping">    <AccordionTrigger>How long does shipping take?</AccordionTrigger>    <AccordionContent>Two to four working days.</AccordionContent>  </AccordionItem></Accordion>​// Nelumbo: tiles, an icon and a description<Accordion type="multiple" variant="segmented">  <AccordionItem value="display">    <AccordionTrigger icon="palette" description="Theme, text size">Display</AccordionTrigger>    <AccordionContent inset>...</AccordionContent>  </AccordionItem></Accordion>

    Props

    PropTypeDefaultRadix's own props (type, collapsible, value, defaultValue, onValueChange) work as is
    Accordion variant"plain" | "segmented""plain"Segmented: each item on its own tile, 2px apart
    Accordion type"single" | "multiple"Required, from Radix
    AccordionTrigger iconIconNameA leading Material Symbol
    AccordionTrigger descriptionReactNodeA quieter line under the title
    AccordionContent insetbooleanfalseIndent to line up with the title when the trigger has an icon
    AccordionItem disabledbooleanfalseFrom Radix