---
title: "Sidebar toggle animated icon"
description: "Sidebar toggle animated icon (Everyday controls). The sidebar collapses to a rail. Light: the divider leans open a touch, then drives left, the sidebar's tint narrowing with it, and hits the rail with a small rebound; a beat later the chevron flips over to point back out and nudges that way. Strong: a bigger lean, a harder drive that hits the rail and rebounds twice, and the chevron flips and kicks out farther before it settles. The frame never moves. The reverse reopens the panel."
canonical: https://generativeicons.com/icons/sidebar-toggle/
---

# Sidebar toggle animated icon

The sidebar collapses to a rail. Light: the divider leans open a touch, then drives left, the sidebar's tint narrowing with it, and hits the rail with a small rebound; a beat later the chevron flips over to point back out and nudges that way. Strong: a bigger lean, a harder drive that hits the rail and rebounds twice, and the chevron flips and kicks out farther before it settles. The frame never moves. The reverse reopens the panel.

- Id: `sidebar-toggle`
- Category: Everyday controls
- Search terms: collapse sidebar, expand sidebar, hide sidebar, show sidebar, side panel, toggle panel, side menu, drawer, nav drawer, navigation rail, left panel, sidenav, side bar
- Two states: open to closed, played forward and back
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/sidebar-toggle.lottie (dotLottie, 6037 bytes, sha256 9860b2744b9eaad6fdf6129240c8f95ed2b9d72f591557947c125a02f2255316)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add sidebar-toggle
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/sidebar-toggle.mjs';

export function SidebarToggleIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/sidebar-toggle.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/sidebar-toggle/ · https://generativeicons.com/api/icons/sidebar-toggle
