---
title: "Bounce Sidebar"
description: "A vertical sidebar whose active dot jumps between destinations on a curved, spring-loaded path."
category: "Components"
publishedAt: "2026-07-22"
updatedAt: "2026-11-10"
documentation: "https://beui.dev/components/motion/bounce-sidebar"
markdown: "https://beui.dev/components/motion/bounce-sidebar.md"
license: "MIT"
---

# Bounce Sidebar

> A vertical sidebar whose active dot jumps between destinations on a curved, spring-loaded path.

## Install

```bash
npx shadcn@latest add @beui/bounce-sidebar
```

## Dependencies

- `clsx`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { useState } from "react";
import { BounceSidebar } from "@/components/motion/bounce-sidebar";

const destinations = [
  { id: "overview", label: "Overview" },
  { id: "components", label: "Components" },
  { id: "motion", label: "Motion" },
  { id: "templates", label: "Templates" },
  { id: "changelog", label: "Changelog" },
];

export function BounceSidebarPreview() {
  const [active, setActive] = useState("components");

  return (
    <div className="flex min-h-[360px] w-full items-center justify-center">
      <BounceSidebar
        items={destinations}
        value={active}
        onValueChange={setActive}
        ariaLabel="beUI sections"
        className="w-52"
        listClassName="w-full"
        itemClassName="text-base"
      />
    </div>
  );
}
```

## API Reference

### BounceSidebar

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `items` | `BounceSidebarItem[]` |  | Yes | Links or buttons listed in the sidebar, in order. |
| `value` | `string` |  | No | Id of the active item, for controlled use. |
| `defaultValue` | `string` |  | No | The initial active item id when uncontrolled. Defaults to the first item. |
| `onValueChange` | `((value: string) => void)` |  | No | Called with the item id when an item is picked. |
| `ariaLabel` | `string` |  | No | Accessible name for the nav. Default: "Sidebar navigation" |
| `labels` | `Partial<{ label: string; }>` |  | No | Override any built-in string. |
| `className` | `string` |  | No | Classes merged onto the root nav element. |
| `listClassName` | `string` |  | No | Classes merged onto the list element. |
| `itemClassName` | `string` |  | No | Classes merged onto each item's link or button. |
| `indicatorClassName` | `string` |  | No | Classes merged onto the bouncing dot. |

## Types

### BounceSidebarItem

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Unique key, used as the sidebar's active value. |
| `label` | `ReactNode` | Yes | Text shown in the row. |
| `href` | `string` | No | Link address. Renders a link instead of a button when set. |
| `icon` | `ReactNode` | No | Icon shown before the label. Omitted when not set. |
| `disabled` | `boolean` | No | Dims the row and blocks selection. |
| `target` | `"_blank" \| "_self" \| "_parent" \| "_top"` | No | Where the link opens. Only used with `href`. |
| `rel` | `string` | No | Link `rel`. Default: "noreferrer noopener" when `target` is "_blank" |

## About Bounce Sidebar

Bounce Sidebar is an animated vertical navigation for React built with Framer Motion and Tailwind CSS. The active indicator is a small dot that jumps between rows on a curved spring path, bending sideways away from the labels and landing with a quick bounce. Items can be links or buttons and can carry icons.

### When to use it

- A documentation site or blog needs a compact section navigation with a playful active marker.
- A settings page or dashboard switches between views from a short vertical list.
- A portfolio or landing page wants an in-page menu that feels more alive than a plain highlighted row.

### Accessibility

The sidebar renders a nav landmark with an aria-label, which defaults to Sidebar navigation. The active row is marked with aria-current, items render as real links when they have an href and as buttons otherwise, and disabled links are marked aria-disabled and removed from the tab order. The moving dot is hidden from assistive technology. With reduced motion enabled, the dot moves straight to the new row without the arc or bounce.

### FAQ

**How do I make an animated sidebar navigation in React?**

Install the component and pass an items array where each item has an id and a label, plus an optional href and icon. BounceSidebar renders the list and the bouncing dot.

**Can I control which item is active?**

Yes. Pass value and onValueChange for controlled use, for example to sync with the current route, or defaultValue to let the sidebar manage it.

**Does it work with Next.js links?**

Items with an href render plain anchor elements with optional target and rel, so they work for normal navigation in Next.js. For client-side routing, omit href and navigate from onValueChange.

## Source

- Registry detail: https://beui.dev/r/bounce-sidebar
- Raw source: https://beui.dev/r/bounce-sidebar/raw
- GitHub: https://github.com/starc007/ui-components
