# `Cinder`
[🔗](https://github.com/sevenseacat/cinder/blob/v0.18.0/lib/cinder.ex#L5)

Tables, lists and grids of Ash resources in Phoenix LiveView, with filtering, sorting, search
and pagination.

```heex
<Cinder.collection resource={MyApp.User} actor={@current_user}>
  <:col :let={user} field="name" filter sort>{user.name}</:col>
  <:col :let={user} field="email" filter>{user.email}</:col>
</Cinder.collection>
```

For a list or grid, describe each item with an `<:item>` slot:

```heex
<Cinder.collection resource={MyApp.User} actor={@current_user} layout={:grid}>
  <:col field="name" filter sort />
  <:item :let={user}>
    <div class="p-4 border rounded">{user.name}</div>
  </:item>
</Cinder.collection>
```

This module holds the component, `collection/1` (see `Cinder.Collection` for its attributes),
and functions for changing a collection from your LiveView:

- `refresh_table/2,3` and `refresh_tables/2,3` re-read collections.
- `update_item/4`, `update_items/4`, `update_if_visible/4` and `update_items_if_visible/4` change
  rows on screen without re-reading.
- `remove_item/3` and `remove_items/3` take rows off the page.

See the [Getting Started](getting-started.html) guide to begin, and
[Custom Filters](custom-filters.html) to write your own filter types.

# `collection`

# `refresh_table`

# `refresh_table`

# `refresh_tables`

# `refresh_tables`

# `remove_item`

# `remove_items`

# `update_if_visible`

# `update_item`

# `update_items`

# `update_items_if_visible`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
