Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
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 chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
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
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Media

PowerPoint Viewer

Media

PowerPoint Viewer React component for Tailwind CSS v4

PDF ViewerQR Code
Live props
Content
src
fileName
defaultSlide1
Behavior
defaultLayout
defaultZoom
defaultNotesVisible
defaultSidebarOpen
maxFileSize
Appearance
variant
radius
highlightColor
activeHighlightColor
Layout
showToolbar
showThumbnails
showSearch
showLayoutSwitch
showNotes
showPresent
showDownload
showUpload
height640px
Code
import { PptxViewer } from "@/components/ui/pptx-viewer"

<PptxViewer />
  1. Home
  2. Components
  3. Media
  4. PowerPoint Viewer
Pro

PowerPoint Viewer React component for Tailwind CSS v4

v1.0.0·Added in 1.4.0

A React PowerPoint (.pptx) viewer with real slides, thumbnails, zoom, search, speaker notes, a single slide view and a fullscreen presenter.

Slides render in the browser from the .pptx itself, with nothing uploaded: layouts, masters and the theme's colors and fonts, backgrounds (solid, gradient, picture), shapes with fills, outlines, arrows, rotation and flips, grouped shapes, text with bullets, numbering, spacing and shrink-to-fit, cropped pictures, tables with their styles, bar, line, area and pie charts from the values saved in the file, and SmartArt from its saved drawing; video, audio and embedded objects show an honest labeled placeholder. Text stays real text you can select and search. Scroll through the slides as a column, or switch to one slide at a time (Single slide); only the slides near the view are drawn, so long decks stay light. The toolbar moves between slides (‹ ›, or type a number in the slide field: Enter jumps, Up / Down step, Escape cancels), zooms (- / + or a percentage, Automatic, Fit page, Fit width), searches, shows the speaker notes under the slide, starts the presenter and downloads the file; below 720px of width the switches, Present and Download move into the ⋯ menu, which also opens another .pptx (or drop one onto the viewer). The sidebar lists every slide as a thumbnail, hidden slides dimmed; arrows, Home and End move through it. In the viewer, ← → Page Up / Page Down, Home and End change slides (↑ ↓ too while a slide fits the view), Ctrl+F / ⌘F opens search: the counter reads 2 of 6, Enter / Shift+Enter jump between hits, hits in the notes open the notes. Present goes fullscreen with the hidden slides left out: click, Space, arrows or Page Up / Down to advance, Home / End, Escape to leave; on a phone swipe left or right. Pinch with two fingers, or Ctrl / ⌘ + scroll, to zoom around that point. Menus become bottom sheets on phones and slides keep their own colors in dark mode.

PowerPoint Viewer is a Pro React component in the React media components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add pptx-viewer, together with Button, Dropdown Menu, Popover, Tooltip, useControllableState and 2 more and the npm packages fflate and lucide-react.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add pptx-viewer

PowerPoint Viewer is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans or unlock it free with an account

Usage

Import PptxViewer from @/components/ui/pptx-viewer.

import { PptxViewer } from "@/components/ui/pptx-viewer"

export function QuarterlyReviewPreview() {
  return (
    <PptxViewer
      src="/demo/q3-business-review.pptx"
      fileName="Q3 2026 business review.pptx"
      height="80dvh"
      onSlideChange={(slide) => console.log("slide", slide)}
    />
  )
}

