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#
Name | Type | Default | Description |
---|---|---|---|
title | string | none | The title text will show in the module header. |
description | string | none | The description text will show in the module header. |
variant | basic ghost | basic | The visual variant to apply to module. |
size | string number ResponsiveSize | 12 | Sets the number of columns the module occupies, with a total of 12 columns, and supports responsive settings. Responsive System |
collapsible | boolean | false | When true , the module will be collapsible. |
collapsed | boolean | none | The controlled collapse state of the module. Must be used in conjunction with onCollapsed |
defaultCollapsed | boolean | none | The collapse state of the module when it is initially rendered. |
onCollapsed | (collapsed: boolean) => void | none | Event handler called when the module is collapse state change. |