Skip to content

Form ​

Form controls, wrappers, and validation support.

Architecture ​

zk-form                  ← <form> wrapper (CSRF, method spoofing, enctype auto-detection)
  zk-fieldset            ← <fieldset> + optional <legend>
    zk-input             ← base input — all typed inputs delegate to this
    zk-textarea          ← <textarea>
    zk-select            ← <select> with optgroup support
    zk-checkbox          ← <input type="checkbox">
    zk-switch            ← styled checkbox (delegates to zk-checkbox)
    zk-password          ← <input type="password"> with optional show/hide toggle
    zk-button            ← <button>
    zk-submit            ← <button type="submit"> (delegates to zk-button)
    zk-reset             ← <button type="reset"> (delegates to zk-button)
  zk-field               ← field wrapper (.field div + error class)
  zk-label               ← <label> with icon/prefix/suffix support
  zk-additional          ← supporting text + character counter
  zk-hidden              ← <input type="hidden"> (no field wrapper)
  zk-datalist            ← <datalist> element

Typed Input Shorthands ​

These components are thin wrappers around zk-input with type pre-set. They accept all zk-input props.

ComponentTypeNotes
colorcolor
datedate
datetimedatetime-local
emailemailAdds browser-side pattern from config
filefile
monthmonth
multi-selectx-zk-multi-select<select multiple>
numbernumber
rangerange
searchsearch
teltel
timetime
urlurl
weekweek

All Components ​

ComponentAliasDescription
additional—Supporting text and character counter
buttonx-zk-button<button> element
checkboxx-zk-checkbox<input type="checkbox">
colorx-zk-color<input type="color">
datalistx-zk-datalist<datalist> element
datex-zk-date<input type="date">
datetimex-zk-datetime<input type="datetime-local">
emailx-zk-email<input type="email">
field—Field wrapper div with error support
fieldsetx-zk-fieldset<fieldset> + legend
filex-zk-file<input type="file">
formx-zk-form<form> with CSRF and method spoofing
hiddenx-zk-hidden<input type="hidden">
inputx-zk-inputBase input — all types
label—<label> with icon/prefix/suffix
monthx-zk-month<input type="month">
numberx-zk-number<input type="number">
otpx-zk-otpOne-time code field
passwordx-zk-password<input type="password"> with toggle
radiox-zk-radio<input type="radio">
rangex-zk-range<input type="range">
rating-inputx-zk-rating-inputStars to choose a rating
resetx-zk-reset<button type="reset">
searchx-zk-search<input type="search">
selectx-zk-select<select> with optgroup support
submitx-zk-submit<button type="submit">
switchx-zk-switchStyled checkbox
telx-zk-tel<input type="tel">
textareax-zk-textarea<textarea>
timex-zk-time<input type="time">
urlx-zk-url<input type="url">
weekx-zk-week<input type="week">

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.