themes icon indicating copy to clipboard operation
themes copied to clipboard

[Spinner] Any way to change color and size ?

Open yukiyohure opened this issue 1 year ago • 5 comments

I'd like to make the spinner bigger than the given option size which is 20px * 20px with 100% scaling. And change the color of it.

Thank you.

yukiyohure avatar May 30 '24 08:05 yukiyohure

You can override width, height, and color via the regular style prop if size and color props don't work for you.

How large is your target size though and what does your design look like?

vladmoroz avatar May 30 '24 08:05 vladmoroz

@vladmoroz I guess I didn't read the documentation properly... By "style prop", do you mean regular CSS? I'm using CSS Modules on Next.js Pages Router.

How large is your target size though and what does your design look like?

The target size is 40px * 40px for the page content loading. The design is the same as the provided Spinner component from Radix-UI Themes except for the color, which is #027FFF.

yukiyohure avatar May 31 '24 03:05 yukiyohure

Yeah, with regular CSS

We'll consider adding more sizes but this should work in the meantime

vladmoroz avatar May 31 '24 16:05 vladmoroz

@vladmoroz I made it with regular CSS 😄

https://github.com/radix-ui/themes/assets/35441214/364c207d-fe5e-4e8b-a2ed-1cfa7755b88b

We'll consider adding more sizes but this should work in the meantime

That's good news! The capability of adjusting the Spinner size via props would be a handy option.

yukiyohure avatar Jun 01 '24 15:06 yukiyohure

Guess this can be closed

kotAPI avatar Jun 29 '24 03:06 kotAPI