JSFiddle - React, Tailwind, and code Playground

by lforms

HTML

<body>
  <link href="https://clin-table-search.lhc.nlm.nih.gov/lforms-versions/9.0.0/styles/lforms.min.css" media="screen" rel="stylesheet" />
  <div id="formContainer">
  </div>
  <script src="https://clin-table-search.lhc.nlm.nih.gov/lforms-versions/9.0.0/lforms.min.js"></script>
</body>

JavaScript

// This is the form definition
window.formDef = {
  code: "X-001",
  name: "Demo form",
  templateOptions: {
  	obrItems: [{
      question: "First name",
      displayControl:  {
        "colCSS":   [
           {"name":"width","value":"50%"},
           {"name":"min-width","value":"4em"}
         ]
      }
    },
    {
      question: "Last name",
       displayControl:  {
        "colCSS":   [
           {"name":"width","value":"50%"},
           {"name":"min-width","value":"4em"}
         ]
      }
    }],
    hideHeader: true
  },
  items: [{
    "questionCode": "X-002",
    "question": "Eye color"
  }]
};

LForms.Util.addFormToPage('formDef', 'formContainer');