WingoUI
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime Picker
Forms
Address InputCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text Editor
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselImage CropperImage LightboxLocation MapQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Gravity Letters
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowPost Listing WizardPricing PageRegister PageSettings PageUsers Admin Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryThemeCredits

Media

Image Lightbox

MediaImage Lightbox
Image CropperLocation Map
Live props
State
defaultOpen
defaultIndex0
Behavior
loop
zoom
maxZoom4×
doubleTapZoom2.5×
swipeToClose
hideControlsDelay3000ms
Appearance
showThumbnails
showCaptions
showCounter
download
share
Code
import { ImageLightbox } from "@/components/ui/image-lightbox"

<ImageLightbox />
Pro

v1.0.0·Added in 1.0.0

A full-screen photo viewer that zooms out of its thumbnail: swipe between images, pinch and double-tap to zoom, swipe down to close.

Tap a thumbnail and the photo grows out of it into a black full-screen viewer (the thumbnail's crop opens up into the whole image); closing flies it back into the thumbnail of the photo you are on, or fades when that thumbnail is off screen. Swipe or drag sideways to move between photos (embla's physics, one photo per swipe); on a phone pull a photo down and it shrinks while the page shows through, then let go past a quarter of the screen or flick to close, or it springs back. Pinch to zoom around your fingers (it resists past 1x and the max, then settles), double-tap or double-click to zoom to the tapped point and again to go back, drag to pan a zoomed photo with momentum and a soft edge, and use ctrl or cmd + wheel (a trackpad pinch) to zoom at the cursor while a plain wheel pans; a horizontal trackpad swipe pages. While zoomed, swipes pan instead of paging and swipe-down is off; changing photo resets the zoom. On desktop the toolbar (counter, zoom level pill that resets on click, zoom out / in, download, share, close), the side arrows, the caption and the thumbnail strip fade after the idle delay and come back on any mouse move or key; on a phone a single tap toggles them, like Photos. Keys: Left / Right previous / next, Home / End first / last, + or = zoom in, - zoom out, 0 reset, Escape resets a zoom first and closes on the second press. Focus stays trapped in the viewer and returns to the thumbnail that opened it; the counter is a polite live region and the caption describes the dialog. Images load only near the current one, show a spinner (over the thumbnail as a placeholder) until ready and an icon when broken. Under reduced motion it fades instead of flying, and double-tap zoom jumps.

Add to a project

npx wingo-ui@latest add image-lightbox

Pro item: the CLI needs a Pro account. See plans

Dependencies

@radix-ui/react-dialog@radix-ui/react-visually-hiddenmotionlucide-reactcarouselbuttonspinneruse-media-queryuse-shortcutuse-controllable-statemotionui-config

Files

  • components/ui/image-lightbox.tsx

See also

CarouselDialogFile ListCard
PreviousImage CropperNext Location Map

Northwind Homes · #NY-2026-0412

3-bedroom apartment, Brooklyn · Park Slope

840 sq ft · floor 3 of 8 · available Oct 1, 2026

$3,200/mo

Tap a photo. Pinch, double-tap or Ctrl / ⌘ + scroll to zoom; swipe down to close.

defaultIndex=0 · zoom=on · maxZoom=4× · doubleTapZoom=2.5× · swipeToClose=on · loop=off · hideControlsDelay=3000ms · thumbnails=on · captions=on · counter=on · download=off · share=off