Light-Weight, High-Performance & Easily Customizable
Checkbox group control for data with list of options.
List of supported JSON schema keywords.
List of supported LittleCub config options.
Select control with data, configs and schema parameters.
var selectControl1 = LittleCub("giant panda", {
"type" : "checkboxgroup"
}, {
"type" : "string",
"enum" : ["giant panda", "polar bear"]
}, document.getElementById('select-control-1'));
var selectControl1j = $('#select-control-1-j').lc("giant panda", {
"type" : "checkboxgroup"
}, {
"type" : "string",
"enum" : ["giant panda", "polar bear"]
});
Select control for required string data with option labels.
var selectControl2 = LittleCub("giant panda", {
"type" : "checkboxgroup",
"label" : "Pick your favorite bear:",
"required" : true,
"options" : ["Giant panda", "Polar bear", "Grizzly bear", "Atlas bear", "Blue bear"]
}, {
"type" : "string",
"enum" : ["giant panda", "polar bear", "grizzly bear", "atlas bear", "blue bear"]
}, document.getElementById('select-control-2'));
var selectControl2j = $('#select-control-2-j').lc("giant panda", {
"type" : "checkboxgroup",
"label" : "Pick your favorite bear:",
"required" : true,
"options" : ["Giant panda", "Polar bear", "Grizzly bear", "Atlas bear", "Blue bear"]
}, {
"type" : "string",
"enum" : ["giant panda", "polar bear", "grizzly bear", "atlas bear", "blue bear"]
});
Select control for required integer data and rendered with the option labels.
var selectControl3 = LittleCub(5, {
"type" : "select",
"label" : "Pick your favorite number:",
"required" : true,
"options" : {
"1" : "One",
"2" : "Two",
"3" : "Three",
"4" : "Four",
"5" : "Five"
}
}, {
"type" : "integer",
"enum" : [1, 2, 3, 4, 5]
}, document.getElementById('select-control-3'));
var selectControl3j = $('#select-control-3-j').lc(5, {
"type" : "select",
"label" : "Pick your favorite number:",
"required" : true,
"options" : {
"1" : "One",
"2" : "Two",
"3" : "Three",
"4" : "Four",
"5" : "Five"
}
}, {
"type" : "string",
"enum" : [1, 2, 3, 4, 5]
});
Select control with multiple selections.
var selectControl4 = LittleCub([2,5], {
"type" : "select",
"label" : "Pick your favorite number:",
"required" : true,
"multiple" : true,
"size" : 4,
"options" : {
"1" : "One",
"2" : "Two",
"3" : "Three",
"4" : "Four",
"5" : "Five"
}
}, {
"type" : "array",
"minItems": 2,
"maxItems": 3,
"items" : {
"type" : "integer",
"enum" : [1, 2, 3, 4, 5]
}
}, document.getElementById('select-control-4'));
var selectControl4j = $('#select-control-4-j').lc([2,5], {
"type" : "select",
"label" : "Pick your favorite number:",
"required" : true,
"multiple" : true,
"size" : 4,
"options" : {
"1" : "One",
"2" : "Two",
"3" : "Three",
"4" : "Four",
"5" : "Five"
}
}, {
"type" : "array",
"minItems": 2,
"maxItems": 3,
"items" : {
"type" : "integer",
"enum" : [1, 2, 3, 4, 5]
}
});