66 lines
1.2 KiB
HTML
66 lines
1.2 KiB
HTML
---
|
|
id:
|
|
type: 'string'
|
|
type:
|
|
type: 'string'
|
|
default: 'text'
|
|
class:
|
|
type: 'string'
|
|
default: ''
|
|
aria_label:
|
|
type: 'string'
|
|
default: ''
|
|
name:
|
|
type: 'string'
|
|
default: ''
|
|
placeholder:
|
|
type: 'string'
|
|
default: ''
|
|
list:
|
|
type: 'string'
|
|
default: ''
|
|
required:
|
|
type: 'bool'
|
|
default: false
|
|
autofocus:
|
|
type: 'bool'
|
|
default: false
|
|
minlength:
|
|
type: 'integer'
|
|
default: 0
|
|
maxlength:
|
|
type: 'integer'
|
|
default: 1024
|
|
attributes:
|
|
type: 'string'
|
|
default: ''
|
|
---
|
|
<input
|
|
id="{{ id | escape_once }}"
|
|
type="{{ type | escape_once }}"
|
|
{% unless class == empty %}
|
|
class="{{ class | escape_once }}"
|
|
{% endunless %}
|
|
{% unless aria_label == empty %}
|
|
aria-label="{{ aria_label | escape_once }}"
|
|
{% endunless %}
|
|
{% unless placeholder == empty %}
|
|
placeholder="{{ placeholder | escape_once }}"
|
|
{% endunless %}
|
|
{% unless list == empty %}
|
|
list="{{ list | escape_once }}"
|
|
{% endunless %}
|
|
{% if required %}
|
|
required
|
|
{% endif %}
|
|
{% if autofocus %}
|
|
autofocus
|
|
{% endif %}
|
|
{%- if minlength != 0 -%}
|
|
minlength="{{minlength}}"
|
|
{%- endif -%}
|
|
maxlength="{{maxlength}}"
|
|
name="{{ name | default: id | escape_once}}"
|
|
{{ attributes }}
|
|
>
|