HomePaymentsNo-codeDevelopersContribute
Safepay Home PageLive DashboardTest Dashboard

Checkbox


The Checkbox component provides a customizable checkbox input with optional label support. It's designed for ease of integration and customization in various user interfaces.

Usage

Checkbox Basic Usage
import React from 'react';
import { Checkbox } from '~/ui/components/Form';

export default function App() {
  return (
    <div>
      <Checkbox
        id="agree"
        label="I agree to the terms and conditions."
        checked={true}
      />
    </div>
  );
}

Rendered Example

Props

NameTypeDefaultDescription
classNamestringundefinedCSS classes to be applied to the component container
labelReactNodeundefinedThe content to be used as the label for the checkbox
idstringundefinedElement ID for the checkbox, also used to associate the label
disabledbooleanfalseWhether the checkbox is disabled or not
checkedbooleanfalseIndicates whether the checkbox is checked