Theme Playground

Commerce

LanguageSelector

Dropdown selector for switching between store languages. Supports full name, code-only, and icon display modes.

Best for

language switchinglocale pickersinternationalized storefronts

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:

  • languages is an array of language options with code, label, and optional icon.
  • value and onValueChange manage the selected language.
  • variant controls 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.

1 example

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

PropTypeDefaultDescription
languagesLanguageOption[]
No description yet.
valuestring
No description yet.
onValueChange(code: string) => void
No description yet.
variantstringfull
No description yet.
sizestringmd
No description yet.
classNamestring
No description yet.
labelsstring
No description yet.