@n-ui

Usage

Button sizes

Use the size prop to change the size of the button. You can set the value to xs, sm, md, or lg.

Button with icon

You can add left and right icons to the Button component using theleftIcon and rightIcon props respectively.

Button variants

Use the variant prop to change the visual style of the Button. You can set the value to solid, ghost, outline, or link.

You can also use icons from popular libraries like react-icons and pass it into the button.

Button loading state

Pass the isLoading prop to show its loading state. By default, the button will show a spinner and leave the button's width unchanged. You can also pass the loadingText prop to show a spinner and the loading text.

You can also change the spinner itself to use custom loaders as per your design requirements. Pass the spinner prop and set it to a custom react element.

Perfect dark mode

No flash of unstyled content, and theme is consistent between switched tabs.