IconButton with UI Kit

Does somebody have an idea how to achieve something similar to IconButton with UI Kit? Or will this button type maybe be supported in the future?

I played around with the ‘shouldFitContainer’ property of UI Kit’s Button and also negative margins. But I could not produce any satisfying workarounds so far. You’ll get a rectangular button because of the predefined padding.

Yeah submit a bug report: https://developer.atlassian.com/support

In UI Kit 1 there was no extra spacing for an icon-only button. Attention to detail has been lost with UI Kit 2.

I ended up with <Button appearance="subtle" spacing="none" iconBefore="add" onClick={openModal}> </Button> which ends up looking like this
Screenshot 2025-03-30 at 14.20.23

It would be nice if the IconButton was support in Forge UI like LoadingButton and LinkButton.

@mpaisley Can you chime in on this one?

I ended up with <Button appearance="subtle" spacing="none" iconBefore="add" onClick={openModal}> </Button> which ends up looking like this

We use the same approach. An average user probably doesn’t notice it but it’s still annoying and should be fixed.

1 Like