[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JB1H0E2737ZT5CAW4EDBJW":3,"skill-same:01M6JB1H0E2737ZT5CAW4EDBJW":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6JB1H0E2737ZT5CAW4EDBJW","delon-form-dynamic-schema-forms",null,"Create dynamic schema-based forms using @delon\u002Fform (SF component). Use this skill when building complex forms with validation, conditional rendering, async data loading, custom widgets, and multi-step workflows. Ensures forms follow JSON Schema standards, integrate with Angular reactive forms, support internationalization, and maintain consistent validation patterns across the application.","superhealth\u002Fskills-hub","superhealth","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6292112?v=4","01M6JA6E7F21BYK5W3E4P270TT","01M6JA6EC0W8MPHKDJVBZDSEZ0",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002F7spade\u002Fdelon-form-dynamic-schema-forms\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"delon form dynamic schema forms","form","schema","forms","async","loading","rendering","widgets","across","maintain","patterns","support","standards","integrate","angular","data","create","json schema","component","workflows","2026-11-10 10:12:30",false,"---\nname: delon-form-dynamic-schema-forms\ndescription: \"Create dynamic schema-based forms using @delon\u002Fform (SF component). Use this skill when building complex forms with validation, conditional rendering, async data loading, custom widgets, and multi-step workflows. Ensures forms follow JSON Schema standards, integrate with Angular reactive forms, support internationalization, and maintain consistent validation patterns across the application.\"\nlicense: \"MIT\"\n---\n\n# @delon\u002Fform Dynamic Schema Forms Skill\n\nThis skill helps create dynamic forms using @delon\u002Fform's SF (Schema Form) component.\n\n## Core Principles\n\n### Schema-Driven Forms\n- **JSON Schema**: Define forms declaratively with JSON Schema\n- **Type Safety**: Full TypeScript support for schema definitions\n- **Validation**: Built-in validation with custom validators\n- **Dynamic Rendering**: Conditional fields based on form state\n\n### Key Features\n- Automatic form generation from schema\n- Custom widgets for specialized inputs\n- Async data loading (dropdowns, autocomplete)\n- Multi-step forms (wizards)\n- Responsive grid layouts\n- Internationalization support\n\n## Basic Schema Form\n\n```typescript\nimport { Component, signal, output } from '@angular\u002Fcore';\nimport { SFSchema, SFComponent, SFUISchema } from '@delon\u002Fform';\nimport { SHARED_IMPORTS } from '@shared';\n\n@Component({\n  selector: 'app-user-form',\n  standalone: true,\n  imports: [SHARED_IMPORTS, SFComponent],\n  template: `\n    \u003Csf \n      [schema]=\"schema\"\n      [ui]=\"ui\"\n      [formData]=\"initialData()\"\n      [loading]=\"loading()\"\n      (formSubmit)=\"handleSubmit($event)\"\n      (formChange)=\"handleChange($event)\"\n      (formError)=\"handleError($event)\"\n    \u002F>\n  `\n})\nexport class UserFormComponent {\n  loading = signal(false);\n  initialData = signal\u003Cany>({});\n  formSubmit = output\u003Cany>();\n  \n  schema: SFSchema = {\n    properties: {\n      name: {\n        type: 'string',\n        title: 'Full Name',\n        maxLength: 100\n      },\n      email: {\n        type: 'string',\n        title: 'Email',\n        format: 'email'\n      },\n      age: {\n        type: 'number',\n        title: 'Age',\n        minimum: 18,\n        maximum: 120\n      },\n      role: {\n        type: 'string',\n        title: 'Role',\n        enum: ['admin', 'member', 'viewer'],\n        default: 'member'\n      }\n    },\n    required: ['name', 'email', 'role']\n  };\n  \n  ui: SFUISchema = {\n    '*': {\n      spanLabel: 6,\n      spanControl: 18,\n      grid: { span: 24 }\n    },\n    $name: {\n      placeholder: 'Enter full name',\n      widget: 'string'\n    },\n    $email: {\n      placeholder: 'user@example.com',\n      widget: 'string'\n    },\n    $age: {\n      widget: 'number'\n    },\n    $role: {\n      widget: 'select',\n      placeholder: 'Select role'\n    }\n  };\n  \n  handleSubmit(value: any): void {\n    console.log('Form submitted:', value);\n    this.formSubmit.emit(value);\n  }\n  \n  handleChange(value: any): void {\n    console.log('Form changed:', value);\n  }\n  \n  handleError(errors: any): void {\n    console.error('Form errors:', errors);\n  }\n}\n```\n\n## Common Widgets\n\n### String Input\n```typescript\n{\n  name: {\n    type: 'string',\n    title: 'Name',\n    ui: {\n      widget: 'string',\n      placeholder: 'Enter name',\n      prefix: 'User',\n      suffix: '@',\n      maxLength: 100\n    }\n  }\n}\n```\n\n### Textarea\n```typescript\n{\n  description: {\n    type: 'string',\n    title: 'Description',\n    ui: {\n      widget: 'textarea',\n      autosize: { minRows: 3, maxRows: 6 },\n      placeholder: 'Enter description'\n    }\n  }\n}\n```\n\n### Number Input\n```typescript\n{\n  amount: {\n    type: 'number',\n    title: 'Amount',\n    minimum: 0,\n    maximum: 1000000,\n    ui: {\n      widget: 'number',\n      precision: 2,\n      prefix: '$',\n      formatter: (value: number) => `$ ${value}`.replace(\u002F\\B(?=(\\d{3})+(?!\\d))\u002Fg, ',')\n    }\n  }\n}\n```\n\n### Date Picker\n```typescript\n{\n  birthDate: {\n    type: 'string',\n    title: 'Birth Date',\n    format: 'date',\n    ui: {\n      widget: 'date',\n      mode: 'date',\n      displayFormat: 'yyyy-MM-dd',\n      end: 'today' \u002F\u002F Can't select future dates\n    }\n  }\n}\n```\n\n### Date Range\n```typescript\n{\n  dateRange: {\n    type: 'string',\n    title: 'Date Range',\n    ui: {\n      widget: 'date',\n      mode: 'range',\n      displayFormat: 'yyyy-MM-dd'\n    }\n  }\n}\n```\n\n### Select Dropdown\n```typescript\n{\n  category: {\n    type: 'string',\n    title: 'Category',\n    enum: [\n      { label: 'Technology', value: 'tech' },\n      { label: 'Business', value: 'business' },\n      { label: 'Science', value: 'science' }\n    ],\n    ui: {\n      widget: 'select',\n      placeholder: 'Select category',\n      allowClear: true,\n      showSearch: true\n    }\n  }\n}\n```\n\n### Multi-Select\n```typescript\n{\n  tags: {\n    type: 'array',\n    title: 'Tags',\n    items: {\n      type: 'string',\n      enum: ['angular', 'react', 'vue', 'typescript']\n    },\n    ui: {\n      widget: 'select',\n      mode: 'multiple',\n      placeholder: 'Select tags'\n    }\n  }\n}\n```\n\n### Autocomplete\n```typescript\n{\n  city: {\n    type: 'string',\n    title: 'City',\n    ui: {\n      widget: 'autocomplete',\n      asyncData: () => this.loadCities(),\n      debounceTime: 300,\n      placeholder: 'Search city'\n    }\n  }\n}\n\nprivate async loadCities(): Promise\u003Cany[]> {\n  return [\n    { label: 'New York', value: 'ny' },\n    { label: 'Los Angeles', value: 'la' },\n    { label: 'Chicago', value: 'chi' }\n  ];\n}\n```\n\n### Radio Buttons\n```typescript\n{\n  priority: {\n    type: 'string',\n    title: 'Priority',\n    enum: [\n      { label: 'Low', value: 'low' },\n      { label: 'Medium', value: 'medium' },\n      { label: 'High', value: 'high' }\n    ],\n    default: 'medium',\n    ui: {\n      widget: 'radio',\n      styleType: 'button' \u002F\u002F or 'default'\n    }\n  }\n}\n```\n\n### Checkbox\n```typescript\n{\n  agree: {\n    type: 'boolean',\n    title: 'Agree to terms',\n    ui: {\n      widget: 'checkbox'\n    }\n  }\n}\n```\n\n### Switch\n```typescript\n{\n  isActive: {\n    type: 'boolean',\n    title: 'Active Status',\n    ui: {\n      widget: 'switch',\n      checkedChildren: 'On',\n      unCheckedChildren: 'Off'\n    }\n  }\n}\n```\n\n### Slider\n```typescript\n{\n  rating: {\n    type: 'number',\n    title: 'Rating',\n    minimum: 0,\n    maximum: 100,\n    ui: {\n      widget: 'slider',\n      marks: {\n        0: '0',\n        50: '50',\n        100: '100'\n      }\n    }\n  }\n}\n```\n\n### File Upload\n```typescript\n{\n  avatar: {\n    type: 'string',\n    title: 'Avatar',\n    ui: {\n      widget: 'upload',\n      action: '\u002Fapi\u002Fupload',\n      accept: 'image\u002F*',\n      limit: 1,\n      listType: 'picture-card'\n    }\n  }\n}\n```\n\n## Async Data Loading\n\n### Dynamic Dropdown Options\n```typescript\n{\n  assignee: {\n    type: 'string',\n    title: 'Assignee',\n    ui: {\n      widget: 'select',\n      asyncData: () => this.loadUsers(),\n      placeholder: 'Select user'\n    }\n  }\n}\n\nprivate async loadUsers(): Promise\u003Cany[]> {\n  const users = await this.userService.getUsers();\n  return users.map(u => ({\n    label: u.name,\n    value: u.id\n  }));\n}\n```\n\n### Cascading Selects\n```typescript\n{\n  country: {\n    type: 'string',\n    title: 'Country',\n    ui: {\n      widget: 'select',\n      asyncData: () => this.loadCountries(),\n      change: (value: string) => this.onCountryChange(value)\n    }\n  },\n  city: {\n    type: 'string',\n    title: 'City',\n    ui: {\n      widget: 'select',\n      asyncData: () => this.loadCities(this.selectedCountry())\n    }\n  }\n}\n\nprivate selectedCountry = signal\u003Cstring>('');\n\nonCountryChange(value: string): void {\n  this.selectedCountry.set(value);\n}\n```\n\n## Conditional Fields\n\n### Show\u002FHide Based on Value\n```typescript\nschema: SFSchema = {\n  properties: {\n    userType: {\n      type: 'string',\n      title: 'User Type',\n      enum: ['individual', 'company']\n    },\n    \u002F\u002F Show only for companies\n    companyName: {\n      type: 'string',\n      title: 'Company Name',\n      ui: {\n        visibleIf: {\n          userType: ['company']\n        }\n      }\n    },\n    \u002F\u002F Show only for individuals\n    firstName: {\n      type: 'string',\n      title: 'First Name',\n      ui: {\n        visibleIf: {\n          userType: ['individual']\n        }\n      }\n    }\n  }\n};\n```\n\n## Custom Validators\n\n```typescript\nimport { SFSchema } from '@delon\u002Fform';\n\nschema: SFSchema = {\n  properties: {\n    password: {\n      type: 'string',\n      title: 'Password',\n      ui: {\n        type: 'password',\n        validator: (value: string, formProperty: any, form: any) => {\n          if (value.length \u003C 8) {\n            return [{ keyword: 'minLength', message: 'Password must be at least 8 characters' }];\n          }\n          if (!\u002F[A-Z]\u002F.test(value)) {\n            return [{ keyword: 'uppercase', message: 'Password must contain uppercase letter' }];\n          }\n          return [];\n        }\n      }\n    },\n    confirmPassword: {\n      type: 'string',\n      title: 'Confirm Password',\n      ui: {\n        type: 'password',\n        validator: (value: string, formProperty: any, form: any) => {\n          if (value !== form.value.password) {\n            return [{ keyword: 'match', message: 'Passwords must match' }];\n          }\n          return [];\n        }\n      }\n    }\n  }\n};\n```\n\n## Multi-Step Forms (Wizards)\n\n```typescript\nimport { Component, signal } from '@angular\u002Fcore';\nimport { SFSchema } from '@delon\u002Fform';\n\n@Component({\n  selector: 'app-wizard-form',\n  template: `\n    \u003Cnz-steps [nzCurrent]=\"currentStep()\">\n      \u003Cnz-step nzTitle=\"Basic Info\" \u002F>\n      \u003Cnz-step nzTitle=\"Address\" \u002F>\n      \u003Cnz-step nzTitle=\"Confirmation\" \u002F>\n    \u003C\u002Fnz-steps>\n    \n    @switch (currentStep()) {\n      @case (0) {\n        \u003Csf [schema]=\"basicInfoSchema\" (formSubmit)=\"nextStep($event)\" \u002F>\n      }\n      @case (1) {\n        \u003Csf [schema]=\"addressSchema\" (formSubmit)=\"nextStep($event)\" \u002F>\n      }\n      @case (2) {\n        \u003Cdiv class=\"confirmation\">\n          \u003Ch3>Review Your Information\u003C\u002Fh3>\n          \u003Cpre>{{ formData() | json }}\u003C\u002Fpre>\n          \u003Cbutton nz-button nzType=\"primary\" (click)=\"submit()\">Submit\u003C\u002Fbutton>\n        \u003C\u002Fdiv>\n      }\n    }\n  `\n})\nexport class WizardFormComponent {\n  currentStep = signal(0);\n  formData = signal\u003Cany>({});\n  \n  basicInfoSchema: SFSchema = {\n    properties: {\n      name: { type: 'string', title: 'Name' },\n      email: { type: 'string', title: 'Email', format: 'email' }\n    },\n    required: ['name', 'email']\n  };\n  \n  addressSchema: SFSchema = {\n    properties: {\n      street: { type: 'string', title: 'Street' },\n      city: { type: 'string', title: 'City' },\n      zipCode: { type: 'string', title: 'Zip Code' }\n    },\n    required: ['street', 'city']\n  };\n  \n  nextStep(value: any): void {\n    this.formData.update(data => ({ ...data, ...value }));\n    this.currentStep.update(step => step + 1);\n  }\n  \n  submit(): void {\n    console.log('Final data:', this.formData());\n  }\n}\n```\n\n## Grid Layout\n\n```typescript\nui: SFUISchema = {\n  '*': {\n    spanLabel: 4,\n    spanControl: 20,\n    grid: { span: 12 } \u002F\u002F 2 columns (24 \u002F 12 = 2)\n  },\n  $description: {\n    grid: { span: 24 } \u002F\u002F Full width\n  }\n};\n```\n\n## Responsive Layout\n\n```typescript\nui: SFUISchema = {\n  '*': {\n    grid: {\n      xs: 24,  \u002F\u002F Mobile: full width\n      sm: 12,  \u002F\u002F Tablet: 2 columns\n      md: 8,   \u002F\u002F Desktop: 3 columns\n      lg: 6    \u002F\u002F Large: 4 columns\n    }\n  }\n};\n```\n\n## Form Actions\n\n```typescript\n@Component({\n  template: `\n    \u003Csf [schema]=\"schema\" [button]=\"button\">\n      \u003Cng-template sf-template=\"button\" let-btn>\n        \u003Cbutton \n          nz-button \n          [nzType]=\"btn.submit ? 'primary' : 'default'\"\n          (click)=\"btn.submit ? handleSubmit() : handleReset()\"\n        >\n          {{ btn.submit ? 'Submit' : 'Reset' }}\n        \u003C\u002Fbutton>\n      \u003C\u002Fng-template>\n    \u003C\u002Fsf>\n  `\n})\nexport class CustomButtonFormComponent {\n  button = {\n    submit_text: 'Submit',\n    reset_text: 'Reset',\n    submit_type: 'primary' as const,\n    reset_type: 'default' as const\n  };\n}\n```\n\n## Checklist\n\nWhen creating SF forms:\n\n- [ ] Use proper JSON Schema types\n- [ ] Define required fields\n- [ ] Set validation rules (min\u002Fmax, format, pattern)\n- [ ] Use appropriate widgets for data types\n- [ ] Handle async data loading\n- [ ] Implement conditional field visibility\n- [ ] Add custom validators when needed\n- [ ] Configure responsive grid layout\n- [ ] Handle form submission and errors\n- [ ] Provide loading states\n- [ ] Test form validation\n- [ ] Ensure accessibility (labels, ARIA)\n\n## References\n\n- [@delon\u002Fform Documentation](https:\u002F\u002Fng-alain.com\u002Fform)\n- [JSON Schema Specification](https:\u002F\u002Fjson-schema.org\u002F)\n- [SF Component API](https:\u002F\u002Fng-alain.com\u002Fcomponents\u002Fsf)\n- [ng-alain Component Skill](.\u002Fng-alain-component\u002FSKILL.md)\n","# @delon\u002Fform Dynamic Schema Forms Skill\n\nThis skill helps create dynamic forms using @delon\u002Fform's SF (Schema Form) component.\n\n## Core Principles\n\n### Schema-Driven Forms\n- **JSON Schema**: Define forms declaratively with JSON Schema\n- **Type Safety**: Full TypeScript support for schema definitions\n- **Validation**: Built-in validation with custom validators\n- **Dynamic Rendering**: Conditional fields based on form state\n\n### Key Features\n- Automatic form generation from schema\n- Custom widgets for specialized inputs\n- Async data loading (dropdowns, autocomplete)\n- Multi-step forms (wizards)\n- Responsive grid layouts\n- Internationalization support\n\n## Basic Schema Form\n\n```typescript\nimport { Component, signal, output } from '@angular\u002Fcore';\nimport { SFSchema, SFComponent, SFUISchema } from '@delon\u002Fform';\nimport { SHARED_IMPORTS } from '@shared';\n\n@Component({\n  selector: 'app-user-form',\n  standalone: true,\n  imports: [SHARED_IMPORTS, SFComponent],\n  template: `\n    \u003Csf \n      [schema]=\"schema\"\n      [ui]=\"ui\"\n      [formData]=\"initialData()\"\n      [loading]=\"loading()\"\n      (formSubmit)=\"handleSubmit($event)\"\n      (formChange)=\"handleChange($event)\"\n      (formError)=\"handleError($event)\"\n    \u002F>\n  `\n})\nexport class UserFormComponent {\n  loading = signal(false);\n  initialData = signal\u003Cany>({});\n  formSubmit = output\u003Cany>();\n  \n  schema: SFSchema = {\n    properties: {\n      name: {\n        type: 'string',\n        title: 'Full Name',\n        maxLength: 100\n      },\n      email: {\n        type: 'string',\n        title: 'Email',\n        format: 'email'\n      },\n      age: {\n        type: 'number',\n        title: 'Age',\n        minimum: 18,\n        maximum: 120\n      },\n      role: {\n        type: 'string',\n        title: 'Role',\n        enum: ['admin', 'member', 'viewer'],\n        default: 'member'\n      }\n    },\n    required: ['name', 'email', 'role']\n  };\n  \n  ui: SFUISchema = {\n    '*': {\n      spanLabel: 6,\n      spanControl: 18,\n      grid: { span: 24 }\n    },\n    $name: {\n      placeholder: 'Enter full name',\n      widget: 'string'\n    },\n    $email: {\n      placeholder: 'user@example.com',\n      widget: 'string'\n    },\n    $age: {\n      widget: 'number'\n    },\n    $role: {\n      widget: 'select',\n      placeholder: 'Select role'\n    }\n  };\n  \n  handleSubmit(value: any): void {\n    console.log('Form submitted:', value);\n    this.formSubmit.emit(value);\n  }\n  \n  handleChange(value: any): void {\n    console.log('Form changed:', value);\n  }\n  \n  handleError(errors: any): void {\n    console.error('Form errors:', errors);\n  }\n}\n```\n\n## Common Widgets\n\n### String Input\n```typescript\n{\n  name: {\n    type: 'string',\n    title: 'Name',\n    ui: {\n      widget: 'string',\n      placeholder: 'Enter name',\n      prefix: 'User',\n      suffix: '@',\n      maxLength: 100\n    }\n  }\n}\n```\n\n### Textarea\n```typescript\n{\n  description: {\n    type: 'string',\n    title: 'Description',\n    ui: {\n      widget: 'textarea',\n      autosize: { minRows: 3, maxRows: 6 },\n      placeholder: 'Enter description'\n    }\n  }\n}\n```\n\n### Number Input\n```typescript\n{\n  amount: {\n    type: 'number',\n    title: 'Amount',\n    minimum: 0,\n    maximum: 1000000,\n    ui: {\n      widget: 'number',\n      precision: 2,\n      prefix: '$',\n      formatter: (value: number) => `$ ${value}`.replace(\u002F\\B(?=(\\d{3})+(?!\\d))\u002Fg, ',')\n    }\n  }\n}\n```\n\n### Date Picker\n```typescript\n{\n  birthDate: {\n    type: 'string',\n    title: 'Birth Date',\n    format: 'date',\n    ui: {\n      widget: 'date',\n      mode: 'date',\n      displayFormat: 'yyyy-MM-dd',\n      end: 'today' \u002F\u002F Can't select future dates\n    }\n  }\n}\n```\n\n### Date Range\n```typescript\n{\n  dateRange: {\n    type: 'string',\n    title: 'Date Range',\n    ui: {\n      widget: 'date',\n      mode: 'range',\n      displayFormat: 'yyyy-MM-dd'\n    }\n  }\n}\n```\n\n### Select Dropdown\n```typescript\n{\n  category: {\n    type: 'string',\n    title: 'Category',\n    enum: [\n      { label: 'Technology', value: 'tech' },\n      { label: 'Business', value: 'business' },\n      { label: 'Science', value: 'science' }\n    ],\n    ui: {\n      widget: 'select',\n      placeholder: 'Select category',\n      allowClear: true,\n      showSearch: true\n    }\n  }\n}\n```\n\n### Multi-Select\n```typescript\n{\n  tags: {\n    type: 'array',\n    title: 'Tags',\n    items: {\n      type: 'string',\n      enum: ['angular', 'react', 'vue', 'typescript']\n    },\n    ui: {\n      widget: 'select',\n      mode: 'multiple',\n      placeholder: 'Select tags'\n    }\n  }\n}\n```\n\n### Autocomplete\n```typescript\n{\n  city: {\n    type: 'string',\n    title: 'City',\n    ui: {\n      widget: 'autocomplete',\n      asyncData: () => this.loadCities(),\n      debounceTime: 300,\n      placeholder: 'Search city'\n    }\n  }\n}\n\nprivate async loadCities(): Promise\u003Cany[]> {\n  return [\n    { label: 'New York', value: 'ny' },\n    { label: 'Los Angeles', value: 'la' },\n    { label: 'Chicago', value: 'chi' }\n  ];\n}\n```\n\n### Radio Buttons\n```typescript\n{\n  priority: {\n    type: 'string',\n    title: 'Priority',\n    enum: [\n      { label: 'Low', value: 'low' },\n      { label: 'Medium', value: 'medium' },\n      { label: 'High', value: 'high' }\n    ],\n    default: 'medium',\n    ui: {\n      widget: 'radio',\n      styleType: 'button' \u002F\u002F or 'default'\n    }\n  }\n}\n```\n\n### Checkbox\n```typescript\n{\n  agree: {\n    type: 'boolean',\n    title: 'Agree to terms',\n    ui: {\n      widget: 'checkbox'\n    }\n  }\n}\n```\n\n### Switch\n```typescript\n{\n  isActive: {\n    type: 'boolean',\n    title: 'Active Status',\n    ui: {\n      widget: 'switch',\n      checkedChildren: 'On',\n      unCheckedChildren: 'Off'\n    }\n  }\n}\n```\n\n### Slider\n```typescript\n{\n  rating: {\n    type: 'number',\n    title: 'Rating',\n    minimum: 0,\n    maximum: 100,\n    ui: {\n      widget: 'slider',\n      marks: {\n        0: '0',\n        50: '50',\n        100: '100'\n      }\n    }\n  }\n}\n```\n\n### File Upload\n```typescript\n{\n  avatar: {\n    type: 'string',\n    title: 'Avatar',\n    ui: {\n      widget: 'upload',\n      action: '\u002Fapi\u002Fupload',\n      accept: 'image\u002F*',\n      limit: 1,\n      listType: 'picture-card'\n    }\n  }\n}\n```\n\n## Async Data Loading\n\n### Dynamic Dropdown Options\n```typescript\n{\n  assignee: {\n    type: 'string',\n    title: 'Assignee',\n    ui: {\n      widget: 'select',\n      asyncData: () => this.loadUsers(),\n      placeholder: 'Select user'\n    }\n  }\n}\n\nprivate async loadUsers(): Promise\u003Cany[]> {\n  const users = await this.userService.getUsers();\n  return users.map(u => ({\n    label: u.name,\n    value: u.id\n  }));\n}\n```\n\n### Cascading Selects\n```typescript\n{\n  country: {\n    type: 'string',\n    title: 'Country',\n    ui: {\n      widget: 'select',\n      asyncData: () => this.loadCountries(),\n      change: (value: string) => this.onCountryChange(value)\n    }\n  },\n  city: {\n    type: 'string',\n    title: 'City',\n    ui: {\n      widget: 'select',\n      asyncData: () => this.loadCities(this.selectedCountry())\n    }\n  }\n}\n\nprivate selectedCountry = signal\u003Cstring>('');\n\nonCountryChange(value: string): void {\n  this.selectedCountry.set(value);\n}\n```\n\n## Conditional Fields\n\n### Show\u002FHide Based on Value\n```typescript\nschema: SFSchema = {\n  properties: {\n    userType: {\n      type: 'string',\n      title: 'User Type',\n      enum: ['individual', 'company']\n    },\n    \u002F\u002F Show only for companies\n    companyName: {\n      type: 'string',\n      title: 'Company Name',\n      ui: {\n        visibleIf: {\n          userType: ['company']\n        }\n      }\n    },\n    \u002F\u002F Show only for individuals\n    firstName: {\n      type: 'string',\n      title: 'First Name',\n      ui: {\n        visibleIf: {\n          userType: ['individual']\n        }\n      }\n    }\n  }\n};\n```\n\n## Custom Validators\n\n```typescript\nimport { SFSchema } from '@delon\u002Fform';\n\nschema: SFSchema = {\n  properties: {\n    password: {\n      type: 'string',\n      title: 'Password',\n      ui: {\n        type: 'password',\n        validator: (value: string, formProperty: any, form: any) => {\n          if (value.length \u003C 8) {\n            return [{ keyword: 'minLength', message: 'Password must be at least 8 characters' }];\n          }\n          if (!\u002F[A-Z]\u002F.test(value)) {\n            return [{ keyword: 'uppercase', message: 'Password must contain uppercase letter' }];\n          }\n          return [];\n        }\n      }\n    },\n    confirmPassword: {\n      type: 'string',\n      title: 'Confirm Password',\n      ui: {\n        type: 'password',\n        validator: (value: string, formProperty: any, form: any) => {\n          if (value !== form.value.password) {\n            return [{ keyword: 'match', message: 'Passwords must match' }];\n          }\n          return [];\n        }\n      }\n    }\n  }\n};\n```\n\n## Multi-Step Forms (Wizards)\n\n```typescript\nimport { Component, signal } from '@angular\u002Fcore';\nimport { SFSchema } from '@delon\u002Fform';\n\n@Component({\n  selector: 'app-wizard-form',\n  template: `\n    \u003Cnz-steps [nzCurrent]=\"currentStep()\">\n      \u003Cnz-step nzTitle=\"Basic Info\" \u002F>\n      \u003Cnz-step nzTitle=\"Address\" \u002F>\n      \u003Cnz-step nzTitle=\"Confirmation\" \u002F>\n    \u003C\u002Fnz-steps>\n    \n    @switch (currentStep()) {\n      @case (0) {\n        \u003Csf [schema]=\"basicInfoSchema\" (formSubmit)=\"nextStep($event)\" \u002F>\n      }\n      @case (1) {\n        \u003Csf [schema]=\"addressSchema\" (formSubmit)=\"nextStep($event)\" \u002F>\n      }\n      @case (2) {\n        \u003Cdiv class=\"confirmation\">\n          \u003Ch3>Review Your Information\u003C\u002Fh3>\n          \u003Cpre>{{ formData() | json }}\u003C\u002Fpre>\n          \u003Cbutton nz-button nzType=\"primary\" (click)=\"submit()\">Submit\u003C\u002Fbutton>\n        \u003C\u002Fdiv>\n      }\n    }\n  `\n})\nexport class WizardFormComponent {\n  currentStep = signal(0);\n  formData = signal\u003Cany>({});\n  \n  basicInfoSchema: SFSchema = {\n    properties: {\n      name: { type: 'string', title: 'Name' },\n      email: { type: 'string', title: 'Email', format: 'email' }\n    },\n    required: ['name', 'email']\n  };\n  \n  addressSchema: SFSchema = {\n    properties: {\n      street: { type: 'string', title: 'Street' },\n      city: { type: 'string', title: 'City' },\n      zipCode: { type: 'string', title: 'Zip Code' }\n    },\n    required: ['street', 'city']\n  };\n  \n  nextStep(value: any): void {\n    this.formData.update(data => ({ ...data, ...value }));\n    this.currentStep.update(step => step + 1);\n  }\n  \n  submit(): void {\n    console.log('Final data:', this.formData());\n  }\n}\n```\n\n## Grid Layout\n\n```typescript\nui: SFUISchema = {\n  '*': {\n    spanLabel: 4,\n    spanControl: 20,\n    grid: { span: 12 } \u002F\u002F 2 columns (24 \u002F 12 = 2)\n  },\n  $description: {\n    grid: { span: 24 } \u002F\u002F Full width\n  }\n};\n```\n\n## Responsive Layout\n\n```typescript\nui: SFUISchema = {\n  '*': {\n    grid: {\n      xs: 24,  \u002F\u002F Mobile: full width\n      sm: 12,  \u002F\u002F Tablet: 2 columns\n      md: 8,   \u002F\u002F Desktop: 3 columns\n      lg: 6    \u002F\u002F Large: 4 columns\n    }\n  }\n};\n```\n\n## Form Actions\n\n```typescript\n@Component({\n  template: `\n    \u003Csf [schema]=\"schema\" [button]=\"button\">\n      \u003Cng-template sf-template=\"button\" let-btn>\n        \u003Cbutton \n          nz-button \n          [nzType]=\"btn.submit ? 'primary' : 'default'\"\n          (click)=\"btn.submit ? handleSubmit() : handleReset()\"\n        >\n          {{ btn.submit ? 'Submit' : 'Reset' }}\n        \u003C\u002Fbutton>\n      \u003C\u002Fng-template>\n    \u003C\u002Fsf>\n  `\n})\nexport class CustomButtonFormComponent {\n  button = {\n    submit_text: 'Submit',\n    reset_text: 'Reset',\n    submit_type: 'primary' as const,\n    reset_type: 'default' as const\n  };\n}\n```\n\n## Checklist\n\nWhen creating SF forms:\n\n- [ ] Use proper JSON Schema types\n- [ ] Define required fields\n- [ ] Set validation rules (min\u002Fmax, format, pattern)\n- [ ] Use appropriate widgets for data types\n- [ ] Handle async data loading\n- [ ] Implement conditional field visibility\n- [ ] Add custom validators when needed\n- [ ] Configure responsive grid layout\n- [ ] Handle form submission and errors\n- [ ] Provide loading states\n- [ ] Test form validation\n- [ ] Ensure accessibility (labels, ARIA)\n\n## References\n\n- [@delon\u002Fform Documentation](https:\u002F\u002Fng-alain.com\u002Fform)\n- [JSON Schema Specification](https:\u002F\u002Fjson-schema.org\u002F)\n- [SF Component API](https:\u002F\u002Fng-alain.com\u002Fcomponents\u002Fsf)\n- [ng-alain Component Skill](.\u002Fng-alain-component\u002FSKILL.md)\n",{"name":5,"license":14,"description":7},"master","08cc2532077058aa50e6e18f54695bc256c88152","skills\u002F7spade\u002Fdelon-form-dynamic-schema-forms","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub","https:\u002F\u002Fgithub.com\u002Fsuperhealth","java engineer","2026-04-06 22:07:23",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add superhealth\u002Fskills-hub --skill delon-form-dynamic-schema-forms",{"tool":56,"command":57},"bunx","bunx skills add superhealth\u002Fskills-hub --skill delon-form-dynamic-schema-forms",{"tool":59,"command":60},"pnpm","pnpm dlx skills add superhealth\u002Fskills-hub --skill delon-form-dynamic-schema-forms","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002F7spade\u002Fdelon-form-dynamic-schema-forms\u002FSKILL.md",true,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"skill-report.json","REFERENCE","参考文档",14520,"https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002F7spade\u002Fdelon-form-dynamic-schema-forms\u002Fskill-report.json",[71,96,119,131,146,161],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":38},"01M6MC9F3WHV8S8FZ2W4TRB0FE","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fzhanlincui\u002Fvercel-react-best-practices\u002FSKILL.md",[],[78,79,80,81,82,83,84,85,86,87,28,88,33,89,90,91,92,93,94,95],"react","vercel react best practices","best practices","vercel","react best practices","data fetching","code","triggers","pages","next","refactoring","Optimization","tasks","guidelines","react components","components","performance","writing",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":38},"01M6MB8KWE1Q5A5KERR7RFTQWP","vue-testing-best-practices","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-testing-best-practices\u002FSKILL.md",[],[103,104,105,80,106,107,108,109,110,111,36,28,112,113,114,115,116,117,118],"vue testing best practices","testing best practices","vue","testing","testing patterns","js","e2e","vitest","use","test","mocking","for","utils","e2e testing","github","playwright",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6MB8GK06M6GA4KVYNDV1BZP","vue-router-best-practices","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-router-best-practices\u002FSKILL.md",[],[80,105,126,127,128,28,129,130,36,117],"router","vue router best practices","route","navigation","lifecycle",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":38},"01M6MB8DQF21TZMQ9XC3745ERW","vue-pinia-best-practices","Pinia stores, state management patterns, store setup, and reactivity with stores.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-pinia-best-practices\u002FSKILL.md",[],[138,139,105,80,140,141,28,142,143,144,145,117],"vue pinia best practices","pinia","with","store","management","state","state management","setup",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":38},"01M6MB8A7MC08747J9TV4GWQ9A","vue-options-api-best-practices","Vue 3 Options API style (data(), methods, this context). Each reference shows Options API solution only.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-options-api-best-practices\u002FSKILL.md",[],[105,153,154,155,80,156,157,158,159,33,117,160],"options","vue options api best practices","api","methods","reference","only","context","style",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":38},"01M6MB85ZTQC24Q04X49MM4YXN","vue-development-guides","A collection of best practices and tips for developing applications using Vue.js. This skill MUST be apply when developing, refactoring or reviewing Vue.js or Nuxt projects.","https:\u002F\u002Fgithub.com\u002Fsuperhealth\u002Fskills-hub\u002Fblob\u002Fmaster\u002Fskills\u002Fvuejs-ai\u002Fvue-development-guides\u002FSKILL.md",[],[168,105,169,170,117,171,172,114,173,174,175,108,88,176,177,80],"development","guides","vue development guides","tips","apply","project","nuxt","projects","collection","applications"]