LanguageSelector
Dropdown selector for switching between store languages. Supports full name, code-only, and icon display modes.
Best for
Import
import { LanguageSelector } from "@enadhq/enad-react-sdk/client/storefront"When to use it
Use LanguageSelector when the storefront supports multiple languages and visitors need a way to switch. It is typically placed in the header utility area or footer alongside other locale controls like CountryRedirect.
Composition notes
LanguageSelector is a controlled select component:
languagesis an array of language options withcode,label, and optionalicon.valueandonValueChangemanage the selected language.variantcontrols the trigger display:"full"(language name),"code"(two-letter code with globe icon), or"icon"(language icon only).
Behavior and theming guidance
The selector renders as a styled Select dropdown that fits into compact utility bars. The "code" variant is the most space-efficient for tight header layouts. The "full" variant works better in footer or settings contexts where space is not constrained.
Examples
Live examples you can edit directly in the sandbox.
Full language selector
A dropdown showing full language names. Place it in the header utility area or footer for locale switching.
Component Sets
Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| languages | LanguageOption[] | — | No description yet. |
| value | string | — | No description yet. |
| onValueChange | (code: string) => void | — | No description yet. |
| variant | string | full | No description yet. |
| size | string | md | No description yet. |
| className | string | — | No description yet. |
| labels | string | — | No description yet. |