HAIBAZO Internship

Button

Button (Atom) — props and states.

Design

Props

No.KeyTypeValuesDescription
1variantenumprimary, secondary, ghost, linkVisual style of the button.
2sizeenumsm, md, lgButton size.
3disabledbooleantrue, falseDisables interaction and dims the button.
4loadingbooleantrue, falseShows a spinner and blocks interaction.
5leftIconReactNodeIcon rendered before the label.
6rightIconReactNodeIcon rendered after the label.
7fullWidthbooleantrue, falseStretches the button to the container width.
8typeenumbutton, submit, resetNative HTML button type.
9onClickfunction(event) => voidClick handler.
10childrenReactNodeButton label / content.

States

No.KeyTypeValuesDescription
1defaultvisualResting state.
2hovervisualPointer is over the button.
3activevisualButton is being pressed.
4focusvisualHas keyboard focus (visible focus ring).
5disabledvisualNon-interactive and dimmed.
6loadingvisualSpinner shown; non-interactive.

On this page