<div style="display: grid; gap: 0.75rem">
<ray-checkbox label="I accept the terms" name="terms" required></ray-checkbox>
<ray-checkbox checked color="teal">Send me updates (label as content)</ray-checkbox>
<ray-checkbox indeterminate label="Indeterminate"></ray-checkbox>
<ray-checkbox label="With description" description="Shown under the label."></ray-checkbox>
<ray-checkbox label="Disabled" disabled checked></ray-checkbox>
<ray-checkbox label="Invalid" error="You must check this"></ray-checkbox>
</div>
<div class="demo-row">
<ray-checkbox variant="outline" checked label="Outline variant"></ray-checkbox>
<ray-checkbox variant="outline" indeterminate color="teal" label="Outline, indeterminate"></ray-checkbox>
</div>
import { RayCheckbox } from "@raylang/react";
export function CheckboxExample() {
return (
<>
<div style={{ display: "grid", gap: "0.75rem" }}>
<RayCheckbox label="I accept the terms" name="terms" required />
<RayCheckbox checked color="teal">Send me updates (label as content)</RayCheckbox>
<RayCheckbox indeterminate label="Indeterminate" />
<RayCheckbox label="With description" description="Shown under the label." />
<RayCheckbox label="Disabled" disabled checked />
<RayCheckbox label="Invalid" error="You must check this" />
</div>
<div className="demo-row">
<RayCheckbox variant="outline" checked label="Outline variant" />
<RayCheckbox variant="outline" indeterminate color="teal" label="Outline, indeterminate" />
</div>
</>
);
}
<template>
<div style="display: grid; gap: 0.75rem">
<RayCheckbox label="I accept the terms" name="terms" required />
<RayCheckbox checked color="teal">Send me updates (label as content)</RayCheckbox>
<RayCheckbox indeterminate label="Indeterminate" />
<RayCheckbox label="With description" description="Shown under the label." />
<RayCheckbox label="Disabled" disabled checked />
<RayCheckbox label="Invalid" error="You must check this" />
</div>
<div class="demo-row">
<RayCheckbox variant="outline" checked label="Outline variant" />
<RayCheckbox variant="outline" indeterminate color="teal" label="Outline, indeterminate" />
</div>
</template>