Formily Ant Design Components
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user asks to "use formily with ant design", "formily antd components", "formily ant design integration", "formily form…
Об этом скилле
Formily Ant Design Components
This skill provides comprehensive guidance for integrating Formily with Ant Design components. Focus on form layouts, field components, validation, and common patterns when using Formily with Ant Design in TypeScript.
Installation
Install Formily Ant Design packages:
npm install @formily/antd @formily/core @formily/react
npm install antd
Install required types for TypeScript:
npm install -D @types/react @types/react-dom
Basic Setup
Configure Formily with Ant Design:
import React from 'react'
import { createForm } from '@formily/core'
import { FormProvider, createSchemaField } from '@formily/react'
import { Form, FormItem, Input, Select, DatePicker } from '@formily/antd'
// Create schema field component
const SchemaField = createSchemaField({
components: {
Form,
FormItem,
Input,
Select,
DatePicker
}
})
// Create form instance
const form = createForm()
Form Layout Patterns
Basic Form Layout
import { Form } from '@formily/antd'
const BasicForm = () => {
return (
<Form form={form} labelCol={6} wrapperCol={16}>
{/* Form fields */}
</Form>
)
}
Grid Layout
import { Form } from '@formily/antd'
import { Row, Col } from 'antd'
const GridLayout = () => {
return (
<Form form={form}>
<Row gutter={16}>
<Col span={12}>
<SchemaField name="firstName">
<FormItem label="First Name">
<Input placeholder="Enter first name" />
</FormItem>
</SchemaField>
</Col>
<Col span={12}>
<SchemaField name="lastName">
<FormItem label="Last Name">
<Input placeholder="Enter last name" />
</FormItem>
</SchemaField>
</Col>
</Row>
</Form>
)
}
Tabs Layout
import { Form } from '@formily/antd'
import { Tabs } from 'antd'
const { TabPane } = Tabs
const TabsLayout = () => {
return (
<Form form={form}>
<Tabs defaultActiveKey="basic">
<TabPane tab="Basic Info" key="basic">
<SchemaField name="name">
<FormItem label="Name">
<Input />
</FormItem>
</SchemaField>
</TabPane>
<TabPane tab="Advanced" key="advanced">
<SchemaField name="settings">
<FormItem label="Settings">
<Input />
</FormItem>
</SchemaField>
</TabPane>
</Tabs>
</Form>
)
}
Common Ant Design Components
Input Components
// Text Input
<SchemaField name="username">
<FormItem label="Username">
<Input
placeholder="Enter username"
prefix={<UserOutlined />}
/>
</FormItem>
</SchemaField>
// Password Input
<SchemaField name="password">
<FormItem label="Password">
<Input.Password
placeholder="Enter password"
visibilityToggle
/>
</FormItem>
</SchemaField>
// Textarea
<SchemaField name="description">
<FormItem label="Description">
<Input.TextArea
rows={4}
placeholder="Enter description"
showCount
maxLength={500}
/>
</FormItem>
</SchemaField>
Select Components
// Basic Select
<SchemaField name="country">
<FormItem label="Country">
<Select placeholder="Select country">
<Select.Option value="us">United States</Select.Option>
<Select.Option value="uk">United Kingdom</Select.Option>
<Select.Option value="ca">Canada</Select.Option>
</Select>
</FormItem>
</SchemaField>
// Multi Select
<SchemaField name="skills">
<FormItem label="Skills">
<Select
mode="multiple"
placeholder="Select skills"
options={[
{ label: 'JavaScript', value: 'js' },
{ label: 'TypeScript', value: 'ts' },
{ label: 'React', value: 'react' }
]}
/>
</FormItem>
</SchemaField>
// Searchable Select
<SchemaField name="city">
<FormItem label="City">
<Select
showSearch
placeholder="Search city"
filterOption={(input, option) =>
option?.children.toLowerCase().includes(input.toLowerCase())
}
>
<Select.Option value="nyc">New York</Select.Option>
<Select.Option value="la">Los Angeles</Select.Option>
<Select.Option value="chi">Chicago</Select.Option>
</Select>
</FormItem>
</SchemaField>
Date and Time Components
import { DatePicker, TimePicker, RangePicker } from '@formily/antd'
// Date Picker
<SchemaField name="birthDate">
<FormItem label="Birth Date">
<DatePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
/>
</FormItem>
</SchemaField>
// Date Range Picker
<SchemaField name="dateRange">
<FormItem label="Date Range">
<RangePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
/>
</FormItem>
</SchemaField>
// Time Picker
<SchemaField name="appointmentTime
Установить Formily Ant Design Components в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Formily Ant Design Components?
This skill should be used when the user asks to "use formily with ant design", "formily antd components", "formily ant design integration", "formily form layout", "formily form.item", "formily antd forms", or "integrate formily with ant design".
Как установить скилл Formily Ant Design Components?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Formily Ant Design Components запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic