--- name: View Components description: Core container components for layout and structure --- # View Components ## view Basic container component, similar to HTML `
`. ```vue ``` **Properties:** | Property | Type | Default | Description | |----------|------|---------|-------------| | hover-class | String | none | CSS class when pressed | | hover-stop-propagation | Boolean | false | Stop propagation to ancestor nodes | | hover-start-time | Number | 50 | Delay before hover state (ms) | | hover-stay-time | Number | 400 | Duration to keep hover state (ms) | **Tips:** - `
` is auto-converted to `` in mini-programs - Use `` to wrap text in nvue pages ## scroll-view Scrollable container with enhanced scroll capabilities. ```vue ``` **Properties:** | Property | Type | Description | |----------|------|-------------| | scroll-x | Boolean | Enable horizontal scroll | | scroll-y | Boolean | Enable vertical scroll | | upper-threshold | Number | Distance from top to trigger scrolltoupper (px) | | lower-threshold | Number | Distance from bottom to trigger scrolltolower (px) | | scroll-top | Number | Vertical scroll position | | scroll-left | Number | Horizontal scroll position | | scroll-into-view | String | Element ID to scroll into view | | scroll-with-animation | Boolean | Enable smooth scroll animation | | enable-back-to-top | Boolean | iOS: tap status bar to scroll top | **Events:** - `@scroll` - Scroll event - `@scrolltoupper` - Reached top - `@scrolltolower` - Reached bottom ## swiper Carousel/slider container for switching content. ```vue ``` **swiper Properties:** | Property | Type | Default | Description | |----------|------|---------|-------------| | indicator-dots | Boolean | false | Show pagination dots | | indicator-color | Color | rgba(0,0,0,.3) | Inactive dot color | | indicator-active-color | Color | #000000 | Active dot color | | autoplay | Boolean | false | Auto-play slides | | current | Number | 0 | Current slide index | | interval | Number | 5000 | Auto-play interval (ms) | | duration | Number | 500 | Transition duration (ms) | | circular | Boolean | false | Circular sliding | | vertical | Boolean | false | Vertical sliding | | previous-margin | String | 0px | Previous slide margin | | next-margin | String | 0px | Next slide margin | ## movable-area / movable-view Draggable and scalable container. ```vue ``` **movable-view Properties:** | Property | Type | Default | Description | |----------|------|---------|-------------| | direction | String | none | Move direction: all/vertical/horizontal/none | | x | Number | | Initial X position | | y | Number | | Initial Y position | | scale | Boolean | false | Enable scaling | | scale-min | Number | 0.5 | Min scale | | scale-max | Number | 10 | Max scale | | scale-value | Number | 1 | Initial scale | ## cover-view / cover-image Native overlay components that can cover native components (map, video, canvas). ```vue ``` **Limitations:** - Only supported in WeChat MP, App, and H5 - Limited styling capabilities - Cannot nest regular components inside