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

button

v4.5.2arrow_drop_down
v4.5.2
v3.9.2
STATUS
Passing
DOWNLOADS
11,702
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
3 weeks ago
SIZE
28 KB
Buttons allow users to take actions, and make choices, with a single tap.
2 contributors
Use button in your project ?
Copied
npm i @bit/mui-org.material-ui.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
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
chevron_left
chevron_right
Properties
NameTypeDescription
children
node

The content of the button.

classes
object

Override or extend the styles applied to the component. See CSS API below for more details.

className
string
color
'default' | 'inherit' | 'primary' | 'secondary'

The color of the component. It supports those theme colors that make sense for this component.

component
elementType

The component used for the root node. Either a string to use a DOM element or a component.

disabled
bool

If true, the button will be disabled.

disableFocusRipple
bool

If true, the keyboard focus ripple will be disabled. disableRipple must also be true.

disableRipple
bool

If true, the ripple effect will be disabled.

⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the focusVisibleClassName.

endIcon
node

Element placed after the children.

focusVisibleClassName
string
fullWidth
bool

If true, the button will take up the full width of its container.

href
string

The URL to link to when the button is clicked. If defined, an a element will be used as the root node.

size
'small' | 'medium' | 'large'

The size of the button. small is equivalent to the dense button styling.

startIcon
node

Element placed before the children.

type
string
variant
'text' | 'outlined' | 'contained'

The variant to use.