@scalar/play-button
TypeScript icon, indicating that this package has built-in type declarations

0.2.13 • Public • Published

Scalar Play Button

Have your own custom docs and want API testing built in? Check out our new release Scalar ▶️ Button which brings up Scalar's simple API Client for you to play around with an endpoint right away

Installation and Usage

Add the Scalar Play Button to your page

    <script
      id="scalar-play-button-script"
      data-url="https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.yaml"></script>
    <script src="https://cdn.jsdelivr.net/npm/@scalar/play-button"></script>

then add a button with the class and optional scalar-operation-id

    <button
      scalar-operation-id="getPetById"
      class="scalar-play-button">Try it Out</button>

Now when that button is clicked the Scalar API Client will open up :)

Readme

Keywords

none

Package Sidebar

Install

npm i @scalar/play-button

Weekly Downloads

500

Version

0.2.13

License

MIT

Unpacked Size

1.78 MB

Total Files

8

Last publish

Collaborators

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