Back to Home
Documentation for AI
Structured YAML documentation optimized for AI processing
When you provide these documents to AI assistants (Claude, GPT, Cursor):
- They learn accurate API usage
- They use correct import paths
- They generate type-safe code
Available Documents(17)
Document Format
YAML Structure
Uses a consistent YAML schema for easy AI parsing.
package:Package metadata
exports:Export paths and items
hooks:Hook API documentation
usage:Installation and usage examples
Example: @hua-labs/hua
yaml
# @hua-labs/hua - AI Documentation
# Version: 0.1.0-alpha.12
# Last Updated: 2026-01-12
package:
name: "@hua-labs/hua"
version: "0.1.0-alpha.12"
description: "Ship UX faster: UI + Motion + i18n, pre-wired"
category: "framework"
license: "MIT"
exports:
main:
path: "@hua-labs/hua"
provides:
- Button
- Card
- Badge
- Input
- Modal
- useTranslation
- useLanguageChange
framework:
path: "@hua-labs/hua/framework"
provides:
- HuaProvider
- useMotion
- useBranding
- SkipToContent
server:
path: "@hua-labs/hua/framework/server"
provides:
- getSSRTranslations
config:
path: "@hua-labs/hua/framework/config"
provides:
- defineConfig
- setConfig
usage:
installation:
command: "npm install @hua-labs/hua"
peer_dependencies:
- "react@>=18"
- "next@>=14"
basic_example: |
import { Button, useTranslation } from '@hua-labs/hua';
import { useMotion } from '@hua-labs/hua/framework';
function Component() {
const { t } = useTranslation();
const motion = useMotion({ type: 'fadeIn' });
return (
<div ref={motion.ref} style={motion.style}>
<Button>{t('click_me')}</Button>
</div>
);
}
hooks:
useMotion:
description: "Animation hook wrapping motion-core"
parameters:
- name: "options"
type: "UseMotionOptions"
required: true
properties:
- name: "type"
type: "EntranceType"
values: ["fadeIn", "slideUp", "slideDown", "scale"]
- name: "duration"
type: "number"
default: 300
- name: "delay"
type: "number"
default: 0
returns:
- name: "ref"
type: "RefObject"
- name: "style"
type: "CSSProperties"
- name: "start"
type: "() => void"
- name: "reset"
type: "() => void"
useTranslation:
description: "Translation hook for i18n"
returns:
- name: "t"
type: "(key: string) => string"
- name: "currentLanguage"
type: "string"
- name: "isLoading"
type: "boolean"
dependencies:
internal:
- "@hua-labs/ui"
- "@hua-labs/motion-core"
- "@hua-labs/i18n-core"
- "@hua-labs/i18n-core-zustand"
- "@hua-labs/state"
external:
- "react"
- "next"
- "zustand"
compatibility:
react: ">=18.0.0"
next: ">=14.0.0"
node: ">=18.0.0"
keywords:
- hua
- react
- framework
- ui
- motion
- i18n
- ssr
- next.jsUsing with AI
Provide this documentation to AI assistants for more accurate code generation.
Example prompt:
"Create a login page using this hua documentation: [paste YAML document]"Project Context Files:
Download from the "Project" tab above and place in your project root:
.cursor/rules/hua-framework.mdc — Cursor IDE rules.claude/project-context.md — Claude Code contextAGENTS.md — OpenAI Codex guideskills.md — Antigravity skillsai-context.md — General AI context (SSOT)