Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@scalar/use-modal

scalar14.6kMITdeprecated0.3.3TypeScript support: included

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

modals for Vue

composable, modals, vue, vue3

readme

CI Contributors GitHub License Twitter Discord Scalar App

Scalar

<picture> <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/b391b82f-d993-4e97-8a17-1c3c7ccbb19b"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/579d0853-b2a5-4ea8-b2bd-a98753faeaf3"> Scalar API client </picture> <picture> <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/9b639f2d-0204-4b15-b918-158072a9afa5"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/be723d07-ec9c-4edb-b657-05a8bc05c7d6"> Scalar API Reference </picture>

An offline first API Client built for OpenAPI

└ Minimal, powerful & open-source
└ Integrates with dozens of API Frameworks (Elysia, Hono, FastAPI, etc)
└ Syncs directly with your server frameworks with our Watch Mode
└ First class OpenAPI (formerly Swagger) support
└ Environment variables and dynamic parameters
└ Save and organize requests into collections
Download (Windows, MacOS, Linux)
Try Online Demo

Interactive API Reference from OpenAPI/Swagger

└ Uses OpenAPI/Swagger documents
└ Request examples for many favorite languages and frameworks
└ Comes with an integrated API playground
└ Integrates with your favorite framework
└ Doesn't look like 2011
Try Demo

Trusted by:


<picture> <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/73dcef95-fc4f-4111-bb09-f3ce37453a81#gh-light-mode-only"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/c792c977-8551-432c-9417-3ea05e408151#gh-dark-mode-only"> Scalar API client </picture> <picture> <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/1da6b904-34be-4760-b535-0dd2160e6d12#gh-light-mode-only"> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/54a9ea69-c50a-4f49-8c3e-ddd6f8fbe1f3#gh-dark-mode-only"> Scalar API client </picture>

Quickstart

You're just one HTML file away from having an awesome API reference:

<!doctype html>
<html>
  <head>
    <title>Scalar API Reference</title>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1" />
  </head>

  <body>
    <div id="app"></div>

    <!-- Load the Script -->
    <script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>

    <!-- Initialize the Scalar API Reference -->
    <script>
      Scalar.createApiReference('#app', {
        // The URL of the OpenAPI/Swagger document
        url: 'https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.json',
        // Avoid CORS issues
        proxyUrl: 'https://proxy.scalar.com',
      })
    </script>
  </body>
</html>

Need a Custom Header? Check out this example: https://codepen.io/scalarorg/pen/VwOXqam

And there's an ever-growing list of plugins and integrations:

Integrations

Built-in Support

The following frameworks have chosen Scalar API Reference as their default OpenAPI documentation UI, recognizing its developer-friendly features and modern design:


Managed Hosting

We're offering a free and paid managed hosting on the edge, too:

  • Write your API documentation and publish your API references (free)
  • Get SSL and a super cool *.apidocumentation.com subdomain (free)
  • Write free text documentation (paid)
  • Collaborate with your whole team (paid)
  • Use any domain (paid)

Ready? Create your account on scalar.com.


Projects

Project Description
Scalar API Client API client
Scalar CLI Command-line interface
Scalar Galaxy OpenAPI Example
Scalar Mock Server OpenAPI Mock Server
Scalar Void Server HTTP Request Mirror
Scalar Open API Parser OpenAPI SDK
Scalar Sandbox Online OpenAPI Editor

Documentation

Topic Description
Themes Predefined themes, layouts & styling
Configuration The universal configuration object
Plugins Extend the functionality
OpenAPI OpenAPI and our extensions to it
Markdown The supported Markdown syntax

Community

We are API nerds. You too? Let's chat on Discord: https://discord.gg/scalar


Contributions

Contributions are welcome! Read the CONTRIBUTING guide.

Top 10 Contributors (April 2025)



Top Contributors (All Time)

