Skip to main content

Material

The following examples demonstrates the FlexNative Check List in action.

Usecase Examples

Usecase Examples with material style.

Value

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

Custom Items

Custom Check boxes

Value Field

Value Field

Multi Select

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

Type

Type
Type

Colors

Color
Color
Color
Color
Color
Color
Color
Color
Color
Color
Color
Color
Color
Color

Sizes

Sizes
Sizes
Sizes
Sizes

Disabled

Disabled

Direction

Direction Row
Direction Column

Border Colors

crimson
#ed143d
rgba(237, 20, 61, 0.5)
rgb(237, 20, 61)

Border Width

Border Width
Border Width
Border Width
Border Width
Border Width
Border Width

Background Colors

crimson
#ed143d
rgb(237, 20, 61)
rgba(237, 20, 61, 0.5)

Text Helper

Helper Text
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...