API Reference

Module options, the public composables and the machine-readable surface this site publishes.

The module's public surface is small on purpose. Everything else is Nuxt UI and Motion for Vue composed underneath.

Module options

OptionTypeDefaultWhat it does
prefixstring'M'Component name prefix. { prefix: 'Motion' } registers <MotionRetroGrid> instead of <MRetroGrid>.

Set under motionBlock in nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/ui', 'motion-v/nuxt', 'nuxt-motion-block'],
  motionBlock: { prefix: 'M' },
})

Composables

All auto-imported; see Composables for usage.

ComposableSignatureWhat it does
useMotionBlockUI({ name, props, theme }) => ({ props, ui })Merges a component's tv theme with your app.config.ts ui.<name> overrides, in Nuxt UI's precedence order.
useThemeColor(options?: { target?: HTMLElement | (() => HTMLElement | undefined), fallback?: string }) => Ref<string | null>SSR-safe theme color resolution. Literals pass through; tokens become var(--ui-*) on the server.
useCanvasCursor(canvasRef: Ref<HTMLCanvasElement>, options?: { color?: string }) => voidWave-trail pointer effect; owns the frame loop and cancels it on unmount.
useFluidCursor(canvasRef: Ref<HTMLCanvasElement>, options?: { color?: string }) => voidWebGL fluid simulation bound to a canvas.

Machine-readable surface

What this site publishes for agents:

  • /llms.txt - the index of every page, one line each.
  • /llms-full.txt - the full documentation concatenated as markdown.
  • /raw/<path>.md - the source markdown for any page; the same content /components/... serves as HTML.
  • /sitemap.md and /sitemap.xml - the site map in markdown and XML.
  • /openapi.json - an OpenAPI description of this site's endpoints.

Stdio MCP server

npx nuxt-motion-block-mcp runs the server locally; it exposes two read-only tools, list-pages and get-page. Setup for common agents is in AI Agents.

Next steps