Platinum sponsors

Strings

Edit values that hold several numbers as one line of text.

The string type edits a value as text. Use it for values with several numbers, such as a margin, a shadow or an SVG path.

The Anime.js editor margin row with the string value 10px 20px
utils.set('.card', {
  id: 'Card style',
  margin: '10px 20px',
});

Examples

Property Value
margin '10px 20px'
borderRadius '8px 24px'
boxShadow '0px 4px 12px rgba(0, 0, 0, 0.3)'
filter 'blur(4px) brightness(1.2)'
transformOrigin '50% 100%'

Keep the same structure in the start and end values, such as '10px 20px' to '0px 40px', so each number has a match to animate to.

Previous
Next