Layout
WrapPanel
Lays children out in a line and wraps to the next when it is full, across or down, with an optional uniform size.
WAI-ARIA tested
Import
main.ts
import { WrapPanel } from '@vitral/vue';Horizontal
Each child keeps its own width. Drag the frame's corner to resize it and watch the lines re-flow.
ButtonCheckBoxComboBoxDatePickerExpanderGridListBoxMenuNumericUpDownProgressBarRadioButtonSliderSplitViewTabControlTextBoxToggleSwitchTreeView
ItemWidth and ItemHeight
item-width="120" item-height="72": every child the same size, whatever its content.
Photos
Mail
Maps
Music
Video
News
Store
Weather
Clock
Notes
Vertical
Fills columns top to bottom; needs a height to wrap in.
ButtonCheckBoxComboBoxDatePickerExpanderGridListBoxMenuNumericUpDownProgressBarRadioButtonSliderSplitViewTabControlTextBoxToggleSwitchTreeView
API
Read from packages/vue/src/components/WrapPanel/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| orientation | 'vertical' | 'horizontal' | `horizontal` (the default) fills rows and wraps downwards; `vertical` fills columns and needs a height to wrap in. |
| itemWidth | number | string | Every child gets this width. A number of pixels or any CSS length. |
| itemHeight | number | string | Every child gets this height. |
| spacing | number | string | Space between children and between lines. Defaults to the `wrappanel.spacing` token. |
| as | string | Component | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | — |