Socket
Socket
Sign inDemoInstall

vue

Package Overview
Dependencies
0
Maintainers
1
Versions
499
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue

A mini front-end MVVM framework


Version published
Maintainers
1
Install size
81.4 kB
Created

Package description

What is vue?

Vue.js is a progressive JavaScript framework used for building user interfaces and single-page applications. It is designed to be incrementally adoptable, meaning that it can be used for more than just the interface layer of an application. Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with modern tooling and supporting libraries.

What are vue's main functionalities?

Reactive Data Binding

Vue.js offers a reactive and composable data binding system. When the state of the application changes, the view automatically updates to reflect the new state.

{"html": "<div id='app'>{{ message }}</div>", "javascript": "var app = new Vue({ el: '#app', data: { message: 'Hello Vue!' } })"}

Components

Vue allows developers to build encapsulated and reusable components, which can have their own state and methods. These components can be composed to build complex user interfaces.

{"javascript": "Vue.component('todo-item', { props: ['todo'], template: '<li>{{ todo.text }}</li>' })"}

Directives

Vue provides a set of built-in directives such as v-if, v-for, v-bind, and v-on, which offer functionality to HTML templates, allowing for declarative rendering and handling of user interactions.

{"html": "<p v-if='seen'>Now you see me</p>", "javascript": "new Vue({ el: '#app', data: { seen: true } })"}

Transition Effects

Vue has a transition system that can apply automatic transition effects when elements are inserted, updated, or removed from the DOM. This feature allows for adding interactive and engaging animations to the UI.

{"html": "<transition name='fade'><p v-if='show'>Hello Vue!</p></transition>", "javascript": "new Vue({ el: '#app', data: { show: true } })"}

Vuex for State Management

For larger applications, Vue can be used with Vuex, a state management pattern and library that helps manage state outside of Vue components for more complex applications.

{"javascript": "const store = new Vuex.Store({ state: { count: 0 }, mutations: { increment: state => state.count++ } })"}

Vue Router for Single Page Applications

Vue Router is the official router for Vue.js, which makes it easy to build single-page applications with Vue by allowing different views to be mapped to different paths.

{"javascript": "const router = new VueRouter({ routes: [{ path: '/foo', component: Foo }, { path: '/bar', component: Bar }] })"}

Other packages similar to vue

Readme

Source

VueJS Build Status

Simple, fast, modular & lightweight MVVM library for building interactive user interfaces.

Features

  • 10kb gzipped, no dependency.
  • DOM based templates with two-way data binding.
  • Precise and efficient DOM manipulation with granularity down to a TextNode.
  • POJSO (Plain Old JavaScript Objects) Models that can be shared across ViewModels with arbitrary levels of nesting.
  • Auto dependency tracking for expressions and computed properties.
  • Auto event delegation on repeated items.
  • Flexible API that encourages composition of components.
  • Extendable with custom directives and filters.
  • Supports partials, transitions and nested ViewModels.
  • Plays well with module systems. Primarily Component based, but can also be used with Browserify, as a CommonJS/AMD module or as a standalone library.

Browser Support

  • Most Webkit/Blink-based browsers
  • Firefox 4+
  • IE9+ (IE9 needs classList polyfill and doesn't support transitions)

Installation

Component

$ component install yyx990803/vue

Browserify

$ npm install vue

Bower

$ bower install vue

Module Loaders, e.g. RequireJS, SeaJS

Built versions in /dist or installed via Bower can be used directly as a CommonJS or AMD module.

Standalone

Simply include a built version in /dist or installed via Bower with a script tag. Vue will be registered as a global variable.

Development

# in case you don't already have them:
# npm install -g grunt-cli component
$ npm install
$ component install

To build:

$ grunt build

To watch and auto-build dev version during development:

$ grunt watch

To test (install CasperJS first):

$ grunt test

Quickstart

HTML

<div id="demo" v-on="click:changeText">
    <p v-text="hello"></p>
</div>

JavaScript

new Vue({
    el: '#demo',
    scope: {
        hello: 'Hello World!',
        changeText: function () {
            this.hello = 'Hello VueJS!'
        }
    }
})

Documentation

Coming soon...

License

MIT

Keywords

FAQs

Last updated on 24 Dec 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc