Skip to content

Commit 77fbe87

Browse files
authored
Merge pull request #7 from selemondev/docs
docs: update README.md
2 parents f2599a7 + b3cc492 commit 77fbe87

File tree

1 file changed

+63
-22
lines changed

1 file changed

+63
-22
lines changed

examples/vue3-marquee/README.md

Lines changed: 63 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,81 @@
1-
# vue3-marquee
1+
<div align="center">
22

3-
This template should help get you started developing with Vue 3 in Vite.
3+
# Marquee <br> 🌬️
44

5-
## Recommended IDE Setup
5+
> A beautiful marquee component for Vue.
66
7-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
7+
</div>
88

9-
## Type Support for `.vue` Imports in TS
9+
## Installation
1010

11-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
11+
```bash
12+
npm install @selemondev/vue3-marquee
13+
```
14+
or you can skip npm install, and just copy and paste the source code into your component like Shadcn Vue (don't forget to also copy the tailwind config if you do this).
1215

13-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
16+
## Register it as a global component
1417

15-
1. Disable the built-in TypeScript Extension
16-
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17-
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
18+
```js
19+
import { Marquee } from "@selemondev/vue3-marquee";
20+
import "@selemondev/vue3-marquee/dist/style.css"
21+
import { createApp } from 'vue'
22+
import App from './App.vue'
1923

20-
## Customize configuration
24+
const app = createApp(App);
25+
app.component('Marquee', Marquee)
26+
app.mount('#app')
27+
```
2128

22-
See [Vite Configuration Reference](https://vitejs.dev/config/).
29+
or
2330

24-
## Project Setup
31+
## Register it as a local component
2532

26-
```sh
27-
npm install
33+
```js
34+
import { Marquee } from "@selemondev/vue3-marquee";
35+
import "@selemondev/vue3-marquee/dist/style.css"
2836
```
2937

30-
### Compile and Hot-Reload for Development
38+
## Nuxt
39+
40+
If you are using Nuxt 3, you can simply register it as a Nuxt plugin as shown below:
3141

32-
```sh
33-
npm run dev
42+
```ts
43+
// plugins/marquee.ts
44+
45+
import { Marquee } from "@selemondev/vue3-marquee";
46+
import "@selemondev/vue3-marquee/dist/style.css"
47+
export default defineNuxtPlugin((nuxtApp) => {
48+
nuxtApp.vueApp.component('Marquee', Marquee)
49+
})
3450
```
3551

36-
### Type-Check, Compile and Minify for Production
52+
## Usage
53+
54+
The library has a few props that are self-explanatory; you can get it running in no time. See the web examples for more details.
3755

38-
```sh
39-
npm run build
56+
```js
57+
<Marquee
58+
:fade="true"
59+
direction="left"
60+
:reverse="false"
61+
:pauseOnHover="false"
62+
className="" // pass class to change gap or speed
63+
innerClassName="" // pass class to change gap or speed
64+
>
65+
<div>Content 1</div>
66+
<div>Content 2</div>
67+
<div>Content 3</div>
68+
<div>Content 4</div>
69+
</Marquee>
4070
```
71+
72+
This library is made specifically for Tailwind users, however you can also use vanilla CSS classes to override the gap.
73+
74+
## Credits
75+
76+
- Inspired by [@devnomic's](https://github.com/devnomic) React Marquee component.
77+
78+
## License
79+
80+
Released under [MIT](/LICENSE) by [@selemondev](https://github.com/selemondev).
81+

0 commit comments

Comments
 (0)