JSFiddle - React, Tailwind, and code Playground
by artgas_pro
HTML
<div class="create-post">
<div class="container">
<form>
<div class="form-group">
<label for="post-title">Post Title</label>
<input id="post-title" type="text" name="post-title" />
</div>
<div class="form-group">
<label for="post-text">Post Text</label>
<textarea id="post-text" name="post-text"></textarea>
</div>
<div class="form-group">
<button type="submit">Add Post</button>
</div>
</form>
</div>
</div>
SCSS
.create-post {
padding-top: 25px;
.container {
max-width: 1015px;
margin: 0 auto;
}
form {
background: #262D34;
border-radius: 16px;
padding: 20px;
label {
color: #F7F7F7;
font-weight: 600;
font-size: 18px;
line-height: 26px;
margin-bottom: 10px;
}
.form-group {
margin-bottom: 20px;
input[type="text"],
textarea {
width: 100%;
background: #2C353D;
border-radius: 6px;
font-size: 14px;
line-height: 22px;
color: #858EAD;
padding: 12px;
border: none;
&:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(255, 105, 52, 0.3);
}
}
textarea {
resize: vertical;
min-height: 100px;
}
}
button {
font-weight: 500;
font-size: 14px;
line-height: 20px;
color: #FFFFFF;
padding: 12px 16px;
background: #FF6934;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 6px;
cursor: pointer;
&:hover {
background: darken(#FF571A, 10%);
}
}
}
}