JSFiddle - React, Tailwind, and code Playground
by Alexandru Gatea
HTML
<button id="toggler">open modal</button>
<div class="share-modal-container opened" id="modal">
<div class="share-modal">
<div class="share-modal-title">Generate url to share with friends</div>
<div class="share-modal-regions">
<div class="share-modal-group-title">
<span>Select regions<br>
<span class="title-description">You can choose up to 3 different areas</span></span>
<span class="share-modal-region-count">
<span class="count-current">1</span> / 3
</span>
</div>
<div class="share-modal-regions-grid">
<div class="share-modal-region added">
<div class="share-modal-region-description">Custom region nearby</div>
<div class="share-modal-region-location" title="insert the location here as well as if it won't fit the space from its container, it will show up on mouse:hover">Paris, France</div>
<div class="share-modal-region-remove"><svg class="close-icon" xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24"><g data-name="Layer 2"><g data-name="close"><rect width="24" height="24" transform="rotate(180 12 12)" opacity="0"/><path d="M13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29-4.3 4.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4.29-4.3 4.29 4.3a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42z"/></g></g></svg></div>
</div>
<!-- <div class="share-modal-region add-new">
<button class="share-modal-add-region">Select new region</button>
<span class="alt">or</span>
<input type="text" class="custom-area-input" placeholder="Type an area">
</div> -->
<div class="share-modal-region empty">Select new region</div>
</div>
</div>
<div class="share-modal-filters">
<div class="share-modal-group-title">
<span>Select filters <span class="title-description">Limit what filters the users can use</span></span>
</div>
<div...
SCSS
* {
margin: 0;
box-sizing: border-box;
}
body {
background: #444;
}
#toggler {
width: 150px;
height: 40px;
cursor: pointer;
}
@import url('https://fonts.googleapis.com/css2?family=Lato&family=Raleway:wght@400;500;600;700;900&display=swap');
$brand-dark: #0e0727;
$brand-dark-medium: #221c3a;
$brand-light: #a59fb8;
$brand-accent: #42B98B;
$animation: cubic-bezier(.71, -0.26, .29, 1.27);
$brand-title: 'Raleway',
sans-serif;
$brand-text: 'Lato',
sans-serif;
::selection {
background: $brand-light;
color: $brand-dark;
}
.share-modal-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.25s ease-in;
background: rgba(#1f1f1f, 0.0);
opacity: 0;
pointer-events: none;
color: #fff;
letter-spacing: 0.7px;
.share-modal {
width: 90%;
max-width: 500px;
min-height: 400px;
background: $brand-dark;
border-radius: 20px;
box-shadow: 3px 5px 15px 0px rgba(0, 0, 0, 0.5);
padding: 50px;
transform: scale(0.8);
opacity: 0;
transition-delay: 0.15s;
transition: all 0.45s $animation;
position: relative;
font-family: $brand-text;
color: $brand-light;
}
.share-modal-title {
text-transform: uppercase;
color: #fff;
font-family: $brand-title;
font-weight: 700;
font-size: 22px;
letter-spacing: 1px;
text-align: center;
margin-bottom: 50px;
}
.share-modal-group-title {
display: flex;
align-items: flex-end;
justify-content: space-between;
font-family: $brand-title;
font-weight: 700;
text-transform: uppercase;
font-size: 16px;
margin-bottom: 25px;
color: #fff;
.title-description {
text-transform: initial;
font-weight: 400;
color: $brand-light;
font-size: 12px;
vertical-align: bottom;
font-style: italic;
margin: 5px 10px;
}
.share-modal-region-count {
color: $brand-light;
font-family:...