Skip to content

Commit c2cd36e

Browse files
author
Adam Plesnik
committed
Update README, add LICENSE
1 parent dd7746c commit c2cd36e

File tree

2 files changed

+54
-3
lines changed

2 files changed

+54
-3
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Adam Plesnik adamplesnik.com
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+33-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
1-
# Scrol-driven Animations in Tailwind CSS
2-
`experimental` `unofficial`
1+
# Scroll-driven Animations for Tailwind CSS
32

4-
A plugin for Tailwind CSS v3.2+ that provides utilities for scroll-driven-animations.
3+
`unofficial` `experimental` `chrome-115+`
4+
5+
A plugin for Tailwind CSS v3.4+ that provides utilities for scroll-driven animations.
6+
7+
## Usage
8+
9+
The plugin provides utilities for a subset of CSS scroll-driven animation properties.
10+
11+
- `animation-timeline`
12+
- `animation-range-start`, `animation-range-end`
13+
- `scroll-timeline`, `view-timeline`
14+
- `timeline-scope`
15+
16+
### Animation Timeline
17+
18+
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.
19+
20+
### Scroll and View Timeline
21+
22+
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.
23+
24+
### Range
25+
26+
Animation range controls start and end of an animation. Utility classes `.range-start` and `.range-end` can be used for setting the start and the end of the range. They default to `entry` and `exit` respectively.
27+
28+
### Scope
29+
30+
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`.
31+
32+
### Browser Support
33+
34+
Scroll-driven animations are not broadly supported yet. Use `@supports` rules for fallback styling.

0 commit comments

Comments
 (0)