Formulários v1.0.0

Grupo de rádio

Um grupo de botões de rádio para selecionar uma única opção entre múltiplas alternativas. Suporta tanto o modo form builder (com objetos de formulário Rails) quanto uso independente. As opções podem incluir descrições e ser dispostas vertical ou horizontalmente.

Pré-visualização e Código

Opções

Nome Tipo Padrão Descrição
form FormBuilder nil Rails form builder object (for form builder mode)
attribute Symbol nil Model attribute name (for form builder mode)
name String nil Input name attribute (for standalone mode)
options * Array obrigatório Array of options - can be strings, [label, value] pairs, or hashes with :label, :value, and optional :description keys
selected String nil Currently selected value (for standalone mode, auto-detected in form mode)
label String nil Group label text
hint String nil Help text displayed below the group label
layout Symbol :vertical Layout direction: :vertical or :horizontal
required Boolean false Whether a selection is required
disabled Boolean false Whether the entire group is disabled
error String nil Manual error message (auto-detected from form object if not provided)
class String "" Additional CSS classes for the container

Changelog v1.0.0

- Initial release with form builder and standalone modes
- Vertical and horizontal layout options
- Support for option descriptions
- Automatic error detection from Rails form objects
- 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