🌊
jsf
  • About KalmiaJSF
  • Setup
  • Architecture
  • Contributing
  • Changelog
  • Guides
    • Cheat Sheet
  • Examples
    • Demo example
    • Basic examples
    • Kitchen Sink example
    • Charts example
  • Schema
    • Intro to Schema
    • Prop types
      • String
      • Boolean
      • Number & Integer
      • Object
      • Array
      • Date
      • Id
      • Null
      • Ref
      • Binary
    • Prop options
      • Disabling property
      • On prop init actions
      • Persist
      • On value change
      • On user value change
    • Handlers
      • Color picker
    • Creating custom handler
      • Working with arrays
    • Value provider
  • Validation
    • Custom validation
    • Eval
  • LAYOUT
    • Intro to Layout
    • Layout options
      • Show & hide
      • On click action
  • INTERFACES
    • Value Options
  • Form
    • Form data
  • OTHER
    • Events
    • Lifecycle hooks
    • Notifications support
  • PAGES & COMPONENTS
    • Page
    • Component
  • THEMING
    • Creating new theme variant
  • BUILDER
    • Shortcuts
  • Help
    • FAQ
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Examples

Demo example

The best way to test the examples is to use the JSF builder and copy the examples into the Import/Export tab.

Let's create a basic form that collects user name with a minimum requirement of 3 characters and return it in a JSON object.

{
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string", "title": "Username", "minLength": 3
      }
    }
  },
  "layout": {
    "type": "div",
    "items": [  {  "key": "name" }  ]
  }
}

PreviousCheat SheetNextBasic examples

Last updated 4 years ago

Was this helpful?