Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/balintsoos/material-ripple

:droplet: Material Design Ripple effect with jQuery and CSS
https://github.com/balintsoos/material-ripple

design js material material-design ripple

Last synced: about 2 months ago
JSON representation

:droplet: Material Design Ripple effect with jQuery and CSS

Awesome Lists containing this project

README

        

# Material Design Ripple effect
> Material Design Ripple effect with jQuery and CSS

![what it looks like](http://i.giphy.com/Hpd2CH1wdEZfq.gif)

Check out the [live example at CodePen](http://codepen.io/balintsoos/full/YqWLOJ/)

## Installation

##### NPM
`material-ripple` is available as an [npm package](https://www.npmjs.com/package/material-ripple)

```bash
$ npm install material-ripple
```

## How to use it

You need to include the **CSS** and **JS** resources located in the `dist` folder. Don't forget to include **jQuery** as well.

````html


My Account

````

### Styling

You can change the ripple color with the `data-ripple-color` attribute:

````html


Settings

````

Or you can use CSS:

````css
.red-ripple > .material-ink {
background-color: red;
}
````

**NOTE:** Static positioned elements appear behind absolutely positioned siblings (`.material-ink` in this case)
so you should set `position: relative;` to child elements inside `.material-ripple` to bring them above `.material-ink`.

For example if you have an HTML structure like this:

````html


Dashboard

````

Make the `span` elements relatively positioned like this:

````css
.material-ripple > span {
position: relative;
}
````

## Bonus

Material Design Cards and Box Shadow by **Samuel Thornton**
[CodePen link](http://codepen.io/sdthornton/pen/wBZdXq)

You can choose from 5 different shadow level (from 1 to 5).

````html


...

````

## License

MIT © [Balint Soos](https://github.com/balintsoos)