Locale Switcher
Language picker. The app stores the choice and re-renders the provider.
Proposal for Acme Bistro
- há 2 minutos
- R$ 449,00
- 250.000
Installation
Once per app, set up Aedis UI. The CLI verifies the signed release before writing anything and pins every dependency:
npx @aedis/cli@0.1.0 initImport the theme once in your global CSS, after Tailwind:
app/globals.css
@import "tailwindcss";@import "./styles/aedis-theme.css";Then add the component:
npx @aedis/cli@0.1.0 add locale-switcher# pnpm dlx @aedis/cli@0.1.0 add locale-switcher · yarn dlx @aedis/cli@0.1.0 add locale-switcher · bunx @aedis/cli@0.1.0 add locale-switcherProps
| Prop | Type | Default | Description |
|---|---|---|---|
| locales | { code; label }[] | — | Options, each label in its own language. |
| value | string | — | Selected locale. Defaults to the provider locale. |
| onChange | (code) => void | — | Called with the chosen BCP 47 tag. |
| label | string | — | Accessible name. Defaults to the dictionary. |
Security
- A native select: keyboard and screen readers work everywhere; each option carries its own lang.