JSPM

@rmwc/button

5.0.4-alpha.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17738
  • Score
    100M100P100Q139304F
  • License MIT

RMWC Button component

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.

import { Button, ButtonIcon } from '@rmwc/button';
import { CircularProgress } from '@rmwc/circular-progress';

<Button label="Default" />
<Button
  label="With Icon"
  icon="favorite"
/>
<Button
  label="Raised"
  raised
/>
<Button
  label="Dense"
  dense
/>
<Button
  label="Unelevated"
  unelevated
/>
<Button
  label="Outlined"
  outlined
/>
<Button
  label="With Theme"
  raised
  theme={['secondaryBg', 'onSecondary']}
/>


{/*
  Modify the Buttons Ripple.
  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
  label="No Ripple"
  ripple={false}
/>
<Button
  label="Loading"
  icon={<CircularProgress />}
/>

{/*
  Alternatively pass content as children
*/}
<Button><ButtonIcon icon="star" /> As Children</Button>
import { Docs } from '@rmwc/base/utils/document-component';
import * as docs from './docgen.json';

<Docs src={docs} components={['Button', 'ButtonIcon']} />