#127
Fixed ratio
An Image with an inline 4:3 gradient SVG, constrained to a 360px wrapper.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Fixed ratio" pattern (@codeatlasdev/ui demo #127, display/image) in my app.
Call get_demo({ ids: ["#127"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Content images where width and height are declared so the layout does not shift.
Keep these library parts, with the props and tokens the demo uses:
- Image from "@codeatlasdev/ui"
Behaviour to keep:
- `<Image {src} alt="Gradient placeholder, 4 by 3" width={800} height={600} />`
- `src` is an inlined `data:image/svg+xml;utf8,` gradient, so the demo needs no asset
- Wrapper is `<div style="max-width: 360px">`
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- Image
@codeatlasdev/ui
How it is built
- `<Image {src} alt="Gradient placeholder, 4 by 3" width={800} height={600} />`
- `src` is an inlined `data:image/svg+xml;utf8,` gradient, so the demo needs no asset
- Wrapper is `<div style="max-width: 360px">`
Related
Loading source.