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

    Split Button

    One main action with related ones a click away. The main side runs the most common choice; the menu holds the alternatives.

    Install

    npx shadcn@latest add @nelumbo/split-button

    Variants

    Open a menu: the trigger rounds out into a full pill and the chevron turns over. Arrow keys move through the items; Escape closes the menu.

    Last action: Nothing yet

    Sizes

    Usage

    <SplitButton variant="secondary">  <SplitButtonAction onClick={save}>Save</SplitButtonAction>  <SplitButtonMenu label="More save options">    <SplitButtonItem icon="save_as" onSelect={saveAs}>Save as</SplitButtonItem>  </SplitButtonMenu></SplitButton>

    Props

    PropTypeDefaultNotes
    variant"default" | "secondary" | "elevated" | "outline" | "destructive""default"Applies to both halves
    size"xs" | "sm" | "default" | "lg" | "xl""default"
    Menu: labelstringrequiredAccessible name of the trigger
    Menu: align"start" | "end""end"
    Menu: open / onOpenChangeControl the menu
    Item: iconIconName
    Item: onSelect(event) => voidRadix DropdownMenu item