Gathering detailed insights and metrics for vue-client-only
Gathering detailed insights and metrics for vue-client-only
Gathering detailed insights and metrics for vue-client-only
Gathering detailed insights and metrics for vue-client-only
@duannx/vue-client-only
[](https://www.npmjs.com/package/vue-client-only) []()
openapi-fetch
Fast, type-safe fetch client for your OpenAPI schema. Only 6 kb (min). Works with React, Vue, Svelte, or vanilla JS.
@vue-cdk/client-only
@ikun-ui/client-only
Vue component to wrap non SSR friendly components (428 bytes)
npm install vue-client-only
Typescript
Module System
Node Version
NPM Version
99.8
Supply Chain
98.9
Quality
75.1
Maintenance
100
Vulnerability
100
License
JavaScript (62.86%)
TypeScript (21.85%)
Vue (15.29%)
Total Downloads
81,025,150
Last Day
9,820
Last Week
193,026
Last Month
819,440
Last Year
9,907,542
MIT License
474 Stars
41 Commits
37 Forks
5 Watchers
23 Branches
7 Contributors
Updated on May 21, 2025
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
vue-client-only@2.1.0
Size
3.46 kB
NPM Version
7.15.1
Node Version
16.2.0
Published on
Jun 03, 2021
Cumulative downloads
Total Downloads
8
1yarn add vue-client-only
This project is previously known as vue-no-ssr, switch to 1.x branch for the old docs.
1<template> 2 <div id="app"> 3 <h1>My Website</h1> 4 <client-only> 5 <!-- this component will only be rendered on client-side --> 6 <comments /> 7 </client-only> 8 </div> 9</template> 10 11<script> 12 import ClientOnly from 'vue-client-only' 13 14 export default { 15 components: { 16 ClientOnly 17 } 18 } 19</script>
Use a slot or text as placeholder until <client-only />
is mounted on client-side.
eg, show a loading indicator.
1<template> 2 <div id="app"> 3 <h1>My Website</h1> 4 <!-- use slot --> 5 <client-only> 6 <comments /> 7 <comments-placeholder slot="placeholder" /> 8 </client-only> 9 <!-- or use text --> 10 <client-only placeholder="Loading..."> 11 <comments /> 12 </client-only> 13 </div> 14</template> 15 16<script> 17 import ClientOnly from 'vue-client-only' 18 19 export default { 20 components: { 21 ClientOnly 22 } 23 } 24</script>
By default the placeholder will be wrapped in a div
tag, however you can use placeholderTag
prop to customize it:
1<client-only placeholder="loading" placeholder-tag="span"> 2 <comments /> 3</client-only>
And you get:
1<span class="client-only-placeholder"> 2 loading 3</span>
If prop placeholder
is an empty string (or null
) and no placeholder
slot is found, then <client-only>
will render the Vue placeholder element <!---->
instead of rendering the placholder-tag
during SSR render.
1yarn install 2 3# Run example 4yarn example
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
vue-client-only © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).
egoist.moe · GitHub @egoist · Twitter @_egoistlily
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/19 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
121 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
-20.1%
9,820
Compared to previous day
Last Week
-4.7%
193,026
Compared to previous week
Last Month
-1.1%
819,440
Compared to previous month
Last Year
-28.2%
9,907,542
Compared to previous year