@scalar/api-reference-react
TypeScript icon, indicating that this package has built-in type declarations

0.1.92 • Public • Published

Scalar API Reference React Component

Version Downloads License Discord

Installation

npm install @scalar/api-reference-react

Usage

import { ApiReferenceReact } from '@scalar/api-reference-react'
import React from 'react'

function App() {
  return (
    <ApiReferenceReact
      configuration={{
        spec: {
          url: 'https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml',
        },
      }}
    />
  )
}

export default App

Example

You can find an example in this repo under examples/react

Props

ApiReference only takes one prop which is the configuration object.

configuration: ReferenceProps

You can find the full configuration options under packages/api-reference.

Package Sidebar

Install

npm i @scalar/api-reference-react

Weekly Downloads

3,238

Version

0.1.92

License

MIT

Unpacked Size

5.62 MB

Total Files

208

Last publish

Collaborators

  • amritkahlon
  • scalar_geoff
  • mason-little
  • hwkr
  • tommastro
  • cameronrohani
  • hanspagel
  • marclave