#502
In header
A site header whose trailing end holds a LocaleSwitcher next to a filled Sign up button.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "In header" pattern (@codeatlasdev/ui demo #502, navigation/locale-switcher) in my app.
Call get_demo({ ids: ["#502"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: The public header of a multi-language product: language switcher plus the primary call to action, compact on a phone.
Keep these library parts, with the props and tokens the demo uses:
- Button, Card, LocaleSwitcher, SiteHeader from "@codeatlasdev/ui"
Behaviour to keep:
- `<SiteHeader>` with a `{#snippet trailing()}` holding the end of the bar
- `<LocaleSwitcher {options} bind:value={locale} />` with `pt-BR` (`Português`, `short: 'PT'`) and `en` (`English`)
- A small filled `Button` labelled `Sign up` follows the switcher
- The header sits in `<Card full flush>`
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Button
@codeatlasdev/ui - Card
@codeatlasdev/ui - LocaleSwitcher
@codeatlasdev/ui - SiteHeader
@codeatlasdev/ui
How it is built
- `<SiteHeader>` with a `{#snippet trailing()}` holding the end of the bar
- `<LocaleSwitcher {options} bind:value={locale} />` with `pt-BR` (`Português`, `short: 'PT'`) and `en` (`English`)
- A small filled `Button` labelled `Sign up` follows the switcher
- The header sits in `<Card full flush>`
Related
Loading source.