samorphic-vue
Version:
A Vue 3 component library styled with neumorphism, including buttons, inputs, cards, and more.
104 lines (75 loc) β’ 2.36 kB
Markdown
# samorphic-vue
A Vue 3 component library styled with **neumorphism** β soft UI with smooth shadows.
Includes buttons, inputs, cards, avatars, toggles, icon buttons, and a fully functional toast system.


## β¨ Features
- π‘ Vue 3 Composition API support
- π¨ Neumorphic UI design
- π’ Toasts with `info`, `success`, `warn`, `alert`
- π§© Easy component registration via `app.use()`
- βοΈ TypeScript support
- π§ͺ Ready for local or NPM usage
## π¦ Installation
```bash
pnpm add samorphic-vue
# or
npm install samorphic-vue
```
## π Quick Start
### 1. Register globally in `main.ts`
```ts
import { createApp } from 'vue'
import App from './App.vue'
import { SamorphicVue } from 'samorphic-vue'
const app = createApp(App)
app.use(SamorphicVue) // β
registers components + toasts
app.mount('#app')
```
### 2. Use components in your templates
```vue
<template>
<SButton @click="toast({ title: 'Hey!', message: 'This is a toast.' })">Click me</SButton>
<SInput v-model="name" placeholder="Your name" />
<SSwitch v-model="isOn" />
<SCard>Some neumorphic content</SCard>
<SToastContainer />
</template>
<script setup>
import { ref } from 'vue'
import { useToast } from 'samorphic-vue'
const toast = useToast()
const name = ref('')
const isOn = ref(false)
</script>
```
## π’ Toast API
```ts
toast({
title: 'Optional title',
message: 'Your message here',
type: 'info' | 'success' | 'warn' | 'alert', // optional, default = "info"
timeout: 5000 // optional, default = 4000ms
})
```
## π§© Available Components
| Component | Description |
|------------------|-------------------------------------|
| `SButton` | Neumorphic button |
| `SSwitch` | Toggle switch |
| `SInput` | Input field |
| `SCard` | Container/card |
| `SAvatar` | Image or initials |
| `SIconButton` | Button with icon |
| `SToastContainer` | Toast system container |
## π License
[MIT](./LICENSE)
Made with π by [Samuel CaetitΓ©](https://www.linkedin.com/in/samuelcaetite/)