Swagger UI for React
JSON →swagger-ui-react is a specialized React component that seamlessly integrates Swagger UI directly into React applications. It exposes the full capabilities of Swagger UI through a simple React component, `SwaggerUI`. Unlike the core Swagger UI distribution, this package declares `react` and `react-dom` (versions >=16.8.0 <20) as peer dependencies, ensuring compatibility with existing React environments. The package's versioning closely mirrors the underlying Swagger UI, with the current stable release being 5.32.4. It receives frequent updates, including bug fixes, performance enhancements, and crucial security patches, as demonstrated by recent releases addressing several CVEs and introducing features like basic OpenAPI 3.2.0 support and dark mode. A notable aspect is the inclusion of anonymized installation analytics via Scarf, which users can easily opt out of through `package.json` settings or an environment variable. Developers should be mindful of specific prop behaviors, such as `layout` and `docExpansion` applying only on initial mount, and the mutual exclusivity of the `spec` and `url` props.
Traffic · last 30 days ↓87% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇦🇺 Australia · 🇩🇪 Germany · 🇬🇧 United Kingdom