Function ripple
- ripple(opts?): Action
Parameters
Optional
opts: {
background?: string;
contextmenu?: boolean;
debounce?: number;
duration?: number;
events?: Iterable<string, any, any>;
keyCode?: string;
}Optional parameters.
Optional
background?: stringA valid CSS background attribute.
Optional
contextmenu?: booleanAdd triggering for context menu key and click.
Optional
debounce?: numberAdd a debounce to incoming events in milliseconds.
Optional
duration?: numberDuration in milliseconds.
Optional
events?: Iterable<string, any, any>DOM event to bind element to respond with the ripple effect.
Optional
keyCode ?: stringKey code to trigger for any applicable key events.
Returns Action
Actual action.
Defines the classic Material Design ripple effect as an action.
ripple
is a wrapper around the returned action. This allows it to be easily used as a prop.Note: A negative one translateZ transform is applied to the added spans allowing other content to be layered on top with a positive translateZ.
Note: The ripple effect requires the
efx
element to have overflow hidden. This is set inline when the effect is applied.Note: A CustomEvent
efx-trigger
is handled in cases when explicit triggering is necessary. This event should have the actual source event as a property ofdetail
.Styling: There is a single CSS variable
--tjs-action-ripple-background
that can be set to control the background.