Entity Basic

Imagine that we host an IT conference and want to make a list of guests. Obviously, we want to collect their first name and last name. Additionally, we can ask for their work experience, but that information is not required. Let's prepare a form for the guests, so they can sign up for our event, by using uniforms!

1. Install the required packages#

To start using uniforms, we have to install three independent packages:

  1. Core
  2. Bridge
  3. Theme

In this example, we will use the JSONSchema to describe our desired data format and style our form using Semantic UI theme.

npm install uniforms
npm install uniforms-bridge-json-schema
npm install uniforms-semantic

Note: When using a themed package, remember to include correct styles! If you are willing to run this example by yourself, have a read on Semantic UI React's theme usage.

2. Start by defining a schema#

After we've installed required packages, it's time to define our Guest schema. We can do it in a plain JSON, which is a valid JSONSchema instance: