{# Showcase - Forms & Interaction Demonstrates all form and interactive macros available in APEP. #} {% set required_keys = [] %} {% set dropdown_options = [ {"label": "Option A", "value": "a"}, {"label": "Option B", "value": "b"}, {"label": "Option C", "value": "c"} ] %} {% set checkbox_options = [ {"label": "Option 1", "value": "1", "checked": true}, {"label": "Option 2", "value": "2"}, {"label": "Option 3", "value": "3"} ] %} {% set radio_options = [ {"label": "Yes", "value": "yes", "checked": true}, {"label": "No", "value": "no"}, {"label": "Maybe", "value": "maybe"} ] %}

Showcase - Forms & Interaction

{# ---- Buttons ---------------------------------------------------- #}

Buttons - Variants

{{ apep.macros.btn(label="Primary", variant="primary") }} {{ apep.macros.btn(label="Secondary", variant="secondary") }} {{ apep.macros.btn(label="Ghost", variant="ghost") }} {{ apep.macros.btn(label="Danger", variant="danger") }}

Buttons - Sizes

{{ apep.macros.btn(label="Small", variant="primary", size="sm") }} {{ apep.macros.btn(label="Medium", variant="primary", size="md") }} {{ apep.macros.btn(label="Large", variant="primary", size="lg") }}

Buttons - States

{{ apep.macros.btn(label="Disabled", variant="primary", disabled=true) }} {{ apep.macros.btn(label="As Link", variant="secondary", url="/contact") }}

{# ---- Hero Button ------------------------------------------------ #}

Hero Button - Variants

{{ apep.macros.hero_btn(label="Primary CTA", url="/contact", subtitle="Free & non-binding", variant="primary") }} {{ apep.macros.hero_btn(label="Secondary CTA", url="/about_us", variant="secondary") }}

{# ---- Download Button -------------------------------------------- #}

Download Button - Variants

{{ apep.macros.download_btn(label="Default", file_path="example.pdf", variant="default") }} {{ apep.macros.download_btn(label="Icon", file_path="example.pdf", variant="icon") }} {{ apep.macros.download_btn(label="Minimal", file_path="example.pdf", variant="minimal") }}

{# ---- Inputs ----------------------------------------------------- #}

Input - Types

{{ apep.macros.input(name="s_text", label="Text", type="text", placeholder="Free text...") }} {{ apep.macros.input(name="s_email", label="Email", type="email", required=true, hint="Your business email address") }} {{ apep.macros.input(name="s_password", label="Password", type="password") }}

Input - Validation & Hints

{{ apep.macros.input(name="s_text_req", label="Required Field", type="text", required=true, placeholder="Cannot be empty") }} {{ apep.macros.input(name="s_text_hint", label="With Hint", type="text", hint="This is a helper text below the input") }} {{ apep.macros.input(name="s_text_chars", label="Only Letters a-z", type="text", allowed_chars=["a-z"]) }}

{# ---- Dropdown --------------------------------------------------- #}

Dropdown

{{ apep.macros.dropdown(name="s_dropdown", label="Default", options=dropdown_options) }}
{{ apep.macros.dropdown(name="s_dropdown_pre", label="Pre-selected", options=dropdown_options, selected="b") }}
{{ apep.macros.dropdown(name="s_dropdown_req", label="Required", options=dropdown_options, required=true) }}

{# ---- Checkbox & Radio ------------------------------------------- #}

Checkbox

{{ apep.macros.checkbox(name="s_checkbox", options=checkbox_options) }}

Checkbox - With Hidden Input

{{ apep.macros.checkbox(name="s_checkbox_sync", options=checkbox_options, hidden_name="s_checkbox_sync_value") }}

Radio

{{ apep.macros.radio(name="s_radio", options=radio_options) }}

Radio - Pre-selected Override

{{ apep.macros.radio(name="s_radio_pre", options=radio_options, selected="maybe") }}

{# ---- Date Picker ------------------------------------------------ #}

Date Picker

Full keyboard support: arrow keys & WASD to navigate days, Enter to select, Escape to close.

Default

{{ apep.macros.date_picker(name="s_date") }}

With Min/Max & Value

{{ apep.macros.date_picker(name="s_date_range", min_date="2024.01.01", max_date="2025.12.31", value="2025.06.15") }}

{# ---- Theme & Language ------------------------------------------- #}

Theme Switch - Variants

Icon

{{ apep.macros.theme_switch(variant="icon") }}

Slider

{{ apep.macros.theme_switch(variant="slider") }}

Floating (fixed bottom-right)

{{ apep.macros.theme_switch(variant="floating") }}

Language Switch

{{ apep.macros.lang_switch(current_lang="de") }}