# `PhoenixKit.Dashboard.Group`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.106/lib/phoenix_kit/dashboard/group.ex#L1)

Struct representing a dashboard tab group.

Groups organize tabs in the dashboard sidebar. Each group has an ID,
an optional label, and a priority for ordering.

## Fields

- `id` - Unique group identifier atom (e.g., `:admin_main`, `:shop`)
- `label` - Optional display label (nil for unlabeled groups)
- `priority` - Sort priority (lower = first, default: 100)
- `icon` - Optional heroicon name (e.g., `"hero-cube"`)
- `collapsible` - Whether the group can be collapsed in the sidebar
- `gettext_backend` - Optional Gettext backend module for label translation (default: nil)
- `gettext_domain` - Gettext domain for translation lookups (default: "default")

# `t`

```elixir
@type t() :: %PhoenixKit.Dashboard.Group{
  collapsible: boolean(),
  gettext_backend: module() | nil,
  gettext_domain: String.t(),
  icon: String.t() | nil,
  id: atom(),
  label: String.t() | nil,
  priority: integer()
}
```

# `localized_label`

```elixir
@spec localized_label(t()) :: String.t() | nil
```

Returns the group's label, translated via the configured gettext backend if one is set.

Falls back to the raw label string when:
  * `gettext_backend` is `nil` (default — no translation configured)
  * the label is `nil` (unlabeled groups)
  * gettext has no translation for the msgid (gettext's own fallback)

Reads `gettext_backend` and `gettext_domain` via `Map.get/2` rather than
pattern matching, so an old-shape struct cached in ETS or `:persistent_term`
before the 1.8.0 upgrade — which lacks those keys entirely — gracefully
falls back to the raw label instead of raising `FunctionClauseError`.

# `new`

```elixir
@spec new(map() | keyword()) :: t()
```

Creates a new group from a map or keyword list.

---

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