Label
A form-field label with an optional trailing info icon, bindable to an input.
| Prop | Type | Default | Notes |
|---|---|---|---|
text |
String | nil |
Label text. Also accepts a content block. |
info |
Boolean | false |
Show the trailing information icon. |
**html_options |
Hash | — | Extra HTML attributes — pass `for:` to bind the label to an input id, plus any `id`, `data-*`, `class`, … |
Default
1 | <%= render LabelComponent.new(text: "Label") %> |
With info
1 | <%= render LabelComponent.new(text: "Label", info: true) %> |