# Column visibility

> Let users show or hide selected columns.

Source: https://docs.inertiax.dev/table/guide/column-visibility/

Call `toggleable()` to include a column in the column picker:

```php
use InertiaX\Table\Columns\TextColumn;

TextColumn::make('email')->toggleable();
```

## Start with a hidden column

```php
TextColumn::make('email')->visible(false)->toggleable();
```

To set the default for all columns, call `toggleableColumns()` on the table. Explicit column options override table-wide defaults.

Caution

Hidden column data still reaches the browser. Omit sensitive fields entirely. See [Visibility is presentation](https://docs.inertiax.dev/table/guide/security/#visibility-is-presentation).

## Visibility state

Visibility changes do not request data or update the URL. They survive new results while the table definition stays the same. A change to columns, filters, capabilities, or row key resets visibility to the new definition’s defaults.

Use the [controller](https://docs.inertiax.dev/table/guide/controller-events/) to read, set, or reset visibility from custom UI.
