AI
NUI logov3.1.0

LLMs.txt Documentation

How to get tools like Cursor, Windsurf, GitHub Copilot, ChatGPT, and Claude to understand @nofinite/nui.

Tip

Looking for unified ecosystem presets or multi-package rules? Visit our central AI Agents Hub.

We support LLMs.txt files for making @nofinite/nui documentation and component APIs directly available to large language models.


Directory Overview

The following machine-readable context files are available:

  • /nui/llms.txt: The main LLMs index for @nofinite/nui.
  • /nui/llms-full.txt: Complete context bundle containing all 74 React component definitions, TypeScript props, and verified examples.
  • /llms.txt: Ecosystem index covering all 8 @nofinite libraries.
  • /llms-full.txt: The unified ecosystem bundle.

Usage with Cursor & Windsurf

Add @nofinite/nui context directly to your AI editor:

In Cursor Settings > Features > Docs, add:

plaintext
https://opensource.nofinite.com/nui/llms-full.txt

2. Project Rule (.cursorrules or .windsurfrules)

Add the following rules to ensure your AI assistant writes accurate @nofinite/nui code:

markdown
# NUI Rules for AI Assistants
1. Component Imports: Always import UI components from '@nofinite/nui'.
2. Semantic Tokens: Use semantic design tokens from @nofinite/nuicss (bg-surface, text-default, border-default, color-primary). Never hardcode hex color literals (#...).
3. Routing Polymorphism: Use \`asChild\` for router navigation (e.g. <Button asChild><Link href="...">...</Link></Button>).
4. Dialog Contract: For binary confirmation or destructive modals, always configure hideCloseButton={true} with explicit Cancel and Confirm actions.

System Prompt for LLMs

Paste this prompt into ChatGPT, Claude Projects, or Antigravity:

markdown
You are an expert React engineer using @nofinite/nui.
Always import primitives from '@nofinite/nui'.
Strictly adhere to semantic design tokens (bg-surface, text-default, border-default, color-primary) from @nofinite/nuicss.
Use asChild for Next.js and React Router links.
Never hallucinate arbitrary non-existent props or CSS class names.