Skip to main content
ALEXY LINK

Toggle 05

A compact chip toggle with expressive glow feedback, clear state visibility, and responsive portable behavior.

Requirements

HTML, CSS, JavaScript

Dependencies

None

Usage

Copy index.html, styles.css and script.js into your project.

Typography: Inter, with a system sans-serif fallback.

About Toggle 05

Toggle 05 is a toggle component in the Toggle Components collection, available in HTML + CSS + JavaScript and React + TypeScript + Tailwind CSS. Last updated September 10, 2026.

  • toggle
  • chip toggle

What the code includes

HTML + CSS + JavaScript

3 files: index.html, styles.css, script.js

  • Behavior is handled in script.js.
  • ARIA in the markup: aria-pressed.
  • HTML elements used: button, svg.
  • Includes a prefers-reduced-motion rule for its animation.

React + TypeScript + Tailwind CSS

3 files: Toggle05.jsx, Toggle05.types.ts, Toggle05.tailwind.css

  • Configurable through 6 props: label, pressed, defaultPressed, onPressedChange, disabled, className.
  • Uses React hooks: useEffect, useRef, useState.
  • ARIA in the markup: aria-pressed.
  • HTML elements used: button, svg.
View all Toggle Components (10)