# @shapla/vue-toggles

> A simple accordion/toggle component for Vue 3

Latest version **1.0.0** (published 2021-06-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @shapla/vue-toggles
pnpm add @shapla/vue-toggles
yarn add @shapla/vue-toggles
bun add @shapla/vue-toggles
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-06-03 |
| First published | 2021-06-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 46.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sayful Islam |
| Maintainers | sayful |
| Keywords | vue, vue-component, accordion, toggles, toggle |

## Links

- npm: https://www.npmjs.com/package/@shapla/vue-toggles
- Repository: https://github.com/sayful1/shapla-vue-components
- Homepage: https://github.com/sayful1/shapla-vue-components#readme
- Issues: https://github.com/sayful1/shapla-vue-components/issues
- npm.io page: https://npm.io/package/@shapla/vue-toggles

## Dependencies (1)

- [shapla-css](https://npm.io/package/shapla-css.md) ^2.0

## Recent versions

- 1.0.0 (latest) — 2021-06-03

## README

# Shapla Toggles

A simple accordion/toggle component for Vue 3

## Table of contents

- [Installation](#installation)
- [Usage](#usage)

# Installation

```
npm install --save @shapla/vue-toggles
```

# Usage

Add the component:

```js
import {ShaplaToggles, ShaplaToggle} from '@shapla/vue-toggles';

export default {
  name: 'Hello',
  components: {ShaplaToggles, ShaplaToggle}
}

```

```html

<shapla-toggles>
  <shapla-toggle name="Toggle One" :selected="true">
    <!-- content -->
  </shapla-toggle>
  <shapla-toggle name="Toggle Two">
    <!-- content -->
  </shapla-toggle>
</shapla-toggles>
```

### Props for `ShaplaToggles`

| Property      | Type      | Required  | Default   | Description                                                                                        |
|---------------|-----------|-----------|-----------|----------------------------------------------------------------------------------------------------|
| `accordion`   | Boolean   | **no**    |  `true`   | If you set `false`. All toggle components can be opened. Otherwise opening one will close another. |
| `iconPosition`| String    | **no**    |  `left`   | Value can be `left` or `right`.                                                                    |
| `boxedMode`   | Boolean   | **no**    |  `true`   | Set `false` if you don't want border on all side.                                                  |
| `showDivider` | Boolean   | **no**    |  `true`   | Only works when `boxedMode` is `false`. Remove all borders.                                        |

### Props for `ShaplaToggle`

| Property      | Type      | Required  | Default   | Description                               |
|---------------|-----------|-----------|-----------|-------------------------------------------|
| `name`        | String    | **yes**   | `true`    | Toggle title.                             |
| `subtext`     | String    | **yes**   | `true`    | Toggle subtitle.                          |
| `selected`    | Boolean   | **no**    |  `false`  | Set true if you to keep open by default.  |

---
_Source: https://npm.io/package/@shapla/vue-toggles · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