Props

  • srcdefault "/demo/q3-business-review.pptx"
    string

    URL of the .pptx: same origin, a CORS-enabled URL or a blob: URL. Empty shows the open-a-presentation state. The playground value is the sample quarterly review (12 slides, 16:9).

  • fileNamedefault ""
    string

    Name used for downloads and in the viewer's accessible label. Falls back to the last part of src; an uploaded file keeps its own name.

  • defaultSlidedefault 1
    number

    The slide it opens on, 1-based. Use slide and onSlideChange to control it.

  • defaultLayoutdefault "continuous"
    "continuous" | "single"

    continuous scrolls through every slide in a column; single shows one slide at a time, fitted to the viewer, with swipe on touch. The Single slide switch changes it.

  • defaultZoomdefault "automatic"
    number | "automatic" | "fit-page" | "fit-width"

    The zoom each presentation opens at. "automatic" fits the slide width up to 100% in the column and the whole slide in single view; "fit-page" and "fit-width" fit the viewer; a number is a scale (1 is 100%).

  • defaultNotesVisibledefault false
    boolean

    Opens with the speaker notes of the current slide shown under it.

  • defaultSidebarOpendefault true
    boolean

    Opens with the slides sidebar. It sits beside the slides from 520px of width and slides over them below, where it starts closed. Use sidebarOpen and onSidebarOpenChange to control it.

  • maxFileSizedefault "104857600"
    number

    Bytes: 100 MB by default. A bigger file shows the file too large state with a download link instead of being parsed. The playground offers 100 KB, smaller than the sample, to show it.

  • variantdefault "surface"
    "surface" | "outline" | "plain"

    surface is a raised panel, outline a bordered box, plain has no frame for app panes that bring their own.

  • radiusdefault "md"
    "none" | "sm" | "md" | "lg"

    Corner radius of the frame: 0, 12, 16 or 24px.

  • highlightColordefault "rgba(250, 204, 21, 0.4)"
    string

    Fill of every search hit, on the slides and in the notes. Keep it translucent so the text stays readable. Also set as --pptx-viewer-highlight on the frame.

  • activeHighlightColordefault "rgba(249, 115, 22, 0.55)"
    string

    Fill of the current search hit (--pptx-viewer-active-highlight).

  • showToolbardefault true
    boolean

    The toolbar with slide navigation, zoom, search, view switches and file actions.

  • showThumbnailsdefault true
    boolean

    The slides sidebar and its toggle.

  • showSearchdefault true
    boolean

    The search button, and Ctrl+F / ⌘F inside the viewer. Search covers the slides and the speaker notes.

  • showLayoutSwitchdefault true
    boolean

    The Single slide switch in the toolbar (the ⋯ menu when narrow).

  • showNotesdefault true
    boolean

    The Speaker notes switch in the toolbar (the ⋯ menu when narrow), off while the file has no notes.

  • showPresentdefault true
    boolean

    The Present button (in the ⋯ menu when narrow): fullscreen, one slide at a time, hidden slides left out.

  • showDownloaddefault true
    boolean

    The download button (in the ⋯ menu when narrow). It saves the original file.

  • showUploaddefault true
    boolean

    Open a presentation in the ⋯ menu and dropping a .pptx onto the viewer. The file opens locally; onPresentationUpload hands it to you.

  • heightdefault 640
    number | string

    Height of the viewer: px as a number, or any CSS length ("100%", "80dvh") to fill a pane.

  • slide
    number

    Controls the slide in view, 1-based. Pair it with onSlideChange.

  • onSlideChange
    (slideNumber: number) => void

    Called with the slide number when the slide in view changes: scrolling, the toolbar, the keyboard, a thumbnail, a search hit or the presenter.

  • layout
    "continuous" | "single"

    Controls the layout. Pair it with onLayoutChange.

  • onLayoutChange
    (layout: "continuous" | "single") => void

    Called when the Single slide switch changes the layout.

  • sidebarOpen
    boolean

    Controls the slides sidebar. Pair it with onSidebarOpenChange.

  • onSidebarOpenChange
    (open: boolean) => void

    Called when the sidebar toggle, a pick in the overlay sidebar or its backdrop opens or closes it.

  • zoomLevelsdefault "[0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 3, 4]"
    number[]

    Steps of the zoom menu and the - / + buttons. The first and last are the zoom limits for pinch and Ctrl / ⌘ + scroll too.

  • toolbarActions
    ReactNode

    Your own buttons at the end of the toolbar, before the ⋯ menu: share, comment, approve.

  • ref
    Ref<PptxViewerHandle> (a useRef object or an (handle) => void callback)

    goToSlide(slideNumber, { behavior }?), next(), previous(), getActiveSlide(), getSlides() with titles and notes for a table of contents, enterPresentation(slideNumber?), exitPresentation() and getViewportElement().

  • renderSlideOverlay
    (props: PptxViewerSlideOverlayProps) => ReactNode

    Draws on top of each slide in the viewer, sized to the slide at the current zoom: review pins, citations, stamps. Gets slideNumber, slideWidth, slideHeight and scale.

  • onPresentationLoadSuccess
    (presentation: PptxViewerPresentation) => void

    Called when a presentation is ready, with its file name, slide count, slides (number, title, hidden, notes, layout), slide size and aspect ratio, and document properties (title, author, dates, company).

  • onPresentationLoadError
    (error: unknown) => void

    Called when a presentation cannot be fetched or parsed, or is an old .ppt or password-protected file. The viewer shows the error state.

  • onPresentationUpload
    (file: File) => void

    Called with the File someone opened or dropped, as the viewer starts showing it.

  • onPresentingChange
    (presenting: boolean) => void

    Called when the presenter starts and ends.

  • labels
    Partial<PptxViewerLabels>

    Every string, English by default (DEFAULT_PPTX_VIEWER_LABELS): slide, of, slideNumber, previousSlide, nextSlide, slidesSidebar, slides, slideLabel(slide), hidden, zoomIn, zoomOut, zoomLevel, fitPage, fitWidth, automatic, search, searchPlaceholder, searching, noResults, results(active, total), previousResult, nextResult, clearSearch, moreActions, singleSlide, notes, notesFor(slide), noNotes, present, exitPresentation, presentationProgress(slide, total), download, upload, presentation, loading, error, errorDescription, unsupported, tooLarge, tooLargeDescription(limit), emptyTitle, emptyDescription, noSlides, dropHere, video, audio, smartArt, embeddedObject, unsupportedImage, chart.

  • classNames
    Partial<Record<"toolbar" | "sidebar" | "thumbnail" | "viewport" | "slide" | "notes" | "state", string>>

    Extra classes for the toolbar, the sidebar, each thumbnail, the scrolling viewport, each slide frame, the notes panel and the loading / empty / error states.

  • className
    string

    Extra classes for the frame, merged last. Other div props are forwarded to it.

