formily-antd_skill

This skill helps you integrate Formily with Ant Design efficiently, enabling schema-driven layouts, validation, and component wiring in TypeScript projects.
  • TypeScript

10

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill whinc/my-claude-plugins --skill formily-antd

  • SKILL.md15.1 KB

Overview

This skill documents how to integrate Formily with Ant Design components using TypeScript. It covers installation, schema-driven forms, layout patterns, common component usage, validation, and advanced patterns like dynamic sections and array fields. The content focuses on practical examples and code patterns to build robust Ant Design forms with Formily.

How this skill works

The skill explains how to create a Formily form instance, register Ant Design components via createSchemaField, and render schema-driven UIs inside Ant Design Form containers. It shows layout techniques (grid, tabs), common component wrappers (Input, Select, DatePicker, Switch, Slider), validation rules, and form actions such as submit and reset. Advanced patterns include dynamic fields via effects and array fields using ArrayCards.

When to use it

  • You want schema-driven forms with Ant Design UI and Formily state/validation.
  • You need consistent layout patterns: label/wrapper, grid columns, or tabbed sections.
  • You require built-in and custom validation with friendly messages.
  • You need dynamic form behavior (show/hide fields, conditional sections).
  • You must support repeatable groups or arrays of entries (contacts, items).

Best practices

  • Register only the Ant Design components you use in createSchemaField to keep bundle size small.
  • Keep validation rules in the schema to separate concerns and enable reuse.
  • Use FormProvider and a single form instance when multiple components share state.
  • Prefer schema-driven patterns for repetitive fields and ArrayCards for lists.
  • Use layout components (Row/Col, Tabs) from Ant Design to control responsive behavior.

Example use cases

  • A user registration form with inputs, password, and email validation implemented in the schema.
  • An admin settings page with tabs for basic and advanced options using SchemaField inside Tabs.
  • A profile editor using DatePicker for birth date and Select for timezone with showSearch enabled.
  • A dynamic resume form that shows experience details only when the user checks a flag.
  • An emergency contacts section implemented as an array with add/remove via ArrayCards.

FAQ

Add x-validator entries in the schema or supply custom validator functions; messages live in the schema for clarity.

Can I use Ant Design layout props like labelCol and wrapperCol?

Yes. Pass labelCol and wrapperCol to the Form component or to Form.Item wrappers to control label and control widths.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational