Formulários v1.0.0

Campo numérico

Campo numérico com botões de incremento/decremento, restrições mín/máx e tamanho do passo. Oferece uma experiência de usuário melhor que campos numéricos nativos com estilo consistente entre navegadores. Suporta texto de prefixo/sufixo, múltiplos tamanhos, estados de erro e repetição ao manter pressionado os botões.

Pré-visualização e Código

Opções

Nome Tipo Padrão Descrição
value Integer/Float nil Initial numeric value
min Integer/Float nil Minimum allowed value
max Integer/Float nil Maximum allowed value
step Integer/Float 1 Increment/decrement step size
label String nil Label text displayed above the input
hint String nil Hint text displayed below the input
size Symbol :md Input size: :sm, :md, or :lg
prefix String nil Prefix text displayed inside the input (e.g. "$")
suffix String nil Suffix text displayed inside the input (e.g. "kg")
disabled Boolean false Whether the input is disabled
error String nil Error message — turns the border red and displays below the input
name String nil Form field name attribute
placeholder String nil Placeholder text shown when empty

Changelog v1.0.0

- v1.0.0: Initial release with increment/decrement buttons, min/max/step support
- Hold-to-repeat on increment/decrement buttons (400ms delay, 75ms repeat)
- Keyboard arrow-key support (ArrowUp/ArrowDown)
- Prefix/suffix text, multiple sizes, error states, and disabled state
- Full dark mode support

Obter Acesso Completo

Desbloqueie o código-fonte deste componente e de todos os outros. Pagamento único para acesso vitalício.

Obter Acesso Agora