CSS view-timeline Property
Description
The view-timeline property lets an element define a temporal "view" that maps the element’s scrolling or visibility progress into a timeline that other animation mechanisms can use as a driver. Instead of animations progressing solely along wall-clock time, a view timeline expresses progress in terms of how an element is revealed, scrolled, or intersected by a viewport or container; that progress then becomes the time axis for animations. This makes it straightforward to tie animation progress directly to user scrolling, element visibility, or relative position, so motion can feel directly connected to user input and layout changes.
When you use a view timeline you typically pair it with the normal CSS animation system so that an animation’s playback is driven by the timeline rather than only by real time. That relationship is how you can make an animation scrub as the user scrolls; the animation’s timing is taken from the timeline instead of the document clock, which lets visual states follow scrolling precisely. To connect animations to a timeline you work with the same animation mechanisms you already know from the animation property and related animation declarations, but the key difference is that progress is driven by view position rather than elapsed seconds.
Because view timelines are driven by scrolling and visibility, they interact closely with how an element’s scroll container is formed and behaves. The scrollability of the container and whether the element participates in normal scrolling flow affects the timeline’s progress - properties that control scrolling behavior such as overflow determine whether a container provides a scrollport that the timeline can use. Combining view timelines with scroll-related layout features (for example, snap points or virtualized lists) can produce expressive interfaces, but it also requires attention to performance: timelines that trigger complex layout changes can force reflows as the user scrolls. For smooth results prefer compositor-friendly properties (transform and opacity), minimize layout work in scroll-driven updates, and be mindful of how features like scroll-snap-type or heavy painting interact with the intended scrubbing behavior.
Definition
- Initial value
- see individual properties
- Applies to
- all elements
- Inherited
- no
- Computed value
- see individual properties
- Animatable
- see individual properties
- JavaScript syntax
- object.style.viewTimeline
Syntax
view-timeline: <timeline-name> [<timeline-axis>]?;
Values
- <timeline-name>The name of the timeline you want the element to be associated with.
- <timeline-axis>(optional) - The axis along which the timeline operates. Commonly block or inline.
Example
Browser Support
The following information will show you the current browser support for the CSS view-timeline property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported in some modern browsers, but not all.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
