Skip to content

UseWaffleOptions

Defined in: packages/waffle/src/react/useWaffle.ts:8

What useWaffle takes.

optional columns?: number

Defined in: packages/waffle/src/react/useWaffle.ts:21

Cells per row. Defaults to a square grid.


dimensions: readonly Dimension[]

Defined in: packages/waffle/src/react/useWaffle.ts:12

Every dimension the items carry values for.


optional gap?: number

Defined in: packages/waffle/src/react/useWaffle.ts:23

The space between cells, as a share of the cell pitch. Defaults to 0.15.


optional initialViewId?: string

Defined in: packages/waffle/src/react/useWaffle.ts:19

The view shown first. Defaults to the first.


items: readonly Item[]

Defined in: packages/waffle/src/react/useWaffle.ts:10

One per cell (below the cap), unique ids. Treated as immutable: pass a new array to change it.


optional maxMarks?: number

Defined in: packages/waffle/src/react/useWaffle.ts:25

Above this many items, cells stand for several. Defaults to 1,000.


optional unit?: string

Defined in: packages/waffle/src/react/useWaffle.ts:27

What one item is, for the description and announcements. Defaults to “items”.


optional views?: readonly View[]

Defined in: packages/waffle/src/react/useWaffle.ts:17

The ways of looking, in switcher order. Defaults to one view per dimension, each driving colour, shape and arrangement from that dimension alone.