hanspagel
hanspagel
amritk
amritk
xC0dex
xC0dex
antlio
antlio
marclave
marclave
hwkr
hwkr
cameronrohani
cameronrohani
tmastrom
tmastrom
geoffgscott
geoffgscott
inyourtime
inyourtime
DemonHa
DemonHa
bgrcs
bgrcs
Amorim33
Amorim33
ahmedrangel
ahmedrangel
ivanagas
ivanagas
Mason-Little
Mason-Little
adjsky
adjsky
matthyk
matthyk
RemcoGoy
RemcoGoy
mcollina
mcollina
mpminardi
mpminardi
nsychev
nsychev
Mohib834
Mohib834
lc-soft
lc-soft
fuma-nama
fuma-nama
Edgaraszs
Edgaraszs
ATREAY
ATREAY
yshrsmz
yshrsmz
hex0id
hex0id
soulchild
soulchild
x-delfino
x-delfino
ykdojo
ykdojo
timheuer
timheuer
SebastianBienert
SebastianBienert
mouhannad-sh
mouhannad-sh
mason-at-pieces
mason-at-pieces
luc122c
luc122c
handrews
handrews
gsmcdonald
gsmcdonald
federicobond
federicobond
WDaan
WDaan
Duncanma
Duncanma
hrynevychroman
hrynevychroman
rpmccarter
rpmccarter
rmp135
rmp135
STP5940
STP5940
captainsafia
captainsafia
realsama
realsama
dotfortun
dotfortun
smoores-dev
smoores-dev
soGit
soGit
sinh117801
sinh117801
stratosblue
stratosblue
rbange
rbange
rickihastings
rickihastings
petercinibulk
petercinibulk
Olexandr88
Olexandr88
malinbranduse
malinbranduse
mvt147
mvt147
MaxBreida
MaxBreida
MarioGK
MarioGK
ShadiestGoat
ShadiestGoat
sanscontext
sanscontext
kyllian
kyllian
KiARC
KiARC
jlnslv
jlnslv
Huliiiiii
Huliiiiii
unnoq
unnoq
tsiwek-piwik
tsiwek-piwik
dunklesToast
dunklesToast
o-az
o-az
kwaichanz
kwaichanz
g-airey
g-airey
ga1az
ga1az
FotieMConstant
FotieMConstant
danwithabox
danwithabox
WilliamBonvini
WilliamBonvini
bsdayo
bsdayo
Chinlinlee
Chinlinlee
bingbeann
bingbeann
rolldeep-stepmerrily
rolldeep-stepmerrily
Wolf-Syndrome
Wolf-Syndrome
wilcoschoneveld
wilcoschoneveld
rotciw
rotciw
Ma-ve
Ma-ve
Mai0313
Mai0313
Courtcircuits
Courtcircuits
rektdeckard
rektdeckard
thibaultleouay
thibaultleouay
yokeTH
yokeTH
darekaze
darekaze
danp
danp
danjohnson95
danjohnson95
yungwarlock
yungwarlock
ClanEver
ClanEver
chrislearn
chrislearn
chadwhitacre
chadwhitacre
carstenlebek
carstenlebek
cactysman
cactysman
brunogrcsada
brunogrcsada
brianheineman
brianheineman
Borisich
Borisich
bdpiprava
bdpiprava
BenJeau
BenJeau
saithis
saithis
zsilbi
zsilbi
arthurfiorette
arthurfiorette
arashsheyda
arashsheyda
sigpwned
sigpwned
gizero
gizero
alewin
alewin
slash686
slash686
ahmadi-akbar
ahmadi-akbar
MathurAditya724
MathurAditya724
abdulamite
abdulamite
IHIutch
IHIutch
jonataw
jonataw
Jannchie
Jannchie
jwangnz
jwangnz
Jefwillems
Jefwillems
TheVaan
TheVaan
JacobCoffee
JacobCoffee
kevinand11
kevinand11
IceyWu
IceyWu
iagobalmeida
iagobalmeida
hpmouton
hpmouton
CJHwong
CJHwong
HelgeSverre
HelgeSverre
Hamidrzash
Hamidrzash
GreyXor
GreyXor
Fdawgs
Fdawgs
filiabel
filiabel
facus26
facus26
emmanuel-ferdman
emmanuel-ferdman
elliott-with-the-longest-name-on-github
elliott-with-the-longest-name-on-github
elliotnash
elliotnash
DmitriiKhudiakov
DmitriiKhudiakov
diegolopes
diegolopes
untiny
untiny
lundibundi
lundibundi

changelog

@scalar/use-modal

0.3.3

Patch Changes

  • 45dc04b: fix: can’t release packages

0.3.2

Patch Changes

  • 05e2e27: chore: add provenance statement

0.3.1

Patch Changes

  • 07211ad: chore: added new lint rule for type importing for better perf

0.3.0

Minor Changes

  • 0e64a36: refactor: rename all --theme-_ variables to --scalar-_

Patch Changes

  • 22f2858: chore: ran syncpack to update packages

0.2.10

Patch Changes

  • e6d1b81: fix: modal content history header

0.2.9

Patch Changes

  • ef3a015: chore: update to typescript 5.4

0.2.8

Patch Changes

  • 1669b27: chore: update dependencies

0.2.7

Patch Changes

  • c6b95ca: chore: upgrade from Vite 4 to Vite 5

0.2.6

Patch Changes

  • 3ade0d1: feat: add scalar-modal-class

0.2.5

Patch Changes

  • 5b3f7d9: fix: updated scroll region padding to for chrome update

0.2.4

Patch Changes

  • 92a8b9f: chore: update dependencies

0.2.3

Patch Changes

  • 81543f42: chore: add support for Node 18

0.2.2

Patch Changes

  • 5ca138ee: - Removed activeBreadCrumb from api-client as its available in the slot
    • Centralized navigation logic
    • use proper anchor navigation instead of scrollIntoView, it will also be saved to history
    • scrolling down will open the next section

0.2.1

Patch Changes

  • a1319e8b: Switched internal component library to use ScalarComponents instead

0.2.0

Minor Changes

  • f38bb61: chore: remove swagger editor tabs

0.1.9

Patch Changes

  • 35dffe4: chore: include @scalar dependencies in the bundle

0.1.8

Patch Changes

  • c3b215f: chore: no pinned peer dependency versions

0.1.7

Patch Changes

  • 55246e5: chore: rewrite all package.jsons (including their prod, dev and peer dependency requirements)

0.1.6

Patch Changes

  • dab853a: chore: remove unused dependencies

0.1.5

Patch Changes

  • b0835a2: users not using themed css fallbacks

0.1.4

Patch Changes

  • 1cbcabd7: lots of amazing fixes from when we missed last patch

0.1.3

Patch Changes

  • 7b6c21e5: request history ui and some other small type changes

0.1.2

Patch Changes

  • b76f4d1e: Reference search + some app hover states

0.1.1

Patch Changes

  • 449305f4: marketing content section
  • 3e912c75: getting started page design
  • 048555c6: feat: add CHANGELOG.md to the package