An open API service indexing awesome lists of open source software.

https://github.com/kim366/vue-details

Proper support for the HTML5 <details> tag in Vue 2 including v-model attribute (<1KB)
https://github.com/kim366/vue-details

Last synced: 3 months ago
JSON representation

Proper support for the HTML5 <details> tag in Vue 2 including v-model attribute (<1KB)

Awesome Lists containing this project

README

          

[![npm version](https://badge.fury.io/js/vue-details.svg)](https://www.npmjs.com/package/vue-details)

# Vue Details for Vue 2

Proper support for `` tag in Vue.js including `v-model` attribute.

## Get Started

### Using Node.js

Install package
```
npm install vue-details
```

Initialize globally
```js
import Vue from 'vue';
import VueDetails from 'vue-details';

Vue.component('v-details', VueDetails);
```

or locally as shown in the example below.

### Using CDN

Load script

```html

```

or

```html

```

Register component

```js
Vue.component('v-details', VueDetails);
```

## An Example

### Try it Online
- [Codepen](https://codepen.io/kim366/pen/OZGLVY)

### Code in a `.vue` File

```vue



Content is {{ open ? 'shown' : 'hidden' }}


Expandable content


import VueDetails from 'vue-details';

export default {
data() {
return {
open: true
}
},
components: { 'v-details': VueDetails }
}

```