<div class="flex flex-col gap-2 items-start">
{% if label %}
<div>
<label for="{{ id }}" class="leading-5">
{{ label }}
</label>
{% if is_required %}
<span class="text-red-600">*</span>
{% endif %}
</div>
{% endif %}
<div class="flex flex-col gap-1">
{% for option in options %}
<div class="flex gap-3">
<input type="radio" id="{{ option.id }}" name="{{ id }}" value="{{ option.text }}">
<label for="{{ option.id }}">{{ option.text }}</label>
</div>
{% endfor %}
</div>
</div>
context:
label: 'Radio boxĂk'
options:
-
id: 'option-1'
text: 'Option 1'
-
id: 'option-2'
text: 'Option 2'
-
id: 'option-3'
text: 'Option 3'
classes: ''
id: 'radio_1'
is_required: true