New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

v3-skeleton

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v3-skeleton

`Vue3Skeleton` is a Vue 3 component designed to display a skeleton loading animation while content is being loaded. You can use it to improve the user experience while the main content or data is still loading.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Vue3 Skeleton

Vue3Skeleton is a Vue 3 component designed to display a skeleton loading animation while content is being loaded. You can use it to improve the user experience while the main content or data is still loading.

Installation

First, install the package using npm or yarn:

npm install v3-skeleton

or

yarn add v3-skeleton

Basic Usage

Here’s an example of how to use the Vue3Skeleton component in your project:

<template>
  <Vue3Skeleton :loading="true" width="100%" height="20px">
    <template #default>
      <!-- Content to show when not loading -->
      <p>Loaded content</p>
    </template>
  </Vue3Skeleton>
</template>

<script setup>
import Vue3Skeleton from 'v3-skeleton';
</script>

See the a example project here.

Props

PropTypeDefault ValueDescription
asString'div'The HTML tag used to wrap the skeleton. You can change it to any valid tag.
loadingBooleanfalseIf true, shows the skeleton, otherwise shows the slotted content.
widthString'100%'The width of the skeleton. Any valid CSS width value is accepted.
heightString'20px'The height of the skeleton. Any valid CSS height value is accepted.
borderRadiusString'4px'The border-radius of the skeleton element.
backgroundColorString'#e0e0e0'The primary background color of the skeleton.
toColorString'#f0f0f0'The secondary color for the skeleton animation gradient.
intervalString'3s'The animation duration for the skeleton. You can use any valid duration.

Slots

  • default: The content to be displayed when loading is false.

Custom Styles

You can adjust the visual behavior of the skeleton via the props such as width, height, backgroundColor, borderRadius, etc.

Additionally, you can override the style in your own CSS file to fit the specific needs of your application:

.skeleton {
  width: 200px;
  height: 40px;
  background-color: #ccc;
  border-radius: 8px;
}

Animation

The animation is configurable using the interval prop, which adjusts the animation cycle duration. If you want to modify more aspects of the animation, you can do so via direct CSS styling.

Contribution

If you find any issues or would like to contribute to the project, feel free to open an issue or submit a pull request.


Thank you for using Vue3Skeleton!

Keywords

FAQs

Package last updated on 15 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc