Skip to content

Commit 81893c2

Browse files
author
Adam Plesnik
committed
Update readme, package.json name
1 parent c0f852f commit 81893c2

File tree

2 files changed

+52
-4
lines changed

2 files changed

+52
-4
lines changed

README.md

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
1-
# Tailwind CSS Scroll-driven Animations Plugin
1+
# Scroll-driven Animations for Tailwind CSS
22

3-
`experimental` `chrome 116+`
3+
**Unofficial** and experimental plugin for Tailwind CSS v3.4+ that provides utilities for scroll-driven animations.
44

5-
This is short explanation with demo of how I'd tackle the scroll-driven animations plugin for Tailwind CSS.
5+
`unofficial` `experimental` `chrome-115+`
6+
7+
## Installation
8+
9+
Install the plugin from npm:
10+
11+
```sh
12+
npm install @adam.plesnik/tailwindcss-scroll-driven-animations
13+
```
14+
15+
Then add the plugin to your `tailwind.config.js`:
16+
17+
```js
18+
module.exports = {
19+
plugins: [
20+
require('@adam.plesnik/tailwindcss-scroll-driven-animations'),
21+
// ...
22+
],
23+
}
24+
```
25+
26+
## Usage
27+
28+
The plugin provides utilities for a subset of CSS scroll-driven animation properties.
29+
30+
- `animation-timeline`
31+
- `animation-range`
32+
- `scroll-timeline`, `view-timeline`
33+
- `timeline-scope`
34+
35+
### Animation Timeline
36+
37+
The single most impressive feature of scroll-driven animations is an anonymous animation timeline. It allows user to easily trigger anything just by scrolling the page. The plugin allows user to use the `.timeline` CSS class which defaults to `animation-timeline: scroll(y)` and also provides an option to set custom timeline name with a modifier.
38+
39+
### Scroll and View Timeline
40+
41+
Scroll and View timelines provide user with better control over the animations. Both `.scroll-timeline` and `.view-timeline` are meant to be used with modifiers to set the timeline name.
42+
43+
### Range
44+
45+
Animation range controls start and end of an animation. Utility class `.range` offers various options along with a possibility to use length modifiers.
46+
47+
### Scope
48+
49+
Timeline scope allows to control animated elements outside the parent which defines the timeline. Utility `.scope` should be used with a modifier to define the timeline name set by `.scroll-timeline` or `.view-timeline`.
50+
51+
### Browser Support
52+
53+
Scroll-driven animations are not broadly supported yet. Use the `no-animations:...` variant for fallback styling.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "tailwind-job",
2+
"name": "tailwindcss-scroll-driven-animations-docu",
33
"private": true,
44
"version": "0.0.0",
55
"type": "module",

0 commit comments

Comments
 (0)