https://github.com/hebilicious/vue-switch-match
Switch Match components for Vue and Nuxt.
https://github.com/hebilicious/vue-switch-match
Last synced: 10 months ago
JSON representation
Switch Match components for Vue and Nuxt.
- Host: GitHub
- URL: https://github.com/hebilicious/vue-switch-match
- Owner: Hebilicious
- License: mit
- Created: 2024-11-22T09:16:54.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-29T13:42:12.000Z (over 1 year ago)
- Last Synced: 2024-11-29T14:39:26.192Z (over 1 year ago)
- Language: TypeScript
- Size: 153 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Vue Switch Match
[](https://github.com/Hebilicious/vue-switch-match/actions/workflows/ci.yaml)
[](https://badge.fury.io/js/@hebilicious%2Fnuxt-switch-match)
[](https://badge.fury.io/js/@hebilicious%2Fvue-switch-match)
[](https://opensource.org/licenses/MIT)
🚀 Pattern Matching Switch Match Component for Vue and Nuxt. Inspired by Solid.js
## 📦 Installation
Refer to the [Vue](./packages/vue-switch-match/README.md) or [Nuxt](./packages/nuxt-switch-match/README.md) README for installation instructions.
## 🚀 Usage
```vue
const state = ref(0)
const swap = () => {
const newValue = state.value === 0 ? 1 : 0
state.value = newValue
}
Click Me !
Fallback
Hello
World
Bye
```
## 📦 Contributing
Contributions, issues and feature requests are welcome!
1. Fork this repo
2. [Install `bun`.](https://bun.sh/docs/installation)
3. Intall pnpm `corepack enable && pnpm corepack use pnpm@latest`
4. Use `pnpm i` at the mono-repo root.
5. Make modifications and follow conventional commits.
6. Open a PR 🚀🚀🚀