GridResponsive

Configs

1
responsiveLevels: Object<String, (Number|String|ResponsiveLevelConfig)>= { small : 400, medium : 600, large : '*' }

"Break points" for which responsive config to use for columns and css.

Each level can be specified as:

  • A number representing the width threshold (e.g., 400)
  • The string '*' to match all sizes above other thresholds
  • A ResponsiveLevelConfig object with levelWidth and additional grid state properties

See the responsive guide for details and examples.

Properties

3

Class hierarchy

isGridResponsive: Boolean= truereadonly
Identifies an object as an instance of GridResponsive class, or subclass thereof.
isGridResponsive: Boolean= truereadonlystatic
Identifies an object as an instance of GridResponsive class, or subclass thereof.

Misc

responsiveLevel: Stringreadonly

Get currently used responsive level (as string)

Events

1

Grid resize lead to a new responsive level being applied

// Adding a listener using the "on" method
gridResponsive.on('responsive', ({ grid, level, width, oldLevel, oldWidth }) => {

});
ParameterTypeDescription
gridGrid

Grid that was resized

levelString

New responsive level (small, large, etc)

widthNumber

New width in px

oldLevelString

Old responsive level

oldWidthNumber

Old width in px

Event handlers

1

Grid resize lead to a new responsive level being applied

new GridResponsive({
    onResponsive({ grid, level, width, oldLevel, oldWidth }) {

    }
});
ParameterTypeDescription
gridGrid

Grid that was resized

levelString

New responsive level (small, large, etc)

widthNumber

New width in px

oldLevelString

Old responsive level

oldWidthNumber

Old width in px

Typedefs

1

Configuration object for a responsive level. Contains a required levelWidth plus any GridState properties to apply when this level is active.

ParameterTypeDescription
levelWidthNumber | String

The width threshold for this level, or '*' for all sizes above other levels