Bounce Sidebar

A vertical nav whose active marker springs and bounces between items. Pass your own items and dot color; controlled or uncontrolled.

Dependencies

motion

Interaction Type

Hover items for micro-clicks; click any item to spring the bouncing marker over with a signature ball bounce audio effect.

Props

Options you can pass to customize this component.

Prop
Type
Description
items*
string[]

Labels rendered as the vertical list of nav items.

value
number

Active item index for controlled usage. When set, the component won't manage its own state.

defaultValue
number

Initial active index for uncontrolled usage. Ignored when value is provided.

onChange
(index: number) => void

Called with the new index whenever an item is selected.

dotColor
string

Any CSS color for the bouncing active marker (hex, rgb, hsl, var).

className
string

Extra classes merged onto the root <ul> element.

Installation

npx shadcn@latest addhttps://ui.nexvyn.dev/r/bounce-sidebar.json

How to use

import { BounceSidebar } from "@/components/ui/bounce-sidebar"
  
const items = ["Home", "About", "Services", "Contact"]

export function Demo() {
  return <BounceSidebar items={items} dotColor="#FC4C01" />
}

Source Code

Click the code icon in the top-right corner to view the source code.

Credits

Inspired by aave.com/design

Keep in mind

All components here are original implementations, built from scratch with no copied code, assets, or content. We study UI/UX patterns we admire and craft our own versions, often with added features. If your work inspired something here and isn't credited, or a credit is incomplete, please open an issue - we'll fix it promptly.

Contact

Questions or feedback? Reach out anytime.

License & Usage

  • •Free for personal and commercial use
  • •No attribution required
  • •Cannot be resold as a standalone product
  • •Anatomy/blueprint diagrams are licensed separately (CC BY-NC 4.0) and are not for commercial use
// No code loaded.

For best experience, open in browser on a wider screen

Library Guide

Philosophy

Nexvyn/UI is a small set of components built around one idea: each one gets a single moment of motion, and everything else stays quiet. Layout, type and color do the structural work, so the one animated detail reads as intentional rather than busy. When a component needs more than that to feel finished, the design is usually wrong, not the animation.

Most components start from a pattern that already works well somewhere else. We rebuild it from scratch, strip what does not earn its place, and keep the API close to what you would expect from Radix or shadcn/ui. The goal is that nothing here surprises you on first read.

Design System

Color comes from a short list of CSS variables: a background, two surfaces, a foreground, two muted text tones, borders, and one accent. The accent is reserved for focus, selection and the signature motion, which keeps it meaningful. Light and dark themes redefine the same variables, so components never branch on the theme.

Spacing sits on a 4px grid and radii come from one base value. Because every component reads the same tokens, retuning a theme is a matter of editing a few variables in one stylesheet rather than hunting through component files.

Animations

Motion uses a handful of shared duration and easing tokens. Elements entering or leaving the screen ease out, elements already on screen ease in and out, and hover changes stay under 150ms. Only transform, opacity, clip-path and filter are animated, so the browser can keep the work off the main thread.

When the operating system asks for reduced motion, transitions are switched off in CSS and JavaScript-driven animation takes a static path. The component still communicates its state change; it just does it without movement.

Performance

Components render only when their own state changes, and heavier pieces such as canvas renderers load lazily. Every timer, listener and animation frame is released on unmount, which matters on pages like this one where many components are mounted at once.

Each component ships as a single file with its own dependencies declared, so installing one does not pull in the rest. Shared helpers such as the class merger and the sound module are copied once and reused.

Accessibility

Interactive parts use native elements where they exist and the matching ARIA roles where they do not. Composite widgets like tabs and menus use roving focus, so arrow keys move between items and Tab moves past the group. Overlays trap focus while open and return it to the trigger on close.

Touch targets are at least 44 pixels square, icon-only buttons carry an accessible label, and decorative icons are hidden from assistive technology. Focus rings show for keyboard users and stay out of the way for pointer clicks.

Developer Experience

Every component is typed, forwards its ref, merges a className prop, and supports both controlled and uncontrolled state. Visual variants are enums rather than boolean flags, so autocomplete tells you what is available. User-facing strings are props with defaults, so you can localize them.

Installation goes through the shadcn registry: one command copies the source into your project, where it is yours to read and change. There is no runtime package to keep in sync.

Customization

Override the theme by redefining the color, radius and motion variables in your own stylesheet. Because components reference the variables rather than literal values, the change applies everywhere at once, in both light and dark mode.

For one-off adjustments, pass a className. Classes you pass are merged after the internal ones, so your utilities win without needing important flags or deeper selectors.

npx shadcn@latest addhttps://ui.nexvyn.dev/r/bounce-sidebar.json