Ripple
Angular Bootstrap 5 Ripple
The ripple method provides a radial action in the form of a visual ripple expanding outward from the user’s touch. Ripple is a visual form of feedback for touch events providing users a clear signal that an element is being touched.
Note: Read the API tab to find all available options and advanced customization
Basic example
Add mdbRipple
directive to an element to enable ripple effect.
Colors
By using rippleColor
input you can change the color of the ripple.
You can use the colors from the basic MDB palette, for example
rippleColor="primary"
or rippleColor="danger"
:
You can also use any CSS color name:
Or simply use the hex color code:
Duration
By using rippleDuration
input you can modify the duration of the ripple.
Centered
If you add [rippleCentered]="true"
input, the ripple always starts in the center
of the element instead of in the touched place.
Unbound
If you use [rippleUnbound]="true"
input, the ripple won't be bonded to the given
element and it will exceed its borders.
Radius
By using rippleRadius
input you can modify the radius of the ripple. The numeric
value is expressed in pixels, for example:
rippleRadius="10"
Ripple - API
Import
Inputs
Name | Type | Default | Description |
---|---|---|---|
rippleCentered
|
Boolean | false |
Centers the position of ripple |
rippleColor |
String | '' |
Changes color of ripple |
rippleDuration
|
String | '500ms' |
Sets duration of animation |
rippleRadius |
Number | 0 |
Sets radius value |
rippleUnbound
|
Boolean | false |
Sets whether the effect should go beyond the wrapper's boundaries |