# [Usage](../../../usage.md) > [Components and standard attributes](../basics.md) > label

---

`label` | `->setLabel()`

Will set the label for the component.
- In `Form` components it will be displayed on top of the field
- In `Visual` components it is the label of the component itself, but will be overrided by `name` if set

| Types    | Default |
|----------|---------|
| `string` | `null`  |

Human-readable caption: on Form fields it renders above the input, on Visuals it is the component title / text. When omitted (`null`) no label shows (Visuals may fall back to `name` if set). Accepts Closures for dynamic labels.
Keep labels short; details belong in `hint` or `placeholder`.

### Example
Blade:
```php
{!! \KFramework\Components\Forms\Input::make()->setName('email')->setLabel('E-mail address') !!}
```
Controller:
```php
Input::make('email')->setLabel('E-mail address');
```

### Interaction / tips
- `name` (../shared_attributes/name.md) overrides `label` on Visuals (e.g. Button text).
- Pair with `hint` (../shared_attributes/hint.md) for help and `placeholder` (../shared_attributes/placeholder.md) for in-field examples.
- Labels resolve Closures with record / field context.

See also: [name](name.md), [hint](hint.md), [placeholder](placeholder.md), [value](value.md), [basics](../basics.md), [Input](../forms/input.md).