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

---
`style` | `->setStyle()`

Set the HTML string of style attribute for that component, in Form elements will be applied to the `kfw-form-field-container`, for the visual elements, to the elements themselves.

```php
Component::make()
    ->setStyle('margin-left: 10px')
```

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

Raw inline CSS string: on Form fields applied to the `kfw-form-field-container` wrapper, on Visuals to the element itself. Use for one-off tweaks (margins, widths). When omitted (`null`) no inline style renders.
Prefer `classes` for reusable styling; `style` wins on specificity.

### Example
Blade:
```php
{!! \KFramework\Components\Forms\Input::make()->setName('email')->setStyle('margin-left: 10px') !!}
```
Controller:
```php
Input::make('email')->setStyle('max-width: 400px');
```

### Interaction / tips
- Pair with `classes` (../shared_attributes/classes.md): classes for reuse, `style` for exceptions.
- `extraAttributes` (../shared_attributes/extra_attributes.md) ignores `style` key — use this setter instead.
- Keep strings small; large CSS belongs in stylesheets.

See also: [classes](classes.md), [extraAttributes](extra_attributes.md), [id](id.md), [dimension](dimension.md), [basics](../basics.md), [Input](../forms/input.md).