Grid 宫格
Layout · Interactive component
Grid layouts and grid items.
On-demand import
wbbb-ui/components/gridBasic Usage
<script setup lang="ts">
import { WbbbGrid } from 'wbbb-ui/components/grid'
import 'wbbb-ui/styles/grid'
</script>
<template>
<WbbbGrid />
</template>States and Interaction
All listed states can be operated and verified in the live Playground preview.
DefaultPressed选中Disabled
API Reference
Props
| Property | Description | Type | Default | Required |
|---|---|---|---|---|
bordered | Controls whether the container renders an outer border. | boolean | false | No |
columns | Sets the number of columns in the grid. | number | 4 | No |
gap | Sets the spacing between repeated items. | number | 16 | No |
Events
None
Slots
default
Two-way binding
Does not support v-model.
Platform Notes
Build verification: H5, App Vue, WeChat Mini Program, Alipay Mini Program, and Douyin Mini Program.
Runtime differences: H5 supports keyboard focus and reduced motion. Mini Programs provide equivalent touch interaction; verify upload, date selection, and overlays on target platforms.
Usage note: Use Playground to verify further state combinations and cross-platform behavior.
