Skip to content

Grid 宫格

Layout · Interactive component

Grid layouts and grid items.

On-demand importwbbb-ui/components/grid

Basic Usage

Example code
<script setup lang="ts">
import { WbbbGrid } from 'wbbb-ui/components/grid'
import 'wbbb-ui/styles/grid'
</script>

<template>
  <WbbbGrid />
</template>
Live mobile previewOpen in a new tab ↗

States and Interaction

All listed states can be operated and verified in the live Playground preview.

DefaultPressed选中Disabled

API Reference

Props

PropertyDescriptionTypeDefaultRequired
borderedControls whether the container renders an outer border.booleanfalseNo
columnsSets the number of columns in the grid.number4No
gapSets the spacing between repeated items.number16No

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.

Wbbb UI · Built for uni-app product experiences