Type alias CheckboxProps

CheckboxProps: {
    className?: string;
    hasError?: boolean;
    id?: string;
    isChecked?: boolean;
    isDefaultChecked?: boolean;
    isDisabled?: boolean;
    isIndeterminate?: boolean;
    labelPosition?: LabelPosition;
    labelText?: string;
    onChange?: ((event) => void);
}

Type declaration

  • Optional className?: string

    Additional css classes to help with unique styling of the switch

  • Optional hasError?: boolean

    True when (input related to) switch is erroneous

    Default

    false
    
  • Optional id?: string

    Optional unique identifier

  • Optional isChecked?: boolean

    If true, the component is checked.

  • Optional isDefaultChecked?: boolean

    If true, the component is checked by default.

  • Optional isDisabled?: boolean

    Enabled status of switch

    Default

    false
    
  • Optional isIndeterminate?: boolean

    If true, the component is in the indeterminate state.

    Default

    false
    
  • Optional labelPosition?: LabelPosition

    Indicates the position of the label relative to the checkbox.

    Default

    'after'
    
  • Optional labelText?: string

    If specified, the label that will appear associated with the checkbox.

    Default

    '' (no label will be shown)
    
  • Optional onChange?: ((event) => void)

    Callback fired when the state is changed.

      • (event): void
      • Parameters

        • event: ChangeEvent<HTMLInputElement>

          The event source of the callback. You can pull out the new value by accessing event.target.value (string). You can pull out the new checked state by accessing event.target.checked (boolean).

        Returns void