How to remove the wrapping span? #197
-
I see the skeleton's output includes a wrapping span which in my project causes layout issues. If I remove the span, everything works well. How can I output the skeleton without the wrapping span? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I recommend using the Alternatively, you can import our CSS file and then write <span className="react-loading-skeleton" /> That will give you just the "inner element" with the container |
Beta Was this translation helpful? Give feedback.
I recommend using the
containerClassName
prop to style the containerspan
so that it does not cause layout issues in your app.Alternatively, you can import our CSS file and then write
That will give you just the "inner element" with the container
span
. Of course, you are no longer using our React component so you won't be able to use the props that it provides.