Getting Started
Remix is a full-stack TypeScript framework for building web applications on web standards. This reference documents every public export, grouped by the package you import it from.
New to Remix? Start with the guides, then come back here for the details of a specific API.
Installation
npm i remixTo create a new app, run:
npx remix new my-remix-appImports
Remix ships as one remix package, and each feature has its own import path:
import { createRouter } from 'remix/router'
import { route } from 'remix/routes'
import { css } from 'remix/component'The sidebar follows those import paths. data-table is remix/data-table, and its data-table/postgres heading is remix/data-table/postgres. Each package also works on its own, outside of a Remix app.
Remix UI is the exception. It's versioned separately and imported from @remix-run/ui/*.
Packages
Routing and requests
router: handle requests with routes, controllers and middleware on the Fetch APIroutes: define typed route maps for routers, links and formsroute-pattern: match and generate URLs with strong typingmiddleware: sessions, auth, CSRF, CORS, compression, static files, logging and moreresponse: helpers for HTML, file, redirect and compressed responsesheaders: typed classes for parsing and building HTTP headerscookie: type-safe cookie parsing and serialization, with signingfetch-proxy: forward requests to another servernode-fetch-server: run a Fetch API handler on Node's HTTP server
UI
component: components that render on the server and hydrate in the browserui: headless, accessible UI primitives and animation utilitiesspa: client-rendered application routingassets: compile browser JavaScript, TypeScript and CSS on demandhtml-template: HTML template literals with automatic escapingcomponent-hmr: hot module replacement for componentsmultiple-import-maps-polyfill: support import maps added after the page loads
Data and validation
data-schema: tiny, standards-aligned schema validationdata-table: typed relational queries and migrations for MySQL, PostgreSQL and SQLite
Sessions and auth
session: server-side session managementsession-storage: cookie, filesystem, memory, Memcache and Redis session storageauth: credential, OAuth and OIDC login flows
Files and uploads
form-data-parser: stream file uploads instead of buffering them in memorymultipart-parser: fast streaming multipart parsingfile-storage: key/value storage forFileobjects, on disk, in memory or in S3lazy-file: lazy, streamingBlobandFileobjectsfs: read local files as lazy, streamingFileobjectsmime: MIME type detection and content-type helperstar-parser: streaming tar archive parsing
Tooling and testing
cli: theremixcommand for creating apps, running migrations, listing routes and running teststest: a test framework for JavaScript and TypeScriptassert:node:assert-compatible assertions and anexpectAPI for any environmentnode-tsx: run Node.js with TypeScript and JSX supportnode-hmr: run Node.js apps with hot module reloadingterminal: ANSI styles and output helpers for command-line tools