This package, `vue-content-placeholders`, offers Vue 2 components for generating animated content placeholders, often referred to as "skeleton UI," similar to those seen on platforms like Facebook. It aims to improve user experience during data fetching by providing visual feedback and reducing perceived loading times. The current stable version, 0.2.1, was released in November 2017 and targets Vue 2 applications. Due to its age and lack of updates, it is considered abandoned and not compatible with Vue 3 without significant modifications or using a separate, Vue 3-specific fork. Its primary differentiation was providing a straightforward, component-based API for common placeholder patterns and being one of the early solutions for this UX pattern in the Vue 2 ecosystem.
npm install vue-content-placeholdersVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates installing the `vue-content-placeholders` plugin globally and then using its components in a Vue 2 application to display animated content placeholders while data is simulated to be loading.
For Vue 3 projects, consider using a modern alternative like `vue3-content-placeholders` (a separate package) or `vue-content-loader`.
Ensure your project's build configuration includes appropriate loaders (e.g., `css-loader`, `vue-style-loader` for Webpack) to process and embed CSS files. You might need to explicitly import the CSS file in your main entry point: `import 'vue-content-placeholders/dist/vue-content-placeholders.css';`
While it may still function in existing Vue 2 projects, it's recommended to evaluate more actively maintained alternatives or be aware of the lack of support. For new projects, especially Vue 3, choose a different solution.
Ensure `import VueContentPlaceholders from 'vue-content-placeholders'; Vue.use(VueContentPlaceholders);` is called before your Vue instance is created. Also, verify that your root Vue instance (`new Vue(...)`) is correctly defined and mounted.
Add or verify `css-loader` and `vue-style-loader` (or similar) in your webpack configuration for `.css` files, ensuring it's applied correctly to your Vue project. For example, in webpack, ensure rules for `test: /\.css$/` exist.
This package is incompatible with Vue 3. Migrate to a Vue 3-compatible library for content placeholders, such as `vue3-content-placeholders` or `vue-content-loader`.