# `Incant.Resource`
[🔗](https://github.com/elixir-vibe/incant/blob/v0.1.1/lib/incant/resource.ex#L1)

Defines a code-first admin resource.

Resources describe table columns, filters, row actions, forms, and the data
source used by the generic LiveView renderer.

    defmodule MyApp.Admin.Resources.Product do
      use Incant.Resource,
        schema: MyApp.Catalog.Product,
        repo: MyApp.Repo

      changeset &MyApp.Catalog.Product.changeset/2

      table do
        column :name, link: true
        column :status, as: :badge
        filter :status, :select, options: [:draft, :active]
        action :edit
      end
    end

# `action`
*macro* 

# `actions`
*macro* 

# `bulk`
*macro* 

# `changeset`
*macro* 

# `column`
*macro* 

# `field`
*macro* 

# `filter`
*macro* 

# `form`
*macro* 

# `index`
*macro* 

# `index_callback`

# `normalize_action_opts`

# `normalize_callback`

# `normalize_filter_opts`

# `page`
*macro* 

# `query`
*macro* 

# `query_transformer`
*macro* 

# `read`
*macro* 

# `read_callback`

# `resource_id`

# `row`
*macro* 

# `row_detail`
*macro* 

# `search`
*macro* 

# `table`
*macro* 

# `transformer`
*macro* 

# `transformer`
*macro* 

---

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