Menu
Libraries |
Category

svelte-schema-form

  • Purpose: A Svelte implementation of a form generator from JSON Schema, supporting subforms, lists with reordering, custom renderer components, and customizable CSS skinning.
  • Target Audience: Developers looking to generate forms dynamically from JSON Schema in Svelte applications.
  • Key Features:
    • Supports JSON Schema validation and type definitions.
    • Renders forms based on schema definitions, including objects, arrays, and various field types (string, number, enum, etc.).
    • Customizable editors for specific field types (e.g., currency, radio buttons, file uploads, autocomplete).
    • Supports collapsible sections, read-only fields, and dynamic error messaging.
    • Provides components like SchemaForm (basic form rendering) and SubmitForm (form with submit functionality).
  • Svelte Support: Primarily built for Svelte, with components like SubmitForm and SchemaForm designed for Svelte applications.
  • Customization:
    • Allows custom editor components via a components map.
    • Supports custom CSS for layout and skinning (e.g., layout.scss and basic-skin.scss).
    • Custom schema properties like editor, emptyDisplay, and controls for advanced behavior.
  • Advanced Editors:
    • Currency: Renders number fields with currency symbols.
    • Radio: Renders enum fields as radio buttons.
    • Upload: Handles file uploads with drag-and-drop support.
    • Autocomplete: Provides dropdown suggestions from remote data.
    • List-Detail: Displays arrays as interactive grids with detail views.
  • JSON Schema Support: Covers most JSON Schema features, including validation (min/max length, patterns, enums), nested objects/arrays, and custom properties like enumText for display labels.
  • Links:

formform-builderformsjson-schemasvelte

Comments