Button
The Button component is used to create interactive buttons with various styles and states.
Props
Name | Type | Default | Description |
---|---|---|---|
type | "default" | "primary" | "plain" | "borderless" | "text" | "default" | The type of button. |
htmlType | "button" | "submit" | "reset" | "button" | The HTML type of the button (e.g., "button", "submit", "reset"). |
loading | boolean | false | Determines whether the button is in a loading state. |
disabled | boolean | false | Determines whether the button is disabled. |
success | boolean | false | Determines whether the button has a success status. |
error | boolean | false | Determines whether the button has an error status. |
warning | boolean | false | Determines whether the button has a warning status. |
children | string | React.ReactElement | The content of the button. | |
icon | string | JSX.Element | React.ReactNode | React.ReactElement | The icon to display in the button. | |
suffixIcon | string | JSX.Element | React.ReactNode | React.ReactElement | The icon to display as a suffix in the button. | |
size | "large" | "medium" | "default" | "small" | "mini" | "default" | The size of the button. |
Try It
import { Button } from '@kloktun/uikit' export default function BasicButton() { return ( <Button> Click Me </Button> ) }