motionsnack

Animated React sections that already feel finished.

Copy them into Next.js or add them with one command. Plain React and Tailwind, light and dark.

New sections, once a month

One short email when something new lands. No spam.

Library

  • Sections
  • Blocks
  • Components
  • Application UI
  • Templates

Popular

  • Hero
  • Gallery
  • Testimonials
  • Stats
  • Logos
  • FAQ

Resources

  • Installation
  • All components
  • All blocks
  • All sections
  • All application UI
  • Design system
  • Changelog
  • Pricing

Company

  • About
  • Contact
  • Terms
  • Privacy

Install

npx motionsnack add <name>Step-by-step guidehello@motionsnack.dev
Kuba Šťastný@kubastastnydev

© 2026 motionsnack. All rights reserved.

TermsPrivacy

motionsnack

motionsnack
DocsSectionsTemplatesWhat's newPricing
Get lifetime access
  1. Home
  2. Docs
  3. Components
  4. Toggle
  5. Icon Toggle
ComponentsBlocksSectionsApplication UI
ComponentsBlocksSectionsApplication UI

Accordion

  • Spring Accordion

Alert

  • Glow Alert

Audio

  • Podcast PlayerNew
  • Voice NoteNew
  • Voice RecorderNew

Avatar

  • Avatar Stack

Badge

  • Pulse Badge

Breadcrumb

  • Slide Breadcrumb

Button

  • Chip ButtonNew
  • Glow Border Button
  • Glow ButtonNew
  • Plain ButtonNew

Calendar

  • Month Calendar

Checkbox

  • Checkbox CardsNew
  • Checkbox GroupNew
  • Chip CheckboxNew

Cropper

  • Image Cropper

Dialog

  • Spring Dialog

Dropdown

  • Command MenuNew
  • Stagger Dropdown
  • Switcher DropdownNew

File Upload

  • Drop Zone Upload

Input

  • Addon InputNew
  • Button InputNew
  • Copy InputNew
  • Date InputNew
  • Floating Label Input
  • Joined InputsNew
  • Notched Label InputNew
  • Number StepperNew
  • OTP InputNew
  • Password InputNew
  • Phone InputNew
  • Range InputNew
  • Search InputNew
  • Tag InputNew
  • Text FieldNew

Loader

  • Curtain LoaderNew
  • Greeting LoaderNew
  • Line LoaderNew
  • Meter LoaderNew
  • Split LoaderNew

Navigation Menu

  • Mobile Tab BarNew

Notification

  • Notification BellNew
  • Toast Stack

Pagination

  • Sliding Pagination

Popover

  • Spring Popover

Radio

  • Card Radio Group
  • Payment MethodNew
  • Radio GroupNew
  • Rating RadioNew

Select

  • ComboboxNew
  • Glide Select
  • Multi SelectNew
  • Rich SelectNew
  • Select FieldNew
  • Tree SelectNew

Sidebar

  • Icon RailNew

Slider

  • Glow Slider

Stepper

  • Progress Stepper

Switch

  • Billing SwitchNew
  • Switch RowNew
  • Toggle SwitchNew

Table

  • Sortable Table

Tabs

  • Sliding Tabs

Textarea

  • Auto Grow Textarea

Toggle

  • Icon ToggleNew
  • Theme ToggleNew
  • Toggle GroupNew

Tooltip

  • Follow Tooltip

Toggle

Icon Toggle

New

A like, bookmark, star or bell button that fills, pops and bursts when it turns on, with a count that rolls.

npx motionsnack add icon-toggle

Customize

<IconToggle />

Props

11 properties

PropertyTypeDefaultDescription
pressedboolean-Controlled state. Leave undefined to let the component manage it.
defaultPressedbooleanfalseState on first render when uncontrolled.
onChange(pressed: boolean) => void-Called with the new state on every change.
classNamestring''Extra classes on the button.
icon'heart' | 'bookmark' | 'star' | 'bell''heart'Which icon the toggle shows.
variant'outline' | 'ghost''outline'Icon only, or a pill with a border and the count.
size'sm' | 'md''sm'Size: button 36 / 44 px, icon 16 / 20 px.
labelstring'Like'Name for screen readers.
countnumber128Count without this visitor's own press; it adds one while pressed. Below 0 hides it.
burstbooleantrueBurst of small lines around the icon when it turns on.
disabledbooleanfalseDisables the toggle.

About Icon Toggle

Icon Toggle is the small button that makes saving or liking feel good. Turning it on fills the icon, squeezes and pops it past its size and sends a ring of tiny lines flying out around it; turning it off simply empties the icon again, without the fuss. Next to it a count rolls up by one as the new number slides in and the old one slides away, and back down when the press is undone. The icon can be a heart, a bookmark, a star or a bell, shown bare or in a pill with a border, in three sizes. It stays black and white by default, and one colour prop gives the pressed icon and its burst their own colour, like a red heart. It is a real toggle button with a pressed state for screen readers and the library's focus outline, and the burst is skipped for visitors who prefer reduced motion.

What's included

  • Fill, pop and a burst of lines when it turns on
  • Count that rolls up and down
  • Heart, bookmark, star or bell
  • Icon only or a pill with a border
  • Optional active colour, black and white by default
  • Pressed state for screen readers, focus outline
  • Light and dark look
Type
Animated React toggle component
Library
Components · Toggle
Stack
Next.js, React, Tailwind CSS
Added
2026-11-23
Install
npx motionsnack add icon-toggle