You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -143,41 +160,37 @@ All variants and breakpoints (hover, focus, lg, ...) work with animations und an
143
160
144
161
## Arbitrary values
145
162
146
-
This plugin uses the Just-in-Time (JIT) engine, which allows you to use [arbitrary values](https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values) for most animation properties.
163
+
Of course, you can use arbitrary values for animations ultilities:
If you want to change some animations, extend your tailwind.config.js file:
173
+
With **Tailwind CSS v4.0** or newer you can use the shorthand syntax for custom properties. Bare values for delay, duration and iteration utilities also work.
Take a look at [src/theme.js](https://github.com/new-data-services/tailwindcss-animated/blob/main/src/theme.js) for the default settings.
181
+
More information on the new arbitrary value syntax can be found in the [Tailwind CSS Docs](https://tailwindcss.com/docs/adding-custom-styles#using-arbitrary-values).
182
+
183
+
## Override default values
184
+
185
+
All animations come with default values for duration, delay and timing function. If you want to overwrite these values globally, you can set the following CSS properties:
186
+
187
+
```css
188
+
:root {
189
+
--default-animation-duration: 500ms;
190
+
--default-animation-delay: 0s;
191
+
--default-animation-timing-function: ease;
192
+
}
193
+
```
181
194
182
195
## FAQ
183
196
@@ -187,10 +200,6 @@ To run animations when an element enters the viewport, you need JavaScript. (At
187
200
188
201
A good starting point for a JavaScript solution would be the [Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). Or tools that build on it, such as the [Alpine.js Intersect plugin](https://alpinejs.dev/plugins/intersect) and the [Tailwind CSS Intersection plugin](https://github.com/heidkaemper/tailwindcss-intersect), to name just two.
189
202
190
-
### Does this work with the Play CDN?
191
-
192
-
Unfortunately not. The Tailwind CSS Play CDN currently does not support third-party plugins.
193
-
194
203
### How to combine multiple animations?
195
204
196
205
The simplest approach is to nest two elements:
@@ -207,10 +216,12 @@ Offset positions of predefined animations can't be changed on the fly. But the b
207
216
208
217
If you need more details on how compositions work, check out the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-composition).
209
218
219
+
### Does this work with the Play CDN?
210
220
221
+
Unfortunately not. The Tailwind CSS Play CDN currently does not support third-party plugins.
0 commit comments