On this page
API Reference

Button#

Github

Button is a user interface element typically used to trigger some action or event. Users can click the button to perform specific functions, such as submitting a form, launching a program, or navigating to other pages. Buttons usually appear in rectangular or circular shapes and can contain text, icons, or a combination of both.

import { Button } from "wis/button"

API Reference#

NameTypeDefaultDescription
textstringnoneThe text information displayed on the button.
variantprimary classic secondary tertiary ghostsecondaryThe visual variant to apply to button.
statusdangernoneSets the special status of the button.
disabledbooleanfalseDisabled the button click.
iconReactNodenoneThe icon element will be displayed next to the button text.
iconControlprefix suffixprefixControls the display position of the icon relative to the text.
sizemd sm xsmdSet the size of button.
shortcutKeystringnoneSets a global shortcut key, such as Control+I. When the user presses the combination key, the button's click event will be triggered. View Keyboard
onClick(event: MouseEvent<HTMLButtonElement>) => voidnoneEvent handler called when the button is clicked.