Checkbox

Checkbox is used for a list of selections that are meant to have one or more options checked.

Summary
Default

checkbox-default


  PBCheckbox(checked: false, text: "Unchecked", action: {})
    .padding(.bottom, Spacing.small)

  PBCheckbox(checked: true, text: "Checked", action: {})

Default w/ Error

checkbox-error


PBCheckbox(
  checked: false,
  checkboxType: .error,
  text: "Error",
  action: {}
)

Indeterminate Checkbox

checkbox-indeterminate


PBCheckbox(
  checked: true,
  checkboxType: .indeterminate,
  text: "Indeterminate",
  action: {}
)

Props

Name Type Description Default Values
Checked Bool Adds a check to the Checkbox false true false
Checkbox Type CheckboxType Changes the style of the Checkbox default default error indeterminate
Text String Adds a text label nil
Action (() -> Void) Adds an action {}

UI Samples using Checkbox Kit

Get the full picture. See how this kit is used in our samples.