Magic CSS

Opt-in Magic Animate keyframes as UnoCSS animate-* utilities, with animation-fill-mode both.

Magic CSS is off by default. It registers Magic Animate keyframes on the UnoCSS animation theme. There is no extra options object — magicCss is a boolean.

uno.config.ts
import { presetVinicunca } from '@vinicunca/unocss-preset';
import { defineConfig } from 'unocss';

export default defineConfig({
  presets: [
    presetVinicunca({
      magicCss: true
    })
  ]
});

Use the Wind4 animate-* utilities. Each named animation also sets animation-fill-mode: both.

<div class="animate-magic">Magic</div>
<div class="animate-puff-in">Puff in</div>
<div class="animate-vanish-out">Vanish out</div>

Animations

Grouped the same way as the preset's theme.animation.category map.

CategoryClasses (animate-{name})
Blingpuff-in, puff-out, vanish-in, vanish-out
Boingboing-in-up, boing-out-down
Bombbomb-left-out, bomb-right-out
Magic Effectsmagic, swap, twister-in-down, twister-in-up
Mathfoolish-in, foolish-out, hole-out, swash-in, swash-out
Spacespace-in-down, space-in-left, space-in-right, space-in-up, space-out-down, space-out-left, space-out-right, space-out-up
Perspectiveperspective-down, perspective-down-return, perspective-left, perspective-left-return, perspective-right, perspective-right-return, perspective-up, perspective-up-return
Rotaterotate-down, rotate-left, rotate-right, rotate-up
Slideslide-down, slide-down-return, slide-left, slide-left-return, slide-right, slide-right-return, slide-up, slide-up-return
Static Effectsopen-down-left, open-down-left-return, open-down-right, open-down-right-return, open-up-left, open-up-left-return, open-up-right, open-up-right-return
Static Effects Outopen-down-left-out, open-down-right-out, open-up-left-out, open-up-right-out
Tintin-down-in, tin-down-out, tin-left-in, tin-left-out, tin-right-in, tin-right-out, tin-up-in, tin-up-out
These slide-* names are Magic Animate keyframes (animate-slide-down). They are separate from the default animation preset's slide-in-top / slide-out-left utilities.

Control duration and easing with Wind4 modifiers:

<div class="animate-swash-in animate-duration-500 animate-ease-in-out">
  Hello
</div>