<div class="container-main">
<div class="content-wrapping">
<div class="panel-left">
<div class="question-header">
<svg class="icon-style" width="16" height="2" viewBox="0 0 16 2" fill="none" xmlns="http://www.w3.org/2000/svg">
<line y1="1" x2="16" y2="1" stroke="white" stroke-opacity="0.3" stroke-width="2" />
</svg>
Question 1 / 5
</div>
<div class="question-text">
What is the capital of France?
</div>
<div class="dropdown-label">
Select one option
</div>
</div>
<div class="panel-right">
<div class="input-area">
<div class="parent-container">
<div class="radio-container">
<div class="radio-option-wrapper">
<input type="radio" id="radio-Paris" name="radio-group" value="Paris" class="radio-input" />
<label for="radio-Paris" class="radio-label">
<div class="radio-circle" data-value="Paris"></div>
Paris
</label>
</div>
<div class="radio-option-wrapper">
<input type="radio" id="radio-Berlin" name="radio-group" value="Berlin" class="radio-input" />
<label for="radio-Berlin" class="radio-label">
<div class="radio-circle" data-value="Berlin"></div>
Berlin
</label>
</div>
<div class="radio-option-wrapper">
<input type="radio" id="radio-Madrid" name="radio-group" value="Madrid" class="radio-input" />
<label for="radio-Madrid" class="radio-label">
<div class="radio-circle" data-value="Madrid"></div>
Madrid
</label>
</div>
<div class="radio-option-wrapper">
<input type="radio" id="radio-London" name="radio-group" value="London" class="radio-input" />
<label for="radio-London" class="radio-label">
<div class="radio-circle" data-value="London"></div>
London
</label>
</div>
</div>
</div>
<a class="cta cta--dropdown " id="dropdown-Next" tabindex="0">Next</a>
</div>
</div>
</div>
<img src="/assets/example-content/background.svg" alt="Background Image" class="background-image">
<img src="/assets/example-content/mobilebackground.svg" alt="Background Image" class="bg-image-mobile">
</div>
No notes defined.
{
"questionNumber": "Question 1 / 5",
"question": "What is the capital of France?",
"dropdownLabel": "Select one option",
"nextButtonText": "Next",
"nextButtonDisabledStyle": "cursor: default; opacity: 0.6;",
"nextButtonDisabled": true,
"backgroundImage": "/assets/example-content/background.svg",
"mobilebackgroundimage": "/assets/example-content/mobilebackground.svg",
"iconPath": "/assets/example-content/code.svg",
"Next-cta": {
"copy": "Next",
"modifier": "dropdown",
"id": "dropdown-Next",
"href": "",
"additionalClass": ""
}
}
/* stylelint-disable */
document.addEventListener('DOMContentLoaded', () => {
const parentContainer = document.querySelector('.parent-container');
const radioContainer = document.querySelector('.radio-container');
function updateMask() {
if (
parentContainer &&
radioContainer &&
radioContainer.scrollHeight > radioContainer.clientHeight
) {
parentContainer.style.maskImage =
'linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%)';
} else if (parentContainer) {
parentContainer.style.maskImage = 'none';
}
}
updateMask();
window.addEventListener('resize', updateMask);
});
/* stylelint-disable */
.container-main {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
position: relative;
overflow: hidden;
}
.parent-container {
width: 100%;
mask-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 1) 0%,
rgba(0, 0, 0, 1) 65%,
rgba(0, 0, 0, 0) 100%
);
margin-bottom: 24px;
}
.content-wrapping {
display: flex;
justify-content: space-between;
align-items: flex-start;
width: 80%;
position: absolute;
z-index: 10;
}
.background-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
z-index: -1;
}
.bg-image-mobile {
display: none;
}
.panel-left {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
text-align: left;
color: #ffffff;
align-self: center;
width: 50%;
}
.question-header {
font-family: 'FS Dillon';
font-size: 15px;
font-weight: 700;
line-height: 20px;
color: #aebde6;
margin-bottom: 2%;
display: flex;
align-items: center;
gap: 8px;
}
.icon-style {
position: absolute;
left: -30px;
width: 20px;
height: 20px;
object-fit: contain;
}
.question-text {
font-family: 'FS Dillon';
font-size: 47.4px;
font-weight: 700;
color: white;
line-height: 52px;
}
.dropdown-label {
font-family: 'FS Dillon';
font-weight: 400;
color: #aebde6;
margin-top: 3%;
}
.panel-right {
display: flex;
flex-direction: column;
justify-content: flex-start;
width: 35%;
align-self: center;
}
.input-area {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.radio-container {
max-height: 430px;
flex-grow: 1;
overflow-y: auto;
padding-right: 2%;
width: 100%;
}
.radio-container::-webkit-scrollbar {
width: 3px;
padding-left: 20px;
}
.radio-container::-webkit-scrollbar-thumb {
background: #aebde6;
cursor: pointer;
}
.radio-container::-webkit-scrollbar-track {
-webkit-border-radius: 1rem;
border-radius: 1rem;
}
.radio-option-wrapper {
width: 100%;
height: 50px;
display: flex;
align-items: center;
gap: 10px;
border-radius: 4px;
border: 2px solid #aebde6;
padding: 0 12px;
box-sizing: border-box;
margin-bottom: 12px;
}
.radio-option {
display: flex;
align-items: center;
gap: 12px;
cursor: pointer;
}
.radio-circle {
width: 24px;
height: 24px;
border: 2px solid #AAB0C0;
border-radius: 50%;
background-color: transparent;
position: relative;
display: flex;
justify-content: center;
align-items: center;
transition: background-color 0.3s ease, border-color 0.3s ease;
padding: 3px;
}
.radio-label {
font-family: 'FS Dillon';
font-size: 20px;
font-weight: 400;
color: #ffffff;
}
.submit-button {
width: 341px;
height: 50px;
margin-left: -2%;
padding: 0 16px;
gap: 10px;
border-radius: 4px;
background-color: #dd221a;
border: none;
outline: none;
box-shadow: none;
}
.next-button {
font-family: 'FS Dillon';
font-size: 16px;
color: white;
}
@media (max-width: 709px) {
.dropdown-label{
font-size: 18px;
padding-bottom: 2rem;
line-height: 36px;
}
.content-wrapping {
flex-direction: column;
align-items: flex-start;
width: 90%;
}
.panel-right,
.panel-left {
width: 100%;
text-align: left;
}
.question-text {
font-size: 31.1px;
text-align: left;
line-height: 40px;
}
.question-header {
font-size: 11.26px;
line-height: 16px;
text-align: left;
color:#E9EBF1;
}
.radio-container {
width: 100%;
font-size: 18px;
line-height: 36px;
padding-bottom: 2rem;
}
.radio-option-wrapper {
width: 100%;
margin-bottom: 12px;
}
.radio-label {
font-size: 16px;
text-align: left;
}
.submit-button {
width: 100%;
text-align: left;
}
.icon-style{
display: none;
}
.radio-container {
overflow-y: scroll;
scrollbar-width: none;
}
.radio-container::-webkit-scrollbar {
display: none;
}
.bg-image-mobile {
display: block;
width: 100%;
height: auto;
}
}
@media (min-width: 710px) and (max-width: 1023px) {
.content-wrapping {
flex-direction: row;
align-items: center;
gap: 3rem;
}
.dropdown-label{
font-size: 24px;
}
.panel-left,
.panel-right {
width: 50%;
}
.question-text {
font-size: 40px;
}
.question-header {
font-size: 14px;
}
.radio-container {
font-size: 18px;
}
.radio-option-wrapper {
width: 100%;
}
.radio-label {
font-size: 18px;
}
.submit-button {
font-size: 15px;
}
}
@media (min-width: 1024px) {
.question-text {
font-size: 47.4px;
width: 70%;
}
.dropdown-label{
font-size: 26.7px;
}
.question-header {
font-size: 15px;
line-height: 20px;
}
.radio-option-wrapper {
width: 100%;
height: 50px;
}
.radio-label {
font-size: 20px;
}
.submit-button {
font-size: 16px;
}
.bg-image-mobile {
display: none;
}
}
<div class="container-main">
<div class="content-wrapping">
<div class="panel-left">
<div class="question-header">
<svg class="icon-style" width="16" height="2" viewBox="0 0 16 2" fill="none" xmlns="http://www.w3.org/2000/svg">
<line y1="1" x2="16" y2="1" stroke="white" stroke-opacity="0.3" stroke-width="2"/>
</svg>
{{questionNumber}}
</div>
<div class="question-text">
{{question}}
</div>
<div class="dropdown-label">
{{dropdownLabel}}
</div>
</div>
<div class="panel-right">
<div class="input-area">
<div class="parent-container">
{{render '@radio-container'}}
</div>
{{render '@cta' Next-cta merge="true" id="nextButton" disabled="true"}}
</div>
</div>
</div>
<img src="{{backgroundImage}}" alt="Background Image" class="background-image">
<img src="{{mobilebackgroundimage}}" alt="Background Image" class="bg-image-mobile">
</div>