Skip to main content

Default

The following examples demonstrates the FlexNative Check List in action.

Usecase Examples

Usecase Examples with default style.

Value

[
  {
    "id": 1,
    "color": "primary"
  }
]
[
  "primary"
]
[
  1
]

Custom Items

Value Field

Value Field

Multi Select

Multi Select (default)
[
  {
    "id": 1,
    "color": "primary"
  }
]
Single Select
{
  "id": 1,
  "color": "primary"
}

Type

Colors

Sizes

Disabled

Direction

Border Colors

Border Width

Background Colors

Text Helper

Example with helper text

Label

Label as text
Custom Element

Label Style

Custom Label Style

Playground

Live Editor
//Play with props to see live changes;

function CheckListPlayground() {
  const [textValues, setTextValues] = useState(['1', '2', '3']);

  return (
    <CheckList label='Check list label'
              value={textValues}
              color='success'
              size='large'
              backgroundColor='#ebedf0'
              borderColor='crimson'
              borderWidth='thick'
              radius='medium'
              onValueChange={(newValues) => setTextValues([...newValues])}>
      <Check value='1' label='Check 1' />
      <Check value='2' label='Check 2' />
      <Check value='3' label='Check 3' color='primary' />
    </CheckList>
  );
}

render(<CheckListPlayground />);
Result
Loading...