Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
<div class="form-field-wrapper">
<label for="weight" class="block font-medium text-gray-700 mb-1 text-sm">
Weight
</label>
<div class="relative flex items-center">
<input name="weight" placeholder="0" class="block w-full rounded-md border shadow-sm transition-colors duration-200 text-base py-2 px-4 border-gray-300 bg-white text-gray-900 placeholder-gray-400 focus:border-primary-500 focus:ring-2 focus:ring-primary-500 focus:ring-opacity-20 focus:outline-none pr-10" type="number" min="0" step="0.1" />
<div class="absolute inset-y-0 flex items-center pointer-events-none px-4 right-0">
<span class="text-gray-500 text-sm font-medium">kg</span>
</div>
</div>
</div>
1
2
3
4
5
6
7
8
9
10
11
render BetterUi::Forms::NumberInputComponent.new(
name: "weight",
label: "Weight",
placeholder: "0",
min: 0,
step: 0.1
) do |component|
component.with_suffix_icon do
'<span class="text-gray-500 text-sm font-medium">kg</span>'.html_safe
end
end