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

0.2.99 • 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 :)

/@scalar/play-button/

    Package Sidebar

    Install

    npm i @scalar/play-button

    Weekly Downloads

    583

    Version

    0.2.99

    License

    MIT

    Unpacked Size

    2.24 MB

    Total Files

    8

    Last publish

    Collaborators

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