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

---
`classes` | `->setClasses([])`

Set the extra classes for the component, it does not modify the component standard classes. The classes will always be placed in the outest element of the component.

| Types   | Default |
|---------|---------|
| `array` | `[]`    |

Applies to Form fields (added to the field wrapper) and Visuals / containers (added to the outermost element). It never replaces the framework's built-in classes, it only appends. When omitted (`[]`) no extra class is rendered.
Use it for Tailwind / Bootstrap utilities or custom CSS hooks without touching `style`.

### Example
Blade:
```php
{!! \KFramework\Components\Forms\Input::make()->setName('email')->setClasses(['my-input', 'mt-2']) !!}
```
Controller:
```php
Input::make()->setName('email')->setClasses(['my-input', 'mt-2']);
```

### Interaction / tips
- Pair with `id` (../shared_attributes/id.md) for stable selectors: `id` for JS, `classes` for styling.
- Use `extraAttributes` (../shared_attributes/extra_attributes.md) for `data-*` hooks and `style` (../shared_attributes/style.md) for one-off inline CSS.
- Accepts a Closure returning an array for record-dependent styling.

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