lukePeavey / SplitType

Javascript utility that splits text into lines, words, characters for animation
https://lukepeavey.github.io/SplitType/
558 stars 40 forks source link

Improve type definitions for split types option #26

Closed lukePeavey closed 2 years ago

lukePeavey commented 2 years ago

Improves type definitions for the split types options. The value can be a comma separated list of supported "types", or an array of supported types. It now provides autocomplete suggestions for both cases.

Thanks to @StevenJPx2 for the contribution. Let me know if you have any thoughts before i merge this.

new SplitType('p', { types: 'lines, words, chars' })
new SplitType('p', { types: ['lines', 'words', 'chars'] })

https://user-images.githubusercontent.com/8286271/166168960-ea57ad69-f720-464d-8884-3eea7436c39f.mov

closes #22