kobweb icon indicating copy to clipboard operation
kobweb copied to clipboard

Create defaults for a nice circular button

Open bitspittle opened this issue 2 years ago • 2 comments

Probably a CircleButton variant? Alternately, a CircleButton composable, which may be better if we start adding in size parameters to our widgets? (Since otherwise it might be hard to respond to different sizes)

Currently, if you clip with a Circle and set padding to 0.px, you get something where the button edges show slightly:

Test image

Anyway, if we support something official, then users won't have to worry about this.

I'm leaning towards making a CircleButton composable; it is readable and a bit more flexible for future changes.

bitspittle avatar Dec 20 '22 18:12 bitspittle

Added to 1.0 because it should be trivial, and I think would be used very commonly.

bitspittle avatar Dec 20 '22 18:12 bitspittle

Comment from Discord: Before adding a CircleButton, make sure something like clip(radius = 50.percent) doesn't work with multiple sizes.

bitspittle avatar Dec 20 '22 18:12 bitspittle