{{define "formtabler_colorinput"}}
<div class="mb-3">
  <label class="form-label">{{defaultVal "Color Input" .Label}}</label>
  <div class="row g-2">
    {{range .Colors}}
    <div class="col-auto">
      <label class="form-colorinput{{if eq .Color "white"}} form-colorinput-light{{end}}">
        <input name="{{$.Name}}" type="{{$.Type}}" value="{{.Color}}" class="form-colorinput-input"{{if .Checked}} checked{{end}}>
        <span class="form-colorinput-color bg-{{.Color}}"></span>
      </label>
    </div>
    {{end}}
  </div>
</div>
{{end}}
