Module#

Github

The Module component is a panel container component that supports a grid responsive system. It can be nested within any container, allowing developers to flexibly layout and arrange content to adapt to different screen sizes and devices.

import { Module } from "wis/module";

Using in Container#

The Module component supports nesting in any container that implements the Box.

We only show how it’s used with the Page and Layout components here. For other containers, the nesting logic is the same. Let’s look at the example below:

Responsive Module#

If you have any questions about the current responsive system, check out the Responsive System.

API Reference#

NameTypeDefaultDescription
titlestringnoneThe title text will show in the module header.
descriptionstringnoneThe description text will show in the module header.
variantbasic ghostbasicThe visual variant to apply to module.
sizestring number ResponsiveSize12Sets the number of columns the module occupies, with a total of 12 columns, and supports responsive settings. Responsive System
collapsiblebooleanfalseWhen true, the module will be collapsible.
collapsedbooleannoneThe controlled collapse state of the module. Must be used in conjunction with onCollapsed
defaultCollapsedbooleannoneThe collapse state of the module when it is initially rendered.
onCollapsed(collapsed: boolean) => voidnoneEvent handler called when the module is collapse state change.