# `PhoenixKitWeb.Components.Dashboard.MultiContextSelector`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.87/lib/phoenix_kit_web/components/dashboard/multi_context_selector.ex#L1)

Wrapper component for rendering multiple context selectors.

This component filters selectors by position and sub_position, sorts them
by priority, and renders them in a flex container.

## Usage

Header position (start):

    <.multi_context_selector
      position={:header}
      sub_position={:start}
      configs={@context_selector_configs}
      contexts_map={@dashboard_contexts_map}
      current_map={@current_contexts_map}
      show_map={@show_context_selectors_map}
    />

Sidebar position (end):

    <.multi_context_selector_sidebar
      position={:sidebar}
      sub_position={:end}
      configs={@context_selector_configs}
      contexts_map={@dashboard_contexts_map}
      current_map={@current_contexts_map}
      show_map={@show_context_selectors_map}
    />

# `has_visible_selectors?`

Checks if multi-selector is enabled and there are any selectors to show.

Use this to conditionally render the multi-selector container.

## Attributes

* `configs` (`:list`) (required)
* `show_map` (`:map`) (required)
* `position` (`:atom`) - Defaults to `:header`.
* `sub_position` (`:atom`) - Defaults to `:start`.

# `multi_context_selector`

Renders multiple context selectors for header position.

Filters selectors by position and sub_position, sorts by priority.

## Attributes

- `position` - The position to filter by (:header or :sidebar)
- `sub_position` - The sub_position to filter by (:start, :end, or {:priority, N})
- `configs` - List of all ContextSelector configs
- `contexts_map` - Map of key => list of contexts
- `current_map` - Map of key => current context
- `show_map` - Map of key => boolean (whether to show selector)
- `class` - Additional CSS classes
- `separator` - Optional separator between selectors

## Attributes

* `position` (`:atom`) - Defaults to `:header`.
* `sub_position` (`:atom`) - Defaults to `:start`.
* `configs` (`:list`) (required)
* `contexts_map` (`:map`) (required)
* `current_map` (`:map`) (required)
* `show_map` (`:map`) (required)
* `class` (`:string`) - Defaults to `""`.
* `separator` (`:string`) - Defaults to `nil`.

# `multi_context_selector_mobile`

Renders mobile context selectors for all keys.

## Attributes

* `configs` (`:list`) (required)
* `contexts_map` (`:map`) (required)
* `current_map` (`:map`) (required)
* `show_map` (`:map`) (required)

# `multi_context_selector_sidebar`

Renders multiple context selectors for sidebar position.

Uses sidebar-specific styling for vertical layout.

## Attributes

* `position` (`:atom`) - Defaults to `:sidebar`.
* `sub_position` (`:atom`) - Defaults to `:start`.
* `configs` (`:list`) (required)
* `contexts_map` (`:map`) (required)
* `current_map` (`:map`) (required)
* `show_map` (`:map`) (required)
* `class` (`:string`) - Defaults to `""`.

---

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