shadimage
nuqs
itemnext-typed-linkssource: ok · refreshed

Typed Links for Next.js

Type-safe linking for Next.js (using typedRoutes + nuqs)

npx shadcn add "https://nuqs.dev/r/next-typed-links.json"
free

No selection tags yet — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light
next@>=15.5.0nuqs

Files1 · source cached 10/8/2026, 3:46:46 AM

src/lib/typed-links.ts
import type { Route } from 'next'
import {
  createSerializer,
  type CreateSerializerOptions,
  type ParserMap
} from 'nuqs/server'

export function createTypedLink<Parsers extends ParserMap>(
  route: Route,
  parsers: Parsers,
  options: CreateSerializerOptions<Parsers> = {}
) {
  const serialize = createSerializer<Parsers, Route, Route>(parsers, options)
  return serialize.bind(null, route)
}

More from nuqs

Browse all components in this library →