CSS view-timeline-inset Property
Description
The view-timeline-inset property controls an inset rectangle that alters the area used as the "viewport" for view-based timelines. Rather than relying strictly on the element’s outer used box as the region that determines timeline progress and intersection-like checks, this property lets authors shrink or expand that region relative to the element. The resulting adjusted rectangle is what the browser uses when calculating how far through a view timeline an element is (and therefore how animations attached to that timeline progress), so changing the inset effectively changes when and how strongly view-driven animations run.
Because it changes the geometry that drives timeline progress, view-timeline-inset is a precision tool for timing and choreography. You can use it to cause an animation to begin earlier or later relative to the element’s visual appearance in the viewport, to delay a visibility-triggered effect until more of the element is inside the area of interest, or to create "buffer" regions that require deeper intersection before progress advances. It is commonly used together with a view timeline declaration such as view-timeline to refine exactly how that timeline interprets the element’s position and coverage.
In layout and interaction scenarios, the inset moves with the element - the adjusted rectangle is applied in the same coordinate context used by the timeline, so transforms, scrolling, and layout changes that affect the element will also affect the timeline region. When combined with timeline-driven animations (for example those tied through animation-timeline), the inset can subtly change easing and sequence because it affects the mapping from element position to timeline progress. Because it affects when animations become active, consider accessibility and performance: tuning the inset can reduce unnecessary off-screen animation work, but it can also make effects harder to discover if the trigger region becomes too small or too disconnected from the visible target.
Definition
- Initial value
- auto
- Applies to
- all elements
- Inherited
- no
- Computed value
- a list consisting of two-value pairs representing the start and end insets each as either the keyword auto or a computed value
- Animatable
- by computed value type
- JavaScript syntax
- object.style.viewTimelineInset
Syntax
view-timeline-inset: <inset-values>;
Values
- <inset-values> can be specified in lengths (px, em, etc.) or percentages (%) and can be one or two values. When one value is specified, it applies to both start and end. When two values are specified, the first is the start inset, and the second is the end inset.
Example
Browser Support
The following information will show you the current browser support for the CSS view-timeline-inset 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
