フォーム v1.0.0

チェックボックスグループ

リストから複数のオプションを選択するためのチェックボックス入力グループ。 フォームビルダーモード(Railsフォームオブジェクト利用)とスタンドアロンの両方に対応しています。 各オプションに説明を付けたり、縦横のレイアウトを選択できます。

プレビュー & コード

オプション

名前 デフォルト 説明
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, will append [] for array)
options * Array 必須 Array of options - can be strings, [label, value] pairs, or hashes with :label, :value, and optional :description keys
selected Array [] Array of currently selected values (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 at least one 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

変更履歴 v1.0.0

- Initial release with form builder and standalone modes
- Vertical and horizontal layout options
- Support for option descriptions
- Multi-select with array values
- Automatic error detection from Rails form objects
- Dark mode support

フルアクセスを取得

このコンポーネントと他のすべてのソースコードをアンロックしましょう。一回のお支払いで永久アクセス。

今すぐアクセスを取得