Skip to content

Instantly share code, notes, and snippets.

@enxg
Created March 11, 2021 14:18
Show Gist options
  • Save enxg/d9cdac3921e84a0db34d58523544e696 to your computer and use it in GitHub Desktop.
Save enxg/d9cdac3921e84a0db34d58523544e696 to your computer and use it in GitHub Desktop.
Vue 2 + Tailwind Progress Bar
<template>
<div class="h-3 relative max-w-xl rounded-full overflow-hidden">
<div class="w-full h-full bg-gray-200 absolute"></div>
<div class="h-full bg-green-500 absolute" :style="{width: value + '%'}"></div>
</div>
</template>
<script>
export default {
name: "progressBar",
props: ["value"]
}
</script>
<style scoped>
</style>
@enxg
Copy link
Author

enxg commented Mar 11, 2021

Example Usage: <progressBar value="75" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment