nuxt-http-client-hints

Nuxt HTTP Client Hints
15,811 25
Install
npm install nuxt-http-client-hints
Latest Version:0.0.2
Vue:3
License:MIT
Last Updated:Jun 15, 2025
Links: GitHub  ·  npm
Maintainer: danielroe

Nuxt HTTP Client Hints Module

npm version npm downloads JSDocs License Nuxt

Access and use HTTP Client Hints in your Nuxt application. Detect the client browser and the operating system on your server.

Open in StackBlitz

Features

HTTP Client hints

[!WARNING] The HTTP Client hints headers listed below are still in draft and only Chromium based browsers support them: Chrome, Edge, Chromium and Opera.

The module includes support for the following HTTP Client hints:

Quick Setup

Install the module to your Nuxt application with one command:

npx nuxi module add nuxt-http-client-hints

Add your configuration to your Nuxt config file:

httpClientHints: {
  // Your configuration here
}

Add your client and server plugins to your Nuxt application and register the corresponding hooks with your configuration:

// my-plugin.client.js
export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.hook('http-client-hints:client-hints', (httpClientHints) => {
    // Your client logic here
  })
})
// my-plugin.server.js
export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.hook('http-client-hints:ssr-client-hints', (httpClientHints) => {
    // Your server logic here
  })
})

You use the httpClientHints object in your application to access the configuration:

<!-- SomeComponent.vue -->
<template>
  <pre>{{ $httpClientHints }}"</pre>
</template>

or in your modules, composables, or other plugins:

// my-module.js
const clientHints = useNuxtApp().$httpClientHints

That's it! You can now use HTTP Client Hints in your Nuxt app ✨

You can check the source code or the JSDocs for more information.

Contribution

# Install dependencies
pnpm install

# Generate type stubs
pnpm dev:prepare

# Develop with the playground
pnpm dev

# Build the playground
pnpm dev:build

# Run ESLint
pnpm lint

# Run Vitest
pnpm test
pnpm test:watch

License

MIT License © 2024-PRESENT Joaquín Sánchez

Related Packages

vue-browser-detect-plugin

Simple browser detection plugin for Vue.

192,246
@bubblesortt/nuxt-es-toolkit

Es-toolkit auto import module for Nuxt

15,810 9
nuxt-permissions

Nuxt 3 module for permission management

14,912 58
@mevbg/nuxt-kit

Mev’s personal Nuxt kit module.

3,504 0
nuxt-permission-check

Nuxt 3 module for permission based access control

2,329 15

Version History

Version Released License
0.0.2 MIT
0.0.1 MIT