Lottie-web: Add class name for each path.

Created on 3 Mar 2017  路  3Comments  路  Source: airbnb/lottie-web

Each path will generate with a class.
The class value will be set to it's respective layer name from After Effects.

This will allow DOM selection of each path, opening up a huge potential to customize the SVG based on interaction.

(I'm loving bodymovin otherwise!)

Most helpful comment

That is already implemented :)
If you name your layers starting with a dot, they will get the layer's name as class name.
if you prepend the layer with a "#", it will be exported with an id instead of a class.

All 3 comments

That is already implemented :)
If you name your layers starting with a dot, they will get the layer's name as class name.
if you prepend the layer with a "#", it will be exported with an id instead of a class.

I had no idea! Should this be added to the docs or did I miss it?
I'm happy to write it in and submit a pull request if you want.

Thank you so much for this Hernan!

Now I'm wondering if there's other features I don't know of 馃

You're right, it's not documented anywhere. I didn't notice it.
If you're up for it, it would be great :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samiam2017 picture samiam2017  路  3Comments

deborabm picture deborabm  路  3Comments

ritsraghani picture ritsraghani  路  3Comments

phileastv picture phileastv  路  3Comments

phantomboogie picture phantomboogie  路  4Comments