Socket
Socket
Sign inDemoInstall

@rmwc/button

Package Overview
Dependencies
29
Maintainers
1
Versions
166
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @rmwc/button

Buttons communicate the action that will occur when the user touches them.


Version published
Weekly downloads
6.4K
increased by10.43%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Buttons

Buttons communicate the action that will occur when the user touches them.

  • Module @rmwc/button
  • Import styles:
    • Using CSS Loader
      • import '@rmwc/button/styles';
    • Or include stylesheets
      • '@material/button/dist/mdc.button.css'
      • '@rmwc/@rmwc/icon/icon.css'
      • '@material/ripple/dist/mdc.ripple.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="Danger" danger raised />
  <Button label="Danger" danger outlined />
  <Button label="Danger" danger />
</>
<>
  <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" />
</>
<Button>
  {/** Alternatively pass content as children */}
  As Children
</Button>
<>
  {/** Wrapping a button in TouchTargetWrapper will automatically set its `touch` prop to true. */}
  <TouchTargetWrapper>
    <Button>Touch Accessible</Button>
  </TouchTargetWrapper>
</>

Button

The Button component.

Props

NameTypeDescription
childrenReactNodeContent specified as children.
dangerbooleanUsed to indicate a dangerous action.
densebooleanMake the Button dense.
disabledbooleanMake the button disabled
iconIconPropTAn Icon for the Button
labelanyContent specified as a label prop.
outlinedbooleanMake the button outlined.
raisedbooleanMake the Button raised.
rippleRipplePropTAdds a ripple effect to the component
touchbooleanMakes the button more touch friendly. This will automatically be set true if used inside of TouchTargetWrapper.
trailingIconIconPropTA trailing icon for the Button
unelevatedbooleanMake the button unelevated.

Keywords

FAQs

Last updated on 24 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc