# [Usage](../../../../usage.md) > [Components](../../basics.md) > [Visuals](../../basics.md) > [Table](../table.md) > header schema

### `headerSchema` | `->setHeaderSchema([])`
This will display schema on top of the table, fillable with other components, especially buttons. You can set the columnSpan of each component with standard attributes.

Header schema actions can receive following arguments:
- `$customFilters` -> table custom filters
- `$orginalQuery` -> original table query
- `$query` -> filtered table query

```php
->setHeaderSchema([
    Button::make('Use records')
        ->setAction(function ($customFilters, $originalQuery, $query) {
            
        })
])
```

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

What it does: renders a component schema above the table — typically buttons, but any component works and each honors standard `columnSpan`. Unlike row buttons, header actions operate on the whole table: closures receive `$customFilters`, `$originalQuery` and the filtered `$query`. Works for static and dynamic tables, but query arguments are only meaningful with `setQuery()`.

Minimal working example — Blade:
```php
{!!
    \KFramework\Components\Visual\Table::make()
        ->setSchema([
            \KFramework\Components\Visual\TableColumn::make('name')->setLabel('Name'),
        ])
        ->setQuery($usersQuery)
        ->setHeaderSchema([
            \KFramework\Components\Visual\Button::make('Export selection')
                ->setAction(function ($customFilters, $originalQuery, $query) {
                    // bulk work on the filtered query
                }),
        ])
!!}
```
Controller: same shape with `Table::`, `TableColumn::`, `Button::` facades.

What the user sees: a toolbar row on top of the table with the given components (e.g. a "Use records" button).

Interaction:
- Pairs with [selectable schema](table_selectableschema.md) (header button can act on checked `$records`) and [buttons](table_buttons.md) (table-level vs per-row actions).
- Pairs with [custom filters](table_customfilters.md): header closures receive the live `$customFilters` array.
- Combine with [downloadable](table_downloadable.md) when the header triggers exports.

See also: [Table](../table.md), [Components basics](../../basics.md), [buttons](table_buttons.md), [selectable schema](table_selectableschema.md).