Parts

  • PptxViewerHandle

    type

    What the ref gets: goToSlide(slideNumber, { behavior }?), next(), previous(), getActiveSlide(), getSlides(), enterPresentation(slideNumber?), exitPresentation() and getViewportElement().

  • PptxViewerPresentation

    type

    What onPresentationLoadSuccess receives: fileName, slideCount, slides (PptxViewerSlideInfo[]), width and height of a slide at 100% in px, aspectRatio (16:9, 4:3, 16:10 or custom) and properties.

  • PptxViewerSlideInfo

    type

    A slide: number (1-based), title (the title placeholder, else its first line of text), hidden, notes (plain text) and layout name.

  • PptxViewerSlideOverlayProps

    type

    What renderSlideOverlay receives: slideNumber, slideWidth, slideHeight and scale.

  • PptxViewerZoom

    type

    A scale or "automatic" | "fit-page" | "fit-width".

  • PptxViewerLayout

    type

    "continuous" or "single".

  • PptxViewerLabels

    type

    The shape of labels: every string the viewer renders.

  • DEFAULT_PPTX_VIEWER_LABELS

    constant

    The English labels. Spread it to translate a few strings.

Examples

Current slide outside the viewer

onSlideChange and the slide titles from onPresentationLoadSuccess drive a caption with its own previous and next buttons (ref.previous, ref.next).

Table of contents

A contents list built from the slide titles; ref.goToSlide jumps to a slide and the current one stays marked while you scroll.

Speaker notes

defaultNotesVisible shows the notes under the slide; search finds text in the notes too.

Your own toolbar actions

toolbarActions adds Share and Approve deck; the view switches fold into the ⋯ menu when the toolbar runs out of room.

On a phone

Slides take the full width, the sidebar slides over them, menus open as bottom sheets, pinch zooms and Present goes fullscreen with swipes.

One slide at a time

defaultLayout="single" fits one slide to the viewer; arrows, Page Up / Down and swipes turn the slides.

Empty, open a file

Without src the viewer asks for a presentation: pick a .pptx or drop it onto the frame.

File too large

maxFileSize={100 * 1024} refuses the 360 KB sample before parsing and offers the download instead.

Dependencies

fflatelucide-reactbuttondropdown-menupopovertooltipuse-controllable-statemotionui-config

Files

  • components/ui/pptx-viewer.tsx

FAQ

Is the React PowerPoint Viewer component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install PowerPoint Viewer?

Run npx wingo-ui@latest add pptx-viewer. It also adds the Wingo UI items it builds on (Button, Dropdown Menu, Popover, Tooltip, useControllableState and 2 more) and the npm packages fflate and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/pptx-viewer.

How does PowerPoint Viewer behave on phones?

Present goes fullscreen with the hidden slides left out: click, Space, arrows or Page Up / Down to advance, Home / End, Escape to leave; on a phone swipe left or right. Menus become bottom sheets on phones and slides keep their own colors in dark mode.

See also

PDF ViewerDOCX ViewerExcel ViewerCarousel

Used in

File System

More React media components

Image LightboxVideo PlayerImage CropperLocation MapAudio PlayerCSV Viewer
All 17 React media components

Articles using this component

  • React PPTX Viewer: Slides, Notes and Presenter Mode

    Component guides · Nov 5, 2026 · 9 min read

New components by email

New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.

PreviousPDF ViewerNext QR Code
Slideof –
Loading presentation