Ripple component adds ripple effect to the host element.
import PrimeReact from 'primereact/api';
import { Ripple } from 'primereact/ripple';
<script src="https://unpkg.com/primereact/core/core.min.js"></script>
Ripple effect is an optional animation for the supported components such as buttons. It is disabled by default and needs to be enabled at your app's main container (e.g. App.js) using the PrimeReact class.
PrimeReact.ripple = true;
Note: That would be it to enable ripple on PrimeReact components, next section describes how to use it with your own components and standard elements.
Ripple is a component that needs to be imported and activated using PrimeReact.ripple = true
import { Ripple } from 'primereact/ripple';
<div className="p-ripple">
<Ripple />
</div>
Default styling of the animation adds a shade of white. This can easily be customized using css that changes the color of .p-ink element.
<div className="p-ripple purple">
<Ripple />
</div>
.p-ripple.purple .p-ink {
background: rgba(256,39,176,.3);
}
Name | Element |
---|---|
p-ripple | Host element. |
p-ink | Ripple element. |
p-ink-active | Ripple element during animating. |
This section is under development. After the necessary tests and improvements are made, it will be shared with the users as soon as possible.
None.
Built-in component themes created by the PrimeReact Theme Designer.
Premium themes are only available exclusively for PrimeReact Theme Designer subscribers and therefore not included in PrimeReact core.
Beautifully crafted premium create-react-app application templates by the PrimeTek design team.