MangeQR
v1.0
TarifsBlogComponents
Docs
Button

Button

A versatile component designed to mimic the appearance and functionality of a traditional button, offering a range of customization options for various use cases.

Installation

npx shadcn add https://extend-ui.com/registry/button.json 

Button example usage

<Button variant={'bouncing'} tooltipText={`I'm bouncing!`}>
  Button
</Button>

Button component props

NameTypeDescription
variant

default | destructive | outline | secondary | ghost | link | ringHover | glowingRing | shimmer | bouncing

Defines the visual style of the button. It supports several predefined styles like default, outline, etc.

sizedefault | sm | lg | icon

Determines the size of the button. Available sizes are sm, lg, and icon.

asChildboolean

If true, the button will render as a child component using a Slot, useful for passing custom components.

loadingbooleanIf true, shows a loading spinner instead of the button content.
loadingTextstring

Text displayed next to the loading spinner when the button is in a loading state.

tooltipTextstringIf provided, shows a tooltip when hovering over the button.
classNamestringAdditional CSS classes to apply custom styling to the button.
childrenReact.ReactNodeThe content inside the button, typically text or an icon.
refReact.Ref<HTMLButtonElement>A ref to the button element for direct DOM manipulation.
...propsReact.ButtonHTMLAttributes

Additional props that can be passed to the button, such as onClick, disabled, etc.