Atelier UI

Search components…

Search components…

Language Switcher

A compact language selector with a listbox dropdown, an inline segmented variant and typeahead.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

LanguageSwitcherProps

Also accepts all props of Omit<React.ComponentProps<"div">, "defaultValue" | "onChange">

PropTypeDefaultDescription
languagesLanguage[]defaultLanguages—
valuestring—Selected language code (controlled)
defaultValuestring——
onValueChange(code: string) => void——
variant"dropdown" | "segmented""dropdown"—
align"start" | "end""start"—
defaultOpenbooleanfalseRender the listbox open on mount (dropdown variant only, without moving focus)

Install

$ npx shadcn@latest add https://chromotion.dev/r/language-switcher.json

More like this