How do I include a CSS file for custom styling in my custom component?

  • Goal: I'd like to include a stylesheet for my custom component, so I can style the component.

  • Steps: I created a standard css file and saved it in the same directory as my index.tsx. I've tried a bunch of different ways to try to import and reference the styles, but no luck.

  • Details: It just doesn't seem to work, or I'm going about it completely wrong.

  • Screenshots:

image

image

Hi @nl-setech,

It's funny that just over an hour ago I was having the same problem and managed to solve it with a post I saw.

Name the .css file to output.css ans the just import './output.css' in the index.tsx.

1 Like

Thanks so much! So simple! Works perfectly now!

2 Likes