-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee0d066
commit 6509515
Showing
1 changed file
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,33 @@ | ||
# breathing-button | ||
<h1 align="center">Breathing button</h1> | ||
|
||
 | ||
|
||
## 1. Info | ||
I saw similar button on my friends flutter app and decided to try and recreate it in HTML, JS and CSS. There are still some fixes left to do. | ||
|
||
Animation made by Luboš Volkov, you can check it out [here](https://dribbble.com/shots/4653793-Empty-State-Animation) | ||
|
||
Click [here](https://codepen.io/pawelkaczoruk/pen/MWYBRZm) to see example code and test it. | ||
|
||
## 2. How to use: | ||
* Add a class of ***breathing-button*** to a button | ||
* You can go with default style or set your own styles by assigning values to a data attributes: | ||
* ***data-bb-size*** - sets height and width of button | ||
* ***data-bb-duration*** - sets breathe animation duration | ||
* ***data-bb-background*** - sets colors (or colors) for background linear gradient (you can set one or two colors, if you want to set two colors don't forget to separate them with **semicolon**) | ||
* ***data-bb-cross*** - sets color of a cross | ||
* ***data-bb-shadow*** - sets color of a shadow | ||
|
||
### Example code: | ||
|
||
<button | ||
class="breathing-button" | ||
data-bb-size="160px" | ||
data-bb-duration="4s" | ||
data-bb-background="#1e6262; #2d76f7" | ||
data-bb-cross="#ecfffb" | ||
data-bb-shadow="rgba(24, 35, 54, 0.2)"> | ||
</button> | ||
|
||
### Result: | ||
 |