#How to set a default size for the Button component?

1 messages · Page 1 of 1 (latest)

sacred creek
#

How to set a default size for the Button component?

strange scroll
#

size=sm,md,lg ?

sacred creek
#

In fact, what I wanted is for all buttons to have size "sm" by default

strange scroll
#

You can create your own component based on the NextUI one and set the default size to "sm"

sacred creek
#

This was the way I used, but I thought I would have a way without needing to encapsulate the component. Anyway, thanks for your attention

strange scroll
#

We don’t provide global properties because it would overcomplicate the API imagine adding the default prop per each component it will be endless