Skip to main content
The plugin is optional. The prebuilt stylesheet already contains every token at its shipped value, and nothing in tailmotion.css requires the plugin. Add it when you want to change or extend those tokens, or use arbitrary values.

Setup

Generated utilities

70 utilities across nine groups. Each writes one custom property with !important, so an element-level utility always beats an inherited motion profile. Arbitrary values work everywhere: tm-duration-[420ms], tm-speed-[0.9], tm-distance-[3rem], tm-ease-[cubic-bezier(0.2,0,0,1)].

Default token values

Extending the tokens

Two equivalent ways. Options merge over the defaults; nothing is removed.
The merge order is: package defaults, then theme.extend.tailmotion, then plugin options. The last one wins.

TypeScript

Plugin options are typed as TailMotionPluginOptions.

What the plugin does not do

  • It does not generate the animation classes. Those live in tailmotion.css, which you import separately.
  • It does not generate variants. The prebuilt hover: / focus: / responsive selectors ship in variants.css, inside the stylesheet.
  • It does not require Tailwind at runtime. tailwindcss is an optional peer dependency, and TailMotion works with no Tailwind at all.