Skip to content

Button

te-button covers the usual variants, sizes and states, plus an optional ripple.

Variants

vue
<te-button type="normal">normal</te-button>
<te-button type="primary">primary</te-button>
<te-button type="secondary">secondary</te-button>
<te-button type="success">success</te-button>
<te-button type="info">info</te-button>
<te-button type="warning">warning</te-button>
<te-button type="danger">danger</te-button>
<te-button type="pink">pink</te-button>
<te-button type="purple">purple</te-button>
<te-button type="light">light</te-button>
<te-button type="dark">dark</te-button>

Sizes

vue
<te-button size="small">small</te-button>
<te-button size="medium">medium</te-button>
<te-button size="large">large</te-button>

Outlined and text only

vue
<te-button type="primary" outlined>outlined</te-button>
<te-button type="danger" outlined>outlined</te-button>
<te-button type="primary" only-text>only text</te-button>
<te-button type="danger" only-text>only text</te-button>

Shape and emphasis

vue
<te-button rounded>rounded</te-button>
<te-button shadowed>shadowed</te-button>
<te-button uppercased>uppercased</te-button>

Loading and disabled

A loading button shows a spinner but stays clickable — disable it too if the action must not repeat.

vue
<te-button type="primary" loading>Saving</te-button>
<te-button type="primary" loading disabled>Saving</te-button>
<te-button disabled>disabled</te-button>

Ripple

Click to see it.

vue
<te-button type="primary" ripple>ripple</te-button>

Icon only

vue
<te-button icon type="primary"><te-icon social name="github" /></te-button>

Props

PropTypeDefaultDescription
type'normal' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'pink' | 'purple' | 'light' | 'dark''primary'Colour variant.
buttonType'button' | 'reset' | 'submit''button'Native type attribute.
size'small' | 'medium' | 'large''medium'Padding and minimum height.
roundedbooleanfalseFully rounded corners.
noRoundedbooleanfalseSquare corners. Used by te-button-group.
outlinedbooleanfalseTransparent background with a border.
onlyTextbooleanfalseNo background until hovered.
shadowedbooleanfalseDrop shadow that grows on hover.
uppercasedbooleanfalseUppercases the label.
disabledbooleanfalseDisables the button.
loadingbooleanfalseShows a spinner before the label.
ripplebooleanfalseRipple effect on click.
iconbooleanfalseSquare button sized for a single icon.

Events

EventPayloadDescription
clickMouseEventEmitted on click, including while loading.

Slots

SlotPropsDescription
defaultButton label.

Released under the MIT License.