The repeatCount attribute is an SVG animation attribute that sets how many times an animation repeats. It accepts a number or the value indefinite, and is used with SVG animation elements to control playback duration and looping behaviour in the browser.
What the repeatCount attribute controls
The repeatCount attribute defines how many times an SVG animation runs before it stops, or whether it loops indefinitely. In practice, it is part of the animation timing model rather than the visual design itself, so it shapes playback behaviour across supported browsers and animation elements.
How repeatCount fits into SVG animation timing
repeatCount is one of the attributes that determines the life cycle of an SVG animation. A numeric value makes the animation repeat a fixed number of times, while indefinite keeps it repeating until another condition ends it. That means the attribute works alongside other timing controls to shape motion frequency, pacing and termination.
Because it affects when an animation ends, repeatCount can also influence how a user experiences loading cues, visual emphasis, progress indicators and repeated motion effects. The attribute does not create motion on its own, but it changes the duration and persistence of motion that already exists in the animation element.
Values, limits and browser behaviour
The accepted values are intentionally simple: a number or the keyword indefinite. The number is interpreted as a repeat count, not a percentage or time value, so the attribute is about iteration rather than duration. That distinction matters when designers expect an animation to “play longer” but actually need more cycles or fewer cycles.
Browser support depends on the SVG animation model being used and on how the page implements the animation. In practical terms, the most reliable interpretation is the one defined by the SVG animation specification and the browser’s current implementation. Small differences in animation timing support can affect how exactly repeated playback appears, especially when combined with other animation timing attributes.
Why repeatCount matters in markup and motion design
repeatCount is useful because it gives authors control over repetition without scripting. A single value can make an animation feel subtle, rhythmic, persistent or continuous, which is important for icons, charts, loaders and decorative effects. Used carefully, it helps animations communicate state without overwhelming the page.
It also matters because repeated motion can become distracting or misleading if the loop count is chosen poorly. A finite count can signal completion, while an indefinite loop can imply that a process is ongoing. That makes repeatCount a small attribute with a meaningful role in how motion communicates intent.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org