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

    Input Group

    One field with things inside it: a prefix, a unit, a keycap hint, a copy button, a send button. The whole group wears the same surface, focus line and error state as an Input, so it sits in a form beside one. Use Input with its icon and trailing slot first; reach for a group when the extras are text, buttons or a toolbar.

    Install

    npx shadcn@latest add @nelumbo/input-group

    Prefix and suffix

    Text addons set the context of the value: a scheme, a currency, a domain. Clicking them puts the caret in the field.

    https://
    .com
    $
    USD

    Search with a keycap hint

    The hint is drawn like the shortcuts in menus and hides once you type. A spinner takes its place while results load.

    ⌘K

    Buttons

    InputGroupButton is a tonal pill (secondary) by default; use variant ghost for quiet icon toggles. Sizes: xs, sm, icon-xs, icon-sm.

    Chat composer

    Block addons put a toolbar above or below a textarea. The textarea grows with its text; the send button is a quiet pill until there is something to send, then it fills and springs into a rounded square. Cmd or Ctrl + Enter sends.

    ⌘↵

    Block start

    A block-start addon sits above the control: a label row, tags, or a reply-to quote.

    Replying to Maya

    Invalid and disabled

    Put aria-invalid on the control (or data-invalid on the group) and the whole group turns red with a thicker line. Disabled on the control dims it.

    @nelumbo.dev

    Enter the part before the @ only.

    https://
    .com

    Usage

    import {  InputGroup, InputGroupAddon, InputGroupButton,  InputGroupInput, InputGroupText, InputGroupTextarea,} from "@/components/ui/input-group"​// shadcn's API, unchanged<InputGroup>  <InputGroupAddon><InputGroupText>https://</InputGroupText></InputGroupAddon>  <InputGroupInput aria-label="Website" placeholder="nelumbo" />  <InputGroupAddon align="inline-end"><InputGroupText>.com</InputGroupText></InputGroupAddon></InputGroup>​// Nelumbo adds keycaps and tonal pill buttons<InputGroup>  <InputGroupInput aria-label="Search" placeholder="Search" />  <InputGroupAddon align="inline-end"><InputGroupKeys>⌘K</InputGroupKeys></InputGroupAddon></InputGroup>

    Props

    PropTypeDefaultPart
    InputGroupdiv propsThe field. Height 40px; grows when it has a block addon or a textarea
    InputGroupAddon align"inline-start" | "inline-end" | "block-start" | "block-end""inline-start"Where the addon draws, whatever its place in the JSX. Click focuses the control
    InputGroupButton variantButton variant"secondary"Tonal pill; ghost for quiet toggles
    InputGroupButton size"xs" | "sm" | "icon-xs" | "icon-sm""xs"Icon-only sizes need an aria-label
    InputGroupTextspan propsPrefix or suffix text (https://, .com, USD). Icons inside take the text color
    InputGroupKeysspan propsKeycap hint: "⌘K", "Ctrl+Enter"
    InputGroupInputinput propsBare input; give it an aria-label (no floating label here)
    InputGroupTextareatextarea propsrows 1Grows with its text up to 12rem, then scrolls