useImageMode — Photo Caption
- from @astryx
- by Astryx
A photo banner with a caption over the sky. useImageMode samples only the strip under the caption and MediaTheme switches the caption between light and dark text from the result. A Beach photo switch swaps a night photo for a bright beach photo, and while the new photo loads the caption keeps the dark fallback. Astryx replaced 2 demo media references with marked placeholders; put your own content there.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @astryx/example-use-image-mode-photo-captionRegistry dependencies0
The CLI adds no other registry items with this one.
