
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@material/react-ripple
Advanced tools
A React version of an MDC Ripple.
npm install @material/react-ripple
with Sass:
import '@material/react-ripple/index.scss';
with CSS:
import '@material/react-ripple/dist/ripple.css';
To wrap a component with the ripple HOC, please follow this example:
import withRipple from '@material/react-ripple';
const Icon = (props) => {
const {
children,
className = '',
// call `initRipple` from the root element's ref. This attaches the ripple
// to the element.
initRipple,
// include `unbounded` to remove warnings when passing `otherProps` to the
// root element.
unbounded,
...otherProps
} = props;
// any classes needed on your component needs to be merged with
// `className` passed from `props`.
const classes = `ripple-icon-component ${className}`;
return (
<div
className={classes}
ref={initRipple}
{...otherProps}>
{children}
</div>
);
};
const RippleIcon = withRipple(Icon);
Wrap your Icon component with the HOC withRipple, which returns a component
with a ripple capable surface.
| Prop Name | Type | Description |
|---|---|---|
| unbounded | boolean | Ripple is unbounded if true. |
| disabled | n/a | Disables ripple if true. |
| style | object | Inline styles of root element. |
| className | string | Classes to appear on className attribute of root element. |
Sass mixins may be available to customize various aspects of the components. Please refer to the MDC Web repository for more information on what mixins are available, and how to use them.
FAQs
Material Components React Ripple
We found that @material/react-ripple demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.