Grid

Type: React component

A type of list that renders uniformly sized items horizontally, starts wrapping when exceeding the horizontally available space. This component should render GridItem components.

When a large amount of GridItem components are being rendered and render times and/or scrolling performance is poor, consider implementing a VirtualGrid instead.

Props

  1. items

    (Required)

    Type: Array<FDS~ItemWithId>

  2. itemSize

    (Optional)

    Type: String

    The size in which the GridItem components should render. The possible values are:

    • 'xs'

    • 's'

    • 'm'

    • 'l'

    Default value

  3. maxColumns

    (Optional)

    Type: Number

    The maximum amount of columns with GridItem components before the list starts wrapping horizontally.

    Default value

  4. onItemClick

    (Optional)

    Default value

  5. onItemDoubleClick

    Default value

  6. paddingSize

    (Optional)

    Default value

  7. renderItem

    (Required)

    Type: Function

    A callback that is called for each item in the items array, which should return an instance of GridItem.

    Arguments

  8. selectedItem

    (Optional)

    Default value

  9. spaceSize

    (Optional)

    Default value