maxeth / react-type-animation

A React typewriter animation based on typical with extended functionality and customization.
https://react-type-animation.netlify.app/
MIT License
353 stars 25 forks source link

How to pass props to the wrapper element? #38

Closed ankitjangir01 closed 5 months ago

maxeth commented 10 months ago

What's your use case if I may ask? Which props do you need to pass to a native HTML element?

ankitjangir01 commented 10 months ago

@maxeth I want to apply CSS to the text as background-image: linear-gradient(...). Since I'm working with ReactJS, I wanted to pass the style prop. Even if I try to apply style using plain CSS, I need to name the text with some class or id which again doesn't seem to be supported here. Is there any alternative to this?

maxeth commented 9 months ago

@ankitjangir01

Passing a custom className or style prop – which gets applied to the wrapper element of the text – is supported. I'm not quite sure what change you're proposing.

Take a look at the source.