Skip to content

Button ​

Button is used to trigger some actions.

Demos ​

Basic

There are secondary, primary, info, success, warning, danger and ghost button types.
DefaultPrimaryInfoSuccessWarningDangerGhost

Secondary

Secondary buttons have a lighter fill than solid variants.
DefaultPrimaryInfoSuccessWarningDanger

Size

Buttons can be sm, md and lg in size.
SmallMediumLarge

Dashed

Dashed buttons use a dashed border style.
DefaultPrimaryInfoSuccessWarningDanger

Text

Text buttons have no background or border until hovered.
DefaultPrimaryInfoSuccessWarningDanger

Quaternary

quaternary is a quiet transparent button (Naive quaternary). Use it for icon or menu triggers.
More⋯

Disabled

Buttons can be disabled.
DisabledPrimaryError

Loading

Buttons can have loading states.
LoadingPrimaryInfo

Ghost

Ghost buttons have transparent backgrounds.
GhostLarge Ghost

Tag

You can render buttons as links with the href prop.
Getting startedButton docs

Button group

Group related buttons with gk-button-group.
LeftMiddleRightLive aSufficientLife

Playground

Try combinations of props interactively.
Button

API ​

Button Props ​

PropTypeDefault
variant'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'ghost''primary'
size'sm' | 'md' | 'lg''md'
type'button' | 'submit' | 'reset''button'
disabledbooleanfalse
loadingbooleanfalse
secondarybooleanfalse
dashedbooleanfalse
textbooleanfalse
quaternarybooleanfalse
hrefstring—

Button Slots ​

NameDescription
defaultButton label content

ButtonGroup ​

NameDescription
defaultGrouped gk-button children

CSS Parts ​

PartDescription
baseInteractive element (button or a)
labelLabel wrapper
spinnerLoading indicator