Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Components/Buttons/Floating-Action-Button/assets/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Components/Buttons/Floating-Action-Button/assets/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions Components/Buttons/Floating-Action-Button/assets/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions Components/Buttons/Floating-Action-Button/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Floating Action Button</title>
</head>

<body>
<div class="ab">
<img class="plus" src="assets/plus.svg">
<hr>
<img class="c" src="assets/share.svg">
<img class="a" src="assets/download.svg">
<img class="b" src="assets/pencil-square.svg">
</div>

<script src="script.js"></script>
</body>

</html>
4 changes: 4 additions & 0 deletions Components/Buttons/Floating-Action-Button/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const ab = document.querySelector('.ab');
ab.addEventListener('click', () => {
ab.classList.toggle('active');
})
52 changes: 52 additions & 0 deletions Components/Buttons/Floating-Action-Button/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
* {
box-sizing: border-box;
padding: 0px;
margin: 0px;
}

.ab {
height: 72px;
width: 72px;
background-color: #e8e2f6;
display: flex;
flex-direction: column;
padding: 24px;
gap: 24px;
border-radius: 18px;
border: 0.5px solid;
overflow: hidden;
transition: height 300ms;
}

.ab.active {
height: 246px;
}

.plus {
transition: transform 200ms;
}

.ab.active .plus {
transform: rotate(45deg);
}

.item {
display: none;
}

.ab.active .item {
display: inline;
}

html,
body {
height: 100%;
margin: 0;
}

body {
display: flex;
justify-content: center;
align-items: center;
background: #f9f9f9;
}
5 changes: 5 additions & 0 deletions assets/json_files/buttons.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
"previewLink": "../../Components/Buttons/Flipside-Button/index.html",
"sourceLink": "https://github.com/Rakesh9100/Beautiify/tree/main/Components/Buttons/Flipside-Button"
},
{
"title": "Floating Action Button",
"previewLink": "../../Components/Buttons/Floating-Action-Button/index.html",
"sourceLink": "https://github.com/Rakesh9100/Beautiify/tree/main/Components/Buttons/Floating-Action-Button"
},
{
"title": "Flower Effect Button",
"previewLink": "../../Components/Buttons/Flower-Effect-Button/index.html",
Expand Down