テキストフィールド
ラベル、ヒントテキスト、エラー状態を備えた汎用テキスト入力コンポーネント。 フォームビルダーモード(Railsフォームオブジェクト利用)とスタンドアロンの両方に対応しています。 サイズ、必須/無効状態、フォームオブジェクトからの自動エラー検出を含みます。
プレビュー & コード
_text_field.html.erb
███
████ █████ █████████ █████████
█████ ████ ████ ████████
███ █████████ ██████ █████ ██ ███ ██
███ ██████ ████████████████████████ █████ ██ ██████████ ███████ █████ ██████ █████ █████ ████ ██████ ██
██ ███ ██
██████████ ██████
███ ██████ ████████████████████████ █████ █████████ ████████████ ███████████ ██
text_field_component.html.erb
████ ███████████████
██ ██ ███████████████ ██
██████ ████████ ████████ ███ ██████████ █████████████ ████
███ ██████ ██
██ ██ █████████ ██
█████ ███████████████████ ████████████████
██ ███ ██
████████
██ ███ ██
text_field_component.rb
█ ██████████████████████ ████
█████ ██████████████████ █ ███████████████████
█████ █ █████ ██ ██████████
███████████ █ ███████ █████ ████████ ███ ███ ██████ ██████████████
███████████ ██████ ███████████ ██████ ███████ ███████ ██████ ██████
█████████████ ██████████ ██████████ ██████ ██████
███ ███████████
変更履歴
- Initial release with form builder and standalone modes
- Three size options: sm, md (default), lg
- Automatic error detection from Rails form objects
- Dark mode support