#780
Scoped block
ThemeIsland as a scoped block: a light ocean island inside a dark page.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Scoped block" pattern (@codeatlasdev/ui demo #780, layout/theme-island) in my app.
Call get_demo({ ids: ["#780"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: A section or card that must use another preset or scheme than the rest of the app, without touching <html>.
Keep these library parts, with the props and tokens the demo uses:
- Button, ThemeIsland from "@codeatlasdev/ui"
Behaviour to keep:
- `<ThemeIsland preset="ocean" scheme="light"`
- A light block inside the page, nothing mirrored to the document
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 - ThemeIsland
@codeatlasdev/ui
How it is built
- `<ThemeIsland preset="ocean" scheme="light"`
- A light block inside the page, nothing mirrored to the document
Related
Loading source.