Leafer AI

May 26, 2026 · View on GitHub

English | 简体中文


Leafer AI

This repository provides usage examples and documentation of LeaferJS for AI systems, making it easier to generate and understand code. It includes examples, tutorials, API references, plugin documentation, and source code.

LeaferJS

Please note that LeaferJS can be abbreviated as Leafer. Start by reading the LeaferJS introduction.

Directory Structure

  • examples/ Standalone, runnable examples demonstrating various features of LeaferJS. This is the primary source for AI to learn usage patterns and best practices.

  • guide/ Quick start and step-by-step tutorials covering common use cases, including app creation, graphics, interaction, and animation.

  • reference/ API reference and detailed documentation.

  • plugin/ Documentation for LeaferJS plugins and extensions.

  • src/ Core TypeScript source code of LeaferJS, useful for understanding class structures and types.

  • update/ Changelog and version history (optional for AI to read).

AI Usage Guidelines

When generating LeaferJS code:

  1. Prioritize simple examples in examples/.
  2. Refer to guide/ and reference/ for patterns and API usage.

Run Code Online

Example Prompt

Prompt: Create a draggable rectangle using Leafer.

Use Directly as Skills

Download and extract this repository locally, then rename it to leafer-skills.

You can place it directly into the skills directory of tools such as Claude, Codex, etc.