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

---
`columns` | `->setColumns()`

Set the columns of a component container, such as `Form`, `Repeater`, `Tab` and so on. This will create a grid to distribute other components.

| Types     | Default |
|-----------|---------|
| `integer` | `1`     |

Defines the grid width for container components (`Form`, `Repeater`, `Tabs`, `Card`, `Modal` with schema). Children in `schema` flow left-to-right across this many columns. When omitted the layout is single-column (`1`).
Increase to 2–4 for compact create / edit forms; children can then span via `columnSpan`.

### Example
Blade:
```php
{!! \KFramework\Components\Forms\Form::make()->setColumns(2)->setSchema([\KFramework\Components\Forms\Input::make()->setName('a'), \KFramework\Components\Forms\Input::make()->setName('b')]) !!}
```
Controller:
```php
Form::make()->setColumns(2)->setSchema([
    Input::make('first_name'),
    Input::make('last_name'),
]);
```

### Interaction / tips
- Pair with `columnSpan` (../shared_attributes/column_span.md) on children for wide fields.
- Mirrors `footerColumns` (../shared_attributes/footer_columns.md) which does the same for `footerSchema` (../shared_attributes/footer_schema.md).
- Keep `schema` (../shared_attributes/schema.md) order in mind: grid fills row by row.

See also: [columnSpan](column_span.md), [schema](schema.md), [footerColumns](footer_columns.md), [footerSchema](footer_schema.md), [basics](../basics.md), [Form](../forms/form.md).