Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

button

v1.1.1arrow_drop_down
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
STATUS
Passing
DOWNLOADS
3,710
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
4 KB
Base button, with very basic styles.
1 contributor
Install button as a package?
Copied
npm i @bit/bit.base-ui.input.button
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
chevron_left
chevron_right
Button ()

Base button, with very basic styles. Accepts all parameters of native html button.

If onClick returns a promise, BaseButton will show a loader automatically, until the promise is resolved or rejected.

Example
<Button onClick={() => api.submitUserData()} loader={<CustomLoader/> } />
Properties
NameTypeDefault valueDescription
loader
ReactNode<DotsLoader/>

loader to show while button is busy. Turns on when onClick returns a promise (until it resolves), or when loading={true}.

loading
booleanfalse

explicitly toggle loader on and off