# `PhoenixKitWarehouse.Web.Components.SortHeader`
[🔗](https://github.com/BeamLabEU/phoenix_kit_warehouse/blob/0.5.2/lib/phoenix_kit_warehouse/web/components/sort_header.ex#L1)

The clickable column header every warehouse list table uses.

Renders the column label with a sort chevron and raises `"toggle_sort"`
(with `phx-value-by`) on the parent LiveView, so it needs no `phx-target`
and works in every list view that implements that event. It lived as an
identical private component in each of the seven list LiveViews; keeping
one copy means a layout fix lands everywhere at once.

# `sort_header`

## Attributes

* `by` (`:string`) (required)
* `label` (`:string`) (required)
* `sort_by` (`:string`) (required)
* `sort_dir` (`:atom`) (required)
* `align` (`:atom`) - Defaults to `:left`.

---

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