Skip to content

Commit d02d698

Browse files
committed
feat: 📝 update readme
1 parent abeac28 commit d02d698

File tree

2 files changed

+49
-4
lines changed

2 files changed

+49
-4
lines changed

README.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://github.com/mubaidr/vite-vue3-browser-extension-v3/actions/workflows/build.yml/badge.svg)](https://github.com/mubaidr/vite-vue3-browser-extension-v3/actions/workflows/build.yml)
44

5-
A modern, opinionated starter template for building browser extensions using [Vite](https://vitejs.dev/), [Vue 3](https://vuejs.org/), and Manifest V3. Supports Chrome, Firefox, and more. Includes pre-configured routing, state management, composables, and a rich set of UI components from Nuxt/UI v3.
5+
A modern, opinionated starter template for building browser extensions using [Vite](https://vitejs.dev/), [Vue 3](https://vuejs.org/), and Manifest V3. Supports Chrome, Firefox, and more. Includes pre-configured routing, state management, composables, and a rich set of UI components from Nuxt/UI v3. **Now with shadcn-vue support for additional component options!**
66

77
---
88

@@ -12,7 +12,7 @@ A modern, opinionated starter template for building browser extensions using [Vi
1212
- **File-Based Routing**: Add a file in `src/pages` or relevant UI directory—auto-registered as a route.
1313
- **Composable Architecture**: Prebuilt composables for i18n, theme, notifications, browser storage, and more.
1414
- **State Management**: Type-safe Pinia stores (persistent & non-persistent).
15-
- **UI Components**: Header, Footer, Locale & Theme Switch, Loading Spinner, Error Boundary, Empty State, Notifications.
15+
- **UI Components**: Header, Footer, Locale & Theme Switch, Loading Spinner, Error Boundary, Empty State, Notifications, plus shadcn-vue components.
1616
- **Modern Tooling**: Nuxt/UI 3, Tailwind CSS 4, ESLint, Prettier, auto-imports, and more.
1717
- **WebExtension Utilities**: `webext-bridge` for context communication, `webextension-polyfill` for browser API compatibility.
1818

@@ -44,6 +44,19 @@ npm run dev
4444

4545
Load the extension from the `dist/chrome` or `dist/firefox` folder in your browser.
4646

47+
### Adding shadcn-vue Components
48+
49+
To add shadcn-vue components to your extension:
50+
51+
```bash
52+
npx shadcn-vue@latest init
53+
npx shadcn-vue@latest add button
54+
npx shadcn-vue@latest add input
55+
npx shadcn-vue@latest add card
56+
```
57+
58+
The components will be automatically configured and ready to use in your Vue files.
59+
4760
---
4861

4962
## 🧩 Example: useBrowserStorage
@@ -67,11 +80,44 @@ console.log(userProfile.value.name) // 'John Doe'
6780

6881
---
6982

83+
## 🎨 shadcn-vue Integration
84+
85+
This template includes [shadcn-vue](https://www.shadcn-vue.com/) for additional high-quality, accessible components. The project is pre-configured with:
86+
87+
- **Component Installation**: Use `npx shadcn-vue@latest add <component>` to add components
88+
- **Automatic Integration**: Components work seamlessly with existing Tailwind CSS setup
89+
- **TypeScript Support**: Full type safety for all shadcn-vue components
90+
- **Customizable**: Easy theming and customization through CSS variables
91+
92+
### Example: Adding a Button Component
93+
94+
```bash
95+
npx shadcn-vue@latest add button
96+
```
97+
98+
```vue
99+
<template>
100+
<Button variant="default" size="sm" @click="handleClick">
101+
Click me
102+
</Button>
103+
</template>
104+
105+
<script setup lang="ts">
106+
import { Button } from '@/components/ui/button'
107+
108+
function handleClick() {
109+
console.log('Button clicked!')
110+
}
111+
</script>
112+
```
113+
114+
---
115+
70116
## 🔌 Plugins & Libraries
71117

72118
- **Vite Plugins**: unplugin-vue-router, unplugin-auto-import, unplugin-vue-components, unplugin-icons, unplugin-turbo-console, @intlify/unplugin-vue-i18n
73119
- **Vue Plugins**: Pinia, VueUse, Notivue, Vue-i18n
74-
- **UI**: Nuxt/UI, Tailwind CSS 4
120+
- **UI**: Nuxt/UI, shadcn-vue, Tailwind CSS 4
75121
- **WebExtension**: webext-bridge, webextension-polyfill
76122
- **Utilities**: Marked (for markdown rendering)
77123
- **Coding Style**: TypeScript, ESLint, Prettier

src/types/components.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ declare module 'vue' {
2020
ThemeSwitch: typeof import('./../components/ThemeSwitch.vue')['default']
2121
UApp: typeof import('./../../node_modules/@nuxt/ui/dist/runtime/components/App.vue')['default']
2222
UButton: typeof import('./../../node_modules/@nuxt/ui/dist/runtime/components/Button.vue')['default']
23-
UCard: typeof import('./../../node_modules/@nuxt/ui/dist/runtime/components/Card.vue')['default']
2423
UForm: typeof import('./../../node_modules/@nuxt/ui/dist/runtime/components/Form.vue')['default']
2524
UFormField: typeof import('./../../node_modules/@nuxt/ui/dist/runtime/components/FormField.vue')['default']
2625
UInput: typeof import('./../../node_modules/@nuxt/ui/dist/runtime/components/Input.vue')['default']

0 commit comments

Comments
 (0)