Checkbox Group

less than 1 minute read

References

TypeScript

import { Components } from "gd-sprest-bs";

// Create the buttonGroup
let el = document.querySelector("#cbGroup");
let cbGroup = Components.CheckboxGroup({
    el: el,
    items: [
        { label: "Option 1" },
        { label: "Option 2" },
        { label: "Option 3" }
    ]
});

React

import * as React from "react";
import { CheckboxGroup } from "gd-sprest-bsx";

export class IDemo extends React.Component {
    // Render the component
    render() {
        return (
            <CheckboxGroup
                items={[
                    { label: "Option 1" },
                    { label: "Option 2" },
                    { label: "Option 3" }
                ]}
            />
        );
    }
}

VueJS

<template>
    <CheckboxGroup v-bind:items="checkboxes" />
</template>

<script>
import { CheckboxGroup } from "gd-sprest-bs-vue";
export default {
    components: { CheckboxGroup },
    data() {
        return {
            checkboxes: [
                { label: "Option 1" },
                { label: "Option 2" },
                { label: "Option 3" }
            ]
        };
    }
}
</script>

Code Playground