API Reference
Full Generated Prompt
How to inspect the exact ToonUI prompt generated from your active catalog.
The generated prompt depends on the active catalog.
Inspect it at runtime:
import { createToonProtocol } from '@toon-ui/core';
const toon = createToonProtocol({
components: ['text', 'card', 'button'],
});
console.log(toon.prompt);Do not copy a static prompt from the docs into production. Generate it from @toon-ui/core so it stays aligned with the components your app supports.
Prompt layers
The generated prompt includes:
- allowed components and variants
- catalog overview
- catalog coverage checklist
- canonical syntax rules
- interaction rules
- composition guidance
- form best practices
- fallback rules
- safety rules
- UI decision policy
- self-check rules
- valid/invalid examples