According their docs, you can pass content directly using the spec props:
spec: PropTypes.objectAn OpenAPI document respresented as a JavaScript object, JSON string, or YAML string for Swagger UI to display.
Don't use this in conjunction with
url- unpredictable behavior may occur.
Example:
<SwaggerUI spec={jsonData} />
Answer from indyteo on Stack Overflownpm
npmjs.com › package › swagger-ui-react
swagger-ui-react - npm
5 days ago - An array of objects that augment and modify Swagger UI's functionality. See Swagger UI's Plugin API for more details. ⚠️ This prop is currently only applied once, on mount. Changes to this prop's value will not be propagated to the underlying ...
» npm install swagger-ui-react
Published Apr 07, 2026
Version 5.32.2
CodeSandbox
codesandbox.io › examples › package › swagger-ui-react
swagger-ui-react examples - CodeSandbox
Use this online swagger-ui-react playground to view and fork swagger-ui-react example apps and templates on CodeSandbox.
Videos
03:24
Building a ReactJS Client for Swagger/OpenAPI: A Step-by-Step Guide ...
01:32
GitHub - swagger-api/swagger-ui: Swagger UI is a collection ...
Why I love Swagger UI as a FrontEnd Developer
How to Add Swagger UI to REST API - Actix-Web - Rust ...
20:07
Swagger Documentation for Next js API Endpoints Ultimate Guide ...
GitHub
github.com › swagger-api › swagger-ui
GitHub - swagger-api/swagger-ui: Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API. · GitHub
Starred by 28.8K users
Forked by 9.3K users
Languages JavaScript 94.7% | SCSS 4.2%
Swagger
swagger.io › docs › open-source-tools › swagger-ui › customization › overview
Plugin system overview | Swagger Docs
If you don’t want to set up a build pipeline capable of translating JSX to JavaScript, take a look at React without JSX (reactjs.org). You can use our system.React reference to leverage React without needing to pull a copy into your project. The system is the heart of the Swagger UI application.
GitHub
github.com › swagger-api › swagger-ui › issues › 3000
Any guidance on rendering Swagger-UI in a react app? · Issue #3000 · swagger-api/swagger-ui
April 28, 2017 - Our organization has found a ton of value in swagger/Open-API specs and using Swagger-UI to host interactive versions of our APIs. I've been working to extend our (internal) capabilities by creating a pretty light-weight, React based, single-page app that can display all of our uploaded spec files and dynamically render them (with different backend endpoints like dev, stage, prod) in Swagger-UI, all from a single web page.
Author GeekyTex
GitHub
github.com › JamaSoftware › swagger-ui-react
GitHub - JamaSoftware/swagger-ui-react: A built version of swagger-ui's React variant, containing a couple small changes · GitHub
February 1, 2024 - A built version of swagger-ui's React variant, containing a couple small changes - JamaSoftware/swagger-ui-react
Starred by 2 users
Forked by 2 users
Languages JavaScript
SmartBear Community
community.smartbear.com › smartbear community › swagger open source › swagger open source tools questions
swagger-ui-react copies data when we compile swagger file in react js project | SmartBear Community
I am using this library after npm install and taking the reference from swagger ui react documentations for further functionality.
GitHub
github.com › haraldrudell › react-swagger-ui
GitHub - haraldrudell/react-swagger-ui: Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Swagger UI is a collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API. - haraldrudell/react-swagger-ui
Author haraldrudell
Remult
remult.dev › docs › adding-swagger
Adding Swagger and openApi | Remult
# With npm npm i swagger-ui-react npm i -D @types/swagger-ui-react # With yarn yarn add swagger-ui-react yarn add -D @types/swagger-ui-react
npm
npmjs.com › package › swagger-ui
swagger-ui - npm
2 weeks ago - swagger-ui-react is Swagger UI packaged as a React component for use in React applications.
» npm install swagger-ui
Published Apr 15, 2026
Version 5.32.4
npm
npmjs.com › package › @types › swagger-ui-react
@types/swagger-ui-react - npm
This package contains type definitions for swagger-ui-react (https://github.com/swagger-api/swagger-ui#readme).
» npm install @types/swagger-ui-react
Published Jan 29, 2025
Version 5.18.0
CodeSandbox
codesandbox.io › s › swagger-ui-react-tfjhd
swagger-ui-react - CodeSandbox
February 12, 2021 - CodeSandbox is a cloud development platform that empowers developers to code, collaborate and ship projects of any size from any device in record time.
GitHub
github.com › swagger-api › swagger-ui › wiki › Using-older-version-of-React
Using older version of React · swagger-api/swagger-ui Wiki · GitHub
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API. - Using older version of React · swagger-api/swagger-ui Wiki
Author swagger-api
Tessl
tessl.io › registry › tessl › npm-swagger-ui-react
5.28.0 • npm-swagger-ui-react • tessl • Registry • Tessl
January 29, 2026 - Swagger UI React is a React component wrapper for Swagger UI that enables seamless integration of OpenAPI documentation into React applications.
Swagger
swagger.io › docs › open-source-tools › swagger-editor-next
SwaggerEditor | Swagger Docs
UIVisualize OpenAPI Specification definitions in an interactive UI. ... API DesignAPI DevelopmentAPI DocumentationAPI TestingAPI Mocking and VirtualizationAPI GovernanceAPI MonitoringOpenAPI & Swagger ... SwaggerEditor is using forked Create React App as it’s building infrastructure.
GitHub
github.com › swagger-api › swagger-ui › issues › 9243
Swagger-ui-react not working with nextjs since 5.3.2 · Issue #9243 · swagger-api/swagger-ui
September 25, 2023 - Use any version of swagger-ui-react after 5.3.2 in a project running nextjs 13. The module should compile without issues. The stacktrace window, full stacktrace can be found above. swagger-viewer-react worked fine with nextjs until updating to the newer versions (downgrading to 5.3.2 fixes the issue).
Author ViddeM
Npm
npm.io › package › react-swagger-ui
React-swagger-ui NPM | npm.io
import {SwaggerUI} from 'react-swagger-ui' import 'react-swagger-ui/dist/swagger-ui.css' <SwaggerUI url='http://petstore.swagger.io/v2/swagger.json' spec={object} />