# tw-animate-css

> Tailwind v4 CSS-only enter and exit animation utilities (animate-in, fade-in, slide-in-from-top).

Source: https://tastebase.ehsanulsiam.workers.dev/browse/tw-animate-css

free

Tailwind v4 CSS-only enter and exit animation utilities (animate-in, fade-in, slide-in-from-top).

by Luca Bosin[GitHub](https://github.com/Wombosvideo/tw-animate-css)[npm](https://npmjs.com/package/tw-animate-css)

[visit](https://github.com/Wombosvideo/tw-animate-css?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://github.com/Wombosvideo/tw-animate-css](https://github.com/Wombosvideo/tw-animate-css?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

The default animation library for React (formerly Framer Motion): springs, gestures, layout and exit animations.

no preview

### [shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)

Copy-in React components on Tailwind, built on Base UI, Radix or React Aria, plus a registry CLI.

no preview

### [Radix Primitives](https://tastebase.ehsanulsiam.workers.dev/browse/radix-ui)

The original unstyled, accessible React primitives, now one tree-shakeable package.

no preview

### [Base UI](https://tastebase.ehsanulsiam.workers.dev/browse/base-ui)

Unstyled, accessible React primitives from the Radix, Floating UI and MUI teams.

## Looks that pick it

[Data-dense / terminalfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/data-dense)[Developer docsfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/developer-docs)

## For your agent

##### Install

`npm i -D tw-animate-css`

##### Use it for

- open/close animations on shadcn or Radix popovers, menus and dialogs via data-[state=open]:animate-in
- a fade or slide on mount without shipping any JavaScript
- server-rendered pages where a JS animation library would be overkill

##### Skip it when

- the element must animate out before React unmounts it and no primitive keeps it mounted: use motion AnimatePresence
- interruptible or gesture-driven motion: CSS keyframes restart instead of retargeting; use motion
- Tailwind v3 projects: use tailwindcss-animate (the plugin this replaces)
- scroll-triggered animation: it runs on mount, not when an element enters the viewport; use motion's whileInView

##### What's inside17 free

- animate-in
- animate-out
- fade-in / fade-out
- zoom-in / zoom-out
- spin-in / spin-out
- slide-in-from-* / slide-out-to-*
- blur-in / blur-out
- duration-*
- ease-*
- delay-*
- repeat-*
- direction-*
- fill-mode-*
- running / paused
- accordion-down / accordion-up
- collapsible-down / collapsible-up
- caret-blink

##### Facts

**Frameworks**
react, vue, svelte, solid, angular, vanilla

**Styling**
tailwind

**Weight**
tiny

**Accessibility**
ok

**Maturity**
stable

**License**
MIT

**Price**
Free

##### Pairs with

[shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)[Radix Primitives](https://tastebase.ehsanulsiam.workers.dev/browse/radix-ui)[Base UI](https://tastebase.ehsanulsiam.workers.dev/browse/base-ui)

##### Alternatives

[Motion](https://tastebase.ehsanulsiam.workers.dev/browse/motion)

```
/* app.css */
@import "tailwindcss";
@import "tw-animate-css";

<div class="animate-in fade-in zoom-in-95 duration-200">...</div>
<div class="data-[state=closed]:animate-out data-[state=closed]:fade-out">...</div>
```

https://github.com/Wombosvideo/tw-animate-css

This site doesn't allow being shown inside another page. Here is how it looks.

[Open in a new tab](https://github.com/Wombosvideo/tw-animate-css?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

[Visit](https://github.com/Wombosvideo/tw-animate-css?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
