Elysia is designed to be modular and lightweight. Rather than bundling everything into the core, official plugins cover the most common patterns so you only include what your project actually needs. Each plugin is installed as a separate package and registered on your Elysia instance withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/elysiajs/documentation/llms.txt
Use this file to discover all available pages before exploring further.
.use().
Installing plugins
All official plugins follow the same installation pattern:.use():
Official plugins
OpenAPI
Auto-generate interactive API documentation from your TypeScript types and route definitions using Scalar or Swagger UI.
CORS
Configure Cross-Origin Resource Sharing with fine-grained control over origins, methods, headers, and credentials.
JWT
Sign and verify JSON Web Tokens in handlers. Supports multiple algorithms and integrates with cookies or headers.
Bearer
Extract the Bearer token from incoming Authorization headers and make it available in your route handlers.
Static
Serve static files and entire directories. Supports prefix configuration, custom headers, and index HTML fallback.
HTML
Return JSX or raw HTML strings from handlers with automatic Content-Type headers and doctype injection.
Cron
Schedule recurring background tasks using cron expressions. Access and stop jobs from route handlers via the store.
OpenTelemetry
Instrument your Elysia app with distributed tracing. Automatically collects spans from compatible libraries.
Looking for community plugins? The Elysia ecosystem includes community-maintained plugins for OAuth2, rate limiting, logging, i18n, and many more use cases.