maxeth/react-type-animation

How to pass props to the wrapper element?

Closed this issue · 3 comments

How to pass props to the wrapper element?
maxeth commented

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

@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

@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.