This project demonstrates the implementation of loading skeletons in a Vue.js application using Tailwind CSS. It showcases how to manage loading states effectively in frontend engineering, providing a smooth user experience with visual feedback during data fetching.
The application features a masonry layout that displays either loading skeletons or actual content, depending on the loading state. This approach is particularly useful when dealing with slow internet connections or when loading large amounts of data.
To get started with this project, follow these steps:
Clone the repository:
git clone https://github.com/Aldikrasniqi/vue-tailwind-loading-skeleton.git
Navigate to the project directory:
cd vue-tailwind-loading-skeleton
Install the dependencies:
npm install
Run the development server:
npm run dev
Open your browser and visit http://localhost:5173
(or the port shown in your terminal).
You will see:
The main component of this project is HomeView.vue
and UsersView.vue
. It contains:
To modify the number of items or the delay in the simulated API call, you can adjust the values in the fetchPosts
function within HomeView.vue
.
Contributions are welcome! Please feel free to submit a Pull Request.
If you have any questions or feedback, please reach out to my email (mailto:aldikrasniqi5@gmail.com).