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

    Top App Bar

    The bar at the head of a screen: navigation, title and actions. Four sizes, and four ways to respond to scrolling, including the headline that shrinks into the bar as you move down the list. Every demo below scrolls inside its own frame, so scroll the frame, not the page.

    Install

    npx shadcn@latest add @nelumbo/app-bar

    Variants

    Small is 64px with the title inline. Center centers it. Medium (112px) and large (152px) move the title below the icons as a headline.

    Small

    Inbox

    • Ines Moreau9:41
      Revised floor planI moved the pantry wall 40 cm east so the island fits.
    • Tomás Reyes9:12
      Invoice 2026-114Attached. Net 30 as usual, thanks for the quick turnaround.
    • Priya Natarajan8:47
      Thursday standupCan we push to 10:30? I have a site visit at 9.
    • Jonas BergYesterday
      Tile samplesThe matte grey arrived. The terracotta is back-ordered until December.
    • Hana SatoYesterday
      Permit updateThe city approved the window change. Stamped drawings attached.
    • Leo MartinsYesterday
      Lighting planTwo options for the hallway. I lean towards the recessed one.
    • Mira OkaforMon
      Site visit notesPhotos from the kitchen are in the shared folder, the plaster is dry.
    • Daniel CostaMon
      Quote for joineryOak veneer is 12 percent over; walnut is within the budget you set.
    • Aisha BelloSun
      Welcome packDraft of the client welcome pack. Tell me if the tone is too formal.
    • Ravi IyerSun
      Budget vs actualsWe are two percent under on materials and four over on labour.
    • Sofía RamírezSat
      Delivery windowThe sink arrives Friday between 8 and 12. Someone needs to be there.
    • Kenji WatanabeSat
      Render v3Warmer light in the living room, as discussed. Cabinet doors are matte.
    • Léa MartinFri
      Paint codesFinal list below. The hallway grey is the one that tested best.
    • Omar HaddadFri
      ScaffoldingThe scaffold comes down on the 14th, weather permitting.
    • Maya KowalskiThu
      MoodboardAdded the stone references. The honed finish photographs better.
    • Tomás NovákThu
      Survey resultsEleven of fourteen clients preferred the shorter proposal format.
    • Ines MoreauWed
      Re: Revised floor planWorks for me. Can you check the clearance to the fridge?
    • Jonas BergWed
      Grout colourSending a sample board with three options by courier tomorrow.

    Center

    Inbox

    • Ines Moreau9:41
      Revised floor planI moved the pantry wall 40 cm east so the island fits.
    • Tomás Reyes9:12
      Invoice 2026-114Attached. Net 30 as usual, thanks for the quick turnaround.
    • Priya Natarajan8:47
      Thursday standupCan we push to 10:30? I have a site visit at 9.
    • Jonas BergYesterday
      Tile samplesThe matte grey arrived. The terracotta is back-ordered until December.
    • Hana SatoYesterday
      Permit updateThe city approved the window change. Stamped drawings attached.
    • Leo MartinsYesterday
      Lighting planTwo options for the hallway. I lean towards the recessed one.
    • Mira OkaforMon
      Site visit notesPhotos from the kitchen are in the shared folder, the plaster is dry.
    • Daniel CostaMon
      Quote for joineryOak veneer is 12 percent over; walnut is within the budget you set.
    • Aisha BelloSun
      Welcome packDraft of the client welcome pack. Tell me if the tone is too formal.
    • Ravi IyerSun
      Budget vs actualsWe are two percent under on materials and four over on labour.
    • Sofía RamírezSat
      Delivery windowThe sink arrives Friday between 8 and 12. Someone needs to be there.
    • Kenji WatanabeSat
      Render v3Warmer light in the living room, as discussed. Cabinet doors are matte.
    • Léa MartinFri
      Paint codesFinal list below. The hallway grey is the one that tested best.
    • Omar HaddadFri
      ScaffoldingThe scaffold comes down on the 14th, weather permitting.
    • Maya KowalskiThu
      MoodboardAdded the stone references. The honed finish photographs better.
    • Tomás NovákThu
      Survey resultsEleven of fourteen clients preferred the shorter proposal format.
    • Ines MoreauWed
      Re: Revised floor planWorks for me. Can you check the clearance to the fridge?
    • Jonas BergWed
      Grout colourSending a sample board with three options by courier tomorrow.

    Medium, collapse

    Inbox

    • Ines Moreau9:41
      Revised floor planI moved the pantry wall 40 cm east so the island fits.
    • Tomás Reyes9:12
      Invoice 2026-114Attached. Net 30 as usual, thanks for the quick turnaround.
    • Priya Natarajan8:47
      Thursday standupCan we push to 10:30? I have a site visit at 9.
    • Jonas BergYesterday
      Tile samplesThe matte grey arrived. The terracotta is back-ordered until December.
    • Hana SatoYesterday
      Permit updateThe city approved the window change. Stamped drawings attached.
    • Leo MartinsYesterday
      Lighting planTwo options for the hallway. I lean towards the recessed one.
    • Mira OkaforMon
      Site visit notesPhotos from the kitchen are in the shared folder, the plaster is dry.
    • Daniel CostaMon
      Quote for joineryOak veneer is 12 percent over; walnut is within the budget you set.
    • Aisha BelloSun
      Welcome packDraft of the client welcome pack. Tell me if the tone is too formal.
    • Ravi IyerSun
      Budget vs actualsWe are two percent under on materials and four over on labour.
    • Sofía RamírezSat
      Delivery windowThe sink arrives Friday between 8 and 12. Someone needs to be there.
    • Kenji WatanabeSat
      Render v3Warmer light in the living room, as discussed. Cabinet doors are matte.
    • Léa MartinFri
      Paint codesFinal list below. The hallway grey is the one that tested best.
    • Omar HaddadFri
      ScaffoldingThe scaffold comes down on the 14th, weather permitting.
    • Maya KowalskiThu
      MoodboardAdded the stone references. The honed finish photographs better.
    • Tomás NovákThu
      Survey resultsEleven of fourteen clients preferred the shorter proposal format.
    • Ines MoreauWed
      Re: Revised floor planWorks for me. Can you check the clearance to the fridge?
    • Jonas BergWed
      Grout colourSending a sample board with three options by courier tomorrow.

    Large, collapse

    Inbox12 unread

    • Ines Moreau9:41
      Revised floor planI moved the pantry wall 40 cm east so the island fits.
    • Tomás Reyes9:12
      Invoice 2026-114Attached. Net 30 as usual, thanks for the quick turnaround.
    • Priya Natarajan8:47
      Thursday standupCan we push to 10:30? I have a site visit at 9.
    • Jonas BergYesterday
      Tile samplesThe matte grey arrived. The terracotta is back-ordered until December.
    • Hana SatoYesterday
      Permit updateThe city approved the window change. Stamped drawings attached.
    • Leo MartinsYesterday
      Lighting planTwo options for the hallway. I lean towards the recessed one.
    • Mira OkaforMon
      Site visit notesPhotos from the kitchen are in the shared folder, the plaster is dry.
    • Daniel CostaMon
      Quote for joineryOak veneer is 12 percent over; walnut is within the budget you set.
    • Aisha BelloSun
      Welcome packDraft of the client welcome pack. Tell me if the tone is too formal.
    • Ravi IyerSun
      Budget vs actualsWe are two percent under on materials and four over on labour.
    • Sofía RamírezSat
      Delivery windowThe sink arrives Friday between 8 and 12. Someone needs to be there.
    • Kenji WatanabeSat
      Render v3Warmer light in the living room, as discussed. Cabinet doors are matte.
    • Léa MartinFri
      Paint codesFinal list below. The hallway grey is the one that tested best.
    • Omar HaddadFri
      ScaffoldingThe scaffold comes down on the 14th, weather permitting.
    • Maya KowalskiThu
      MoodboardAdded the stone references. The honed finish photographs better.
    • Tomás NovákThu
      Survey resultsEleven of fourteen clients preferred the shorter proposal format.
    • Ines MoreauWed
      Re: Revised floor planWorks for me. Can you check the clearance to the fridge?
    • Jonas BergWed
      Grout colourSending a sample board with three options by courier tomorrow.

    Scroll behavior

    elevate fills the bar with surface-container and lifts it as content scrolls under it. hide slides it away scrolling down and brings it back scrolling up (or when focus moves into it). collapse is driven by scroll position: the headline scales down and cross-fades into the inline title, and if you stop part way it springs to the nearest end.

    Elevate

    Inbox

    • Ines Moreau9:41
      Revised floor planI moved the pantry wall 40 cm east so the island fits.
    • Tomás Reyes9:12
      Invoice 2026-114Attached. Net 30 as usual, thanks for the quick turnaround.
    • Priya Natarajan8:47
      Thursday standupCan we push to 10:30? I have a site visit at 9.
    • Jonas BergYesterday
      Tile samplesThe matte grey arrived. The terracotta is back-ordered until December.
    • Hana SatoYesterday
      Permit updateThe city approved the window change. Stamped drawings attached.
    • Leo MartinsYesterday
      Lighting planTwo options for the hallway. I lean towards the recessed one.
    • Mira OkaforMon
      Site visit notesPhotos from the kitchen are in the shared folder, the plaster is dry.
    • Daniel CostaMon
      Quote for joineryOak veneer is 12 percent over; walnut is within the budget you set.
    • Aisha BelloSun
      Welcome packDraft of the client welcome pack. Tell me if the tone is too formal.
    • Ravi IyerSun
      Budget vs actualsWe are two percent under on materials and four over on labour.
    • Sofía RamírezSat
      Delivery windowThe sink arrives Friday between 8 and 12. Someone needs to be there.
    • Kenji WatanabeSat
      Render v3Warmer light in the living room, as discussed. Cabinet doors are matte.
    • Léa MartinFri
      Paint codesFinal list below. The hallway grey is the one that tested best.
    • Omar HaddadFri
      ScaffoldingThe scaffold comes down on the 14th, weather permitting.
    • Maya KowalskiThu
      MoodboardAdded the stone references. The honed finish photographs better.
    • Tomás NovákThu
      Survey resultsEleven of fourteen clients preferred the shorter proposal format.
    • Ines MoreauWed
      Re: Revised floor planWorks for me. Can you check the clearance to the fridge?
    • Jonas BergWed
      Grout colourSending a sample board with three options by courier tomorrow.

    Hide on scroll

    Inbox

    • Ines Moreau9:41
      Revised floor planI moved the pantry wall 40 cm east so the island fits.
    • Tomás Reyes9:12
      Invoice 2026-114Attached. Net 30 as usual, thanks for the quick turnaround.
    • Priya Natarajan8:47
      Thursday standupCan we push to 10:30? I have a site visit at 9.
    • Jonas BergYesterday
      Tile samplesThe matte grey arrived. The terracotta is back-ordered until December.
    • Hana SatoYesterday
      Permit updateThe city approved the window change. Stamped drawings attached.
    • Leo MartinsYesterday
      Lighting planTwo options for the hallway. I lean towards the recessed one.
    • Mira OkaforMon
      Site visit notesPhotos from the kitchen are in the shared folder, the plaster is dry.
    • Daniel CostaMon
      Quote for joineryOak veneer is 12 percent over; walnut is within the budget you set.
    • Aisha BelloSun
      Welcome packDraft of the client welcome pack. Tell me if the tone is too formal.
    • Ravi IyerSun
      Budget vs actualsWe are two percent under on materials and four over on labour.
    • Sofía RamírezSat
      Delivery windowThe sink arrives Friday between 8 and 12. Someone needs to be there.
    • Kenji WatanabeSat
      Render v3Warmer light in the living room, as discussed. Cabinet doors are matte.
    • Léa MartinFri
      Paint codesFinal list below. The hallway grey is the one that tested best.
    • Omar HaddadFri
      ScaffoldingThe scaffold comes down on the 14th, weather permitting.
    • Maya KowalskiThu
      MoodboardAdded the stone references. The honed finish photographs better.
    • Tomás NovákThu
      Survey resultsEleven of fourteen clients preferred the shorter proposal format.
    • Ines MoreauWed
      Re: Revised floor planWorks for me. Can you check the clearance to the fridge?
    • Jonas BergWed
      Grout colourSending a sample board with three options by courier tomorrow.

    Search in the bar

    Put a SearchBar in the bar instead of a title. The leading slot takes the navigation button, the avatar sits at the far end.

    Search bar

    • Ines Moreau9:41
      Revised floor planI moved the pantry wall 40 cm east so the island fits.
    • Tomás Reyes9:12
      Invoice 2026-114Attached. Net 30 as usual, thanks for the quick turnaround.
    • Priya Natarajan8:47
      Thursday standupCan we push to 10:30? I have a site visit at 9.
    • Jonas BergYesterday
      Tile samplesThe matte grey arrived. The terracotta is back-ordered until December.
    • Hana SatoYesterday
      Permit updateThe city approved the window change. Stamped drawings attached.
    • Leo MartinsYesterday
      Lighting planTwo options for the hallway. I lean towards the recessed one.
    • Mira OkaforMon
      Site visit notesPhotos from the kitchen are in the shared folder, the plaster is dry.
    • Daniel CostaMon
      Quote for joineryOak veneer is 12 percent over; walnut is within the budget you set.
    • Aisha BelloSun
      Welcome packDraft of the client welcome pack. Tell me if the tone is too formal.
    • Ravi IyerSun
      Budget vs actualsWe are two percent under on materials and four over on labour.
    • Sofía RamírezSat
      Delivery windowThe sink arrives Friday between 8 and 12. Someone needs to be there.
    • Kenji WatanabeSat
      Render v3Warmer light in the living room, as discussed. Cabinet doors are matte.
    • Léa MartinFri
      Paint codesFinal list below. The hallway grey is the one that tested best.
    • Omar HaddadFri
      ScaffoldingThe scaffold comes down on the 14th, weather permitting.
    • Maya KowalskiThu
      MoodboardAdded the stone references. The honed finish photographs better.
    • Tomás NovákThu
      Survey resultsEleven of fourteen clients preferred the shorter proposal format.
    • Ines MoreauWed
      Re: Revised floor planWorks for me. Can you check the clearance to the fridge?
    • Jonas BergWed
      Grout colourSending a sample board with three options by courier tomorrow.
    <TopAppBar scrollBehavior="elevate" scrollTarget={scroller}>  <TopAppBarSearch    label="Search mail"    leading={<IconButton label="Open navigation" icon="menu" />}    avatar={<Avatar name="Maya Kowalski" size="sm" color="auto" />}  /></TopAppBar>

    Landmarks and headings

    The bar renders a header element, which is the page banner when it is a direct child of body; give it role=banner otherwise, or render a div with as=div (as in these demos, which sit inside the page's main). The title is an h1 by default; pick the level that fits with as. In medium and large the headline is the only real heading, and the small inline copy that fades in is aria-hidden.

    <TopAppBar variant="large" role="banner" aria-label="Mail">  <TopAppBarNavigation />  <TopAppBarTitle as="h1">Inbox</TopAppBarTitle></TopAppBar>

    Usage

    The bar is position: sticky, so put it inside the scroller. Without scrollTarget it follows the window.

    import { TopAppBar, TopAppBarNavigation, TopAppBarTitle, TopAppBarActions, TopAppBarAction } from "@/components/ui/app-bar"​const scroller = useRef<HTMLDivElement>(null)​<div ref={scroller} className="h-dvh overflow-y-auto">  <TopAppBar variant="large" scrollBehavior="collapse" scrollTarget={scroller}>    <TopAppBarNavigation icon="arrow_back" label="Back" onClick={back} />    <TopAppBarTitle subtitle="12 unread">Inbox</TopAppBarTitle>    <TopAppBarActions>      <TopAppBarAction icon="search" label="Search" />      <TopAppBarAction icon="more_vert" label="More options" />    </TopAppBarActions>  </TopAppBar>  <Messages /></div>

    Props

    PropTypeDefaultNotes
    TopAppBar variant"small" | "center" | "medium" | "large""small"64, 64, 112 and 152px
    scrollBehavior"none" | "elevate" | "collapse" | "hide""none"Collapse is for medium and large; on others it elevates
    scrollTargetRefObject | HTMLElementwindowThe scrolling container the bar sits in
    settlebooleantrueSpring a half-collapsed bar to its nearest end
    as"header" | "div""header"Landmark element
    TopAppBarNavigationIconButton propsmenuLeading button; icon, label, onClick, or children
    TopAppBarTitle subtitleReactNodeA quieter second line
    TopAppBarTitle as"h1" | "h2" | "h3" | "p" | "div""h1"Heading element
    TopAppBarActionschildrenUp to three TopAppBarAction, then an overflow
    TopAppBarActionIconButton props48px button with a tooltip; label required
    TopAppBarSearchSearchBar propsSearch in the bar
    --bar-pCSS variableCollapse progress 0 to 1, for your own effects