Package Exports
- @rmwc/button
- @rmwc/button/README.md
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rmwc/button) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Buttons
Buttons communicate the action that will occur when the user touches them.
- Module @rmwc/button
- Import styles:
- import '@material/button/dist/mdc.button.css'
- MDC Docs: https://material.io/develop/web/components/buttons/
<Button label="Button" />
<>
<Button label="Icon" icon="favorite" />
<Button label="Trailing" trailingIcon="keyboard_arrow_right" />
<Button label="Loading" icon={<CircularProgress />} />
</>
<>
<Button label="Raised" raised />
<Button label="Unelevated" unelevated />
<Button label="Outlined" outlined />
<Button label="Dense" dense />
<Button label="No Ripple" ripple={false} />
</>
<>
<Button
label="With Theme"
raised
theme={['secondaryBg', 'onSecondary']}
/>
{/**
This example uses "accent" to control the color of the Ripple.
See the documentation on Ripples.
*/}
<Button
label="With Theme"
theme="secondary"
ripple={{ accent: true }}
/>
</>
<Button>
{/** Alternatively pass content as children */}
As Children
</Button>
Button
The Button component.
Props
Name | Type | Description |
---|---|---|
children |
React.ReactNode |
Content specified as children. |
dense |
`undefined | false |
disabled |
`undefined | false |
icon |
RMWC.IconPropT |
An Icon for the Button |
label |
`React.ReactNode | any` |
outlined |
`undefined | false |
raised |
`undefined | false |
ripple |
RipplePropT |
Adds a ripple effect to the component |
trailingIcon |
RMWC.IconPropT |
A trailing icon for the Button |
unelevated |
`undefined | false |