Vue Horizontal Layout Component

0.8.13 · active · verified Tue Apr 21

Vue Horizontal is a dedicated Vue.js component designed to simplify the creation of horizontal, scrollable layouts for modern responsive web applications. It offers a pure Vue-native solution, avoiding direct DOM manipulation or external legacy JavaScript libraries, requiring only Vue as a peer dependency. The library explicitly supports all rendering modes including Single Page Applications (SPA), Server-Side Rendering (SSR), and Static Site Generation (SSG), with comprehensive end-to-end testing. Currently stable at version 0.8.13, it primarily supports Vue 2, while a Vue 3 compatible version is available under the `@next` tag. The project maintains an active release cadence, with frequent bug fixes and maintenance updates. Key differentiators include its lightweight footprint (approximately 3 KB on CDN), mobile-first design philosophy, customizable navigation options, and high extensibility, granting developers full control over HTML structure, CSS styling, and interaction logic to achieve desired UX patterns like smooth scrolling and snapping.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates importing and using VueHorizontal with a v-for loop to render a dynamic list of items.

<template>
  <vue-horizontal responsive>
    <section v-for="item in items" :key="item.title">
      <h3>{{ item.title }}</h3>
      <p>{{ item.content }}</p>
    </section>
  </vue-horizontal>
</template>

<script>
import VueHorizontal from "vue-horizontal";

export default {
  components: {VueHorizontal},
  data() {
    return {
      items: [...Array(20).keys()].map((i) => {
        return {title: `Item ${i}`, content: `🚀 Content ${i}`};
      }),
    }
  }
}
</script>

<style scoped>
section {
  padding: 16px 24px;
  background: #f5f5f5;
}
</style>

view raw JSON →