0.0.59 • Published 1 year ago

@creaditor/form-builder-web-component v0.0.59

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Creaditor Form-Builder-web-component

Keep the following in mind

this package use @mui

Installation

Node package

npm i @creaditor/emoji-picker-web-component

Include the module in your application

import "@creaditor/emoji-picker-web-component"

Add the tag in as dom element

<cdtr-form-builder></cdtr-form-builder>

Example:

  const FormBuilder = window.formBuilder = document.createElement("cdtr-form-builder");
        FormBuilder.language = "he";
        FormBuilder.autoComplete = "off"
        FormBuilder.direction = "rtl";
        FormBuilder.spacing = 2;
        FormBuilder.theme = {
          palette:{
            primary:{
            main: "#845EC2"
          }
          }
        }
        FormBuilder.style = {
          width:"500px",
          padding:"30px",
          background:"#fff",
          boxShadow:"0 0 10px #ccc",
          margin:"auto",
          borderRadius:"10px"
        }
        FormBuilder.onSortEnd = ({items})=>{
          FormBuilder.items = items;
        }
        FormBuilder.items = [
          {
            type: "input",
            props: {
              id:4,
              autoFocus: true,
              type: "text",
              variant:"outlined",
              style: {},
              classList: [],
              placeholder: "",
              name: "username",
              fullWidth: true,
              value: "",
              autocomplete:"off",
              label: {
                props: {
                  inline:true,
                   style: {}, classList: [], text: "שם" },

              },
            },
          },
          {
            type: "input",
            props: {
              id:5,
              type: "email",
              variant:"outlined",
              style: {

              },
              fullWidth: true,
              classList: [],
              placeholder: "נא למלא את המייל",
              name: "username",
              value: "",
              autocomplete:"off",
              label: {
                props: {
                  inline:false,
                   style: {}, classList: [], text: "אימייל" },
              },
            },
          },
          {
            type: "input",
            props: {
              id:6,
              type: "number",
              variant:"outlined",
              style: {
                backgroundColor:"#f5f5f5",
              },
              fullWidth: true,
              classList: [],
              placeholder: "נא למלא את המספר",
              name: "number",
              value: "",
              autocomplete:"off",
              label: {
                props: {
                  inline:false,
                   style: {}, classList: [], text: "number" },
              },
            },
          },
          {
            type:"radio-group",
            props:{
              id:39,
              style: {},
              classList: [],
              name: "radio",
              value: "",
              label: {
                props: {
                  inline:false,
                   style: {}, classList: [], text: "מה המין שלך" },
              },
              items:[
                {
                  value:"זכר",
                  label:"זכר"
                },
                {
                  value:"נקבה",
                  label:"נקבה"
                },
                {
                  value:"אחר",
                  label:"אחר"
                }
              ]
            }
          },
          {
            type: "input",
            props: {
              id:2222,
              type: "date",
              variant:"outlined",
              style: {
                backgroundColor:"#f5f5f5",
              },
              fullWidth: true,
              classList: [],
              placeholder: "נא למלא את המספר",
              name: "datetime",
              value: "",
              autocomplete:"off",
              label: {
                props: {
                  inline:false,
                   style: {}, classList: [], text: "datetime" },
              },
            },
          },
          {
            type:"checkbox",
            props:{
              id:456,
              style:{},
              justify:"start",
              classList:[],
              isRequired:true,
              label: {
                props: {
                  inline:false,
                   style: {}, classList: [], text: "האם אתה מסכים לחוזה" },
              },
            }
          },
          {
            type:"menu",
            props:{
              id:77,
              variant:"outlined",
              triggerProps:{
                fullWidth: true,
              classList: [],
              placeholder: "נא למלא את המספר",
              name: "multi",
              text: "בחירה מרובה",
              style:{
                justifyContent:"right",
                border:"1px solid #ccc",
              }
              },
              label: {
                props: {
                  inline:false,
                   style: {}, classList: [], text: "number" },
              },
              items:[
                {
                  name:"בחירה 1",
                  value:"1"
                },
                {
                  name:"בחירה 2",
                  value:"2"
                },
                {
                  name:"בחירה 3",
                  value:"3"
                }
              ]
            },
          },
          {
            type: "textarea",
            props: {
              id:7,
              variant:"outlined",
              style: {
                backgroundColor:"#f5f5f5",
                width:"100%",
                maxWidth:"100%",
                borderRadius:"3px",
                fontFamily:"Arial",
                padding:"10px",

              },
              fullWidth: true,
              classList: [],
              placeholder: "כתוב על עצמך",
              name: "desctiption",
              minRows: 5,
              ariaLabel:"for description",
              value: "",
              autocomplete:"off",
              label: {
                props: {
                  inline:false,
                   style: {}, classList: [], text: "תיאור" },
              },
            },
          },
          {
            type: "button",
            props: {
              style: {
                width: "100%",
                background:'#FF6F91'
              },
              size:"large",
              variant:"contained",
              // color:"primary",
              fullWidth: true,
              classList: [],
              text: "שליחה",
              disabled: false,
              onClick: [],
            },
          },
        ];


        document.getElementById("root").appendChild(FormBuilder);
0.0.45

2 years ago

0.0.47

2 years ago

0.0.59

1 year ago

0.0.51

1 year ago

0.0.52

1 year ago

0.0.53

1 year ago

0.0.55

1 year ago

0.0.56

1 year ago

0.0.57

1 year ago

0.0.58

1 year ago

0.0.50

1 year ago

0.0.48

1 year ago

0.0.49

1 year ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.43

2 years ago

0.0.44

2 years ago

0.0.37

2 years ago

0.0.38

2 years ago

0.0.39

2 years ago

0.0.30

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.29

2 years ago

0.0.28

2 years ago

0.0.27

2 years ago

0.0.26

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago