Skip to content
TMachadoDevPublic

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

⚡ Switch Component

A simple switch component built from scratch using React and TypeScript.

This project was created as a way to deeply understand how a basic UI interaction works under the hood — from state handling to accessibility and smooth UI feedback.


🧠 Purpose

Even simple UI components hide important complexity:

  • state synchronization
  • user interaction handling
  • accessibility behavior
  • visual feedback

This switch was built to understand and implement those concepts manually, without relying on external UI libraries.


✨ Features

  • Toggle between ON / OFF states
  • Smooth visual transition
  • Keyboard support (Space / Enter)
  • Click and touch support
  • Fully controlled component behavior
  • Minimal and clean implementation

⚙️ Tech Stack

  • React
  • TypeScript
  • Tailwind CSS
  • Framer Motion

🧩 Usage

import Switch from "./components/Switch";

export default function Example() {
  return <Switch/>
}

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages