Shared theme controller component for admin and dashboard.
Provides a dropdown to select from available daisyUI themes. Supports filtering to show only specific themes.
Summary
Functions
Renders a theme controller dropdown.
Functions
Renders a theme controller dropdown.
Attributes
themes- List of theme names to show, or:allfor all themes (default::all)id- Unique ID for the dropdown (default: "theme-dropdown")class- Additional CSS classes
Examples
<%!-- All themes --%>
<.theme_controller />
<%!-- Only specific themes --%>
<.theme_controller themes={["system", "light", "dark", "nord", "dracula"]} />
<%!-- From config --%>
<.theme_controller themes={Application.get_env(:phoenix_kit, :dashboard_themes, :all)} />Attributes
themes(:any) - Defaults to:all.id(:string) - Defaults to"theme-dropdown".class(:string) - Defaults tonil.- Global attributes are accepted.