フォーム 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)
value String "1" Value when checked
checked Boolean false Whether the checkbox is initially checked
label String nil Label text (auto-generated from attribute if not provided)
description String nil Additional description text below the label
required Boolean false Whether the field is required
disabled Boolean false Whether the field is disabled
error String nil Manual error message (auto-detected from form object if not provided)
class String "" Additional CSS classes for the checkbox

変更履歴 v1.0.0

- Initial release with form builder and standalone modes
- Support for description text
- Automatic error detection from Rails form objects
- Dark mode support

フルアクセスを取得

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

今すぐアクセスを取得