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

Data grid for searchable, pageable and actionable record lists backed by static `values` or a live `query`. Use it for resource indexes and reports; use [Card](card.md) with a `schema` for single-record detail, and [Chart](chart.md) when the goal is visualization rather than row operations.

---
## Usage

- Blade:
```php
{!! 
    \KFramework\Components\Visual\Table::make()
        ->setSchema([
            \KFramework\Components\Visual\TableColumn::make()
        ])
!!}
```
- Controller:
```php
Table::make()
        ->setSchema([
            TableColumn::make()
        ])
```

**End-to-end example:** pageable users table with row buttons.
```php
// Blade:
{!!
    \KFramework\Components\Visual\Table::make()
        ->setQuery($usersQuery)
        ->setPageable()
        ->setSchema([
            \KFramework\Components\Visual\TableColumn::make('name')->setLabel('Name')->setSortable()->setSearchable(),
            \KFramework\Components\Visual\TableColumn::make('email')->setLabel('E-mail'),
        ])
        ->setButtons([
            \KFramework\Components\Visual\Button::make('View')->setUrl('/users/1'),
        ])
!!}

// Controller:
use KFramework\Components\Visual\Table;
use KFramework\Components\Visual\TableColumn;

$table = Table::make()
    ->setQuery(User::query())
    ->setPageable()
    ->setSchema([
        TableColumn::make('name')->setLabel('Name'),
        TableColumn::make('email')->setLabel('E-mail'),
    ]);

return view('users.index', compact('table'));
```

---
## Standard attributes for Table

- `uuid`
- `id` 
- `classes`
- `extraAttributes`
- `schema`
  - It is used to set columns for the table, see the example above. Each entry is a `TableColumn` whose `name` maps to a field.
- `values`
  - It will set the records for each row in a static table. Use `values` for fixed rows and `query` (below) for Eloquent-backed tables.
- `columnSpan`
- `fixed`
  - If true will set the header sticky.

See their usage and description [here](../basics.md).

## Table specific attributes

- [Query](table/table_query.md)
- [Polling](table/table_polling.md)
- [Downloadable](table/table_downloadable.md)
- [Printable](table/table_printable.md)
- [Pageable](table/table_pageable.md)
- [Hideable columns](table/table_hideablecolumns.md)
- [Orderable columns](table/table_orderablecolumns.md)
- [Record buttons](table/table_buttons.md)
- [Header schema](table/table_headerschema.md)
- [Accordable schema](table/table_accordableschema.md)
- [Selectable schema](table/table_selectableschema.md)
- [Custom search](table/table_customsearch.md)
- [Custom filters](table/table_customfilters.md)

---
## Standard attributes for TableColumn

- `name`
  - The `name` of the column is used to set the data. Use `values` for the static table and assign for each row an array of array composed by `key` which represent the `name` of the column and its value.
  - For dynamic table, using `query`, the `name` of the column represent the field of the `query`.
    - It can also get relationships with the query model, use the dot `.`. Example: `users` have `role` relationship, to get the `id` of `role` -> `role.id`
- `label`
- `value` ([learn more](table/tablecolumn_value.md))
- `fixed`
  - If true will set the column sticky

See their usage and description [here](../basics.md).

## TableColumn specific attributes

- [Grouping](table/tablecolumn_grouping.md)
- [Searching](table/tablecolumn_searchable.md)
- [Sortable](table/tablecolumn_sortable.md)
- [maxContent](table/tablecolumn_maxcontent.md)

## See also
- [Components basics](../basics.md)
- [Card](card.md), [Button](button.md), [Chart](chart.md)
- [schema](../shared_attributes/schema.md), [columns](../shared_attributes/columns.md), [values](../shared_attributes/value.md)
- [Query](table/table_query.md)


