Installation
Requirements
routekit requires Node 18+ for development and a browser that supports the History API (every browser since 2014). It works with any frontend renderer — React, Preact, Solid, Vue, or vanilla.
Install
npm install routekitpnpm add routekitbun add routekityarn add routekitroutekit ships ESM and CJS bundles plus full TypeScript declarations. There is no peer dependency on a UI framework.
Verify the install
Create a tiny test file in your project:
import { createRouter } from 'routekit';
const r = createRouter([{ path: '/', handler: () => 'ok' }]);console.log(r.match('/')); // → { handler: …, params: {} }Run it with your runner of choice. If you see { handler: ..., params: {} }, the install is good.
Next steps
Continue to the quickstart for a working router in 10 lines, or jump to your first route for a deeper walkthrough.