Skip to content

A small React + Tailwind demo that shows how to toggle an alert with a button. The alert appears below the button with a smooth fade & slide transition, without shifting the layout.

Notifications You must be signed in to change notification settings

pr-assignments/alert

Repository files navigation

React Alert Toggle

A simple React + Tailwind example that demonstrates how to open and close an alert with smooth transitions, without pushing surrounding content.

Features

  • Button toggles an alert on/off.
  • Alert is absolutely positioned, so it doesn’t shift the layout.
  • Smooth fade & slide transition using Tailwind CSS.
  • Fully responsive.

Installation

git clone https://github.com/pr-assignments/alert.git
cd alert
npm install
npm run dev

About

A small React + Tailwind demo that shows how to toggle an alert with a button. The alert appears below the button with a smooth fade & slide transition, without shifting the layout.

Resources

Stars

Watchers

Forks