# Button Documentation ## Installation ```bash jsrepo add ui/button ``` ## Components ### Button The root button component. #### Props | Prop | Type | Default Value | Required | Bindable | Description | |------|------|--------------|----------|----------|-------------| | ref | HTMLButtonElement | HTMLAnchorElement | null | false | true | A reference to the button element. | | children | Snippet | - | false | false | The content of the button. | | variant | "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | default | false | false | The visual style of the button. | | size | "default" | "sm" | "lg" | "icon" | default | false | false | The size of the button. | | loading | boolean | - | false | false | Whether the button is in a loading state. | | onClickPromise | (e: MouseEvent) => Promise | - | false | false | A function to await while showing a loading state when the button is clicked. |