GithubHelp home page GithubHelp logo

rofixro / css-3d-progress Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 675 KB

3D Progress Bar

Home Page: https://css-3d-progress.netlify.app

License: MIT License

CSS 10.44% JavaScript 39.75% HTML 49.81%
react svelte vue webcomponents progress-bar

css-3d-progress's Introduction

logo

A 3D progress bar component written using web Components, supports Vue, React and Svelte.

Install

npm install css-3d-progress

Usage

Web Components

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>css-3d-progress</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script defer src="https://unpkg.com/[email protected]/css-3d-progress.js"></script>
    <style>
      body {
        margin: 0;
        height: 100vh;
        display: grid;
        place-items: center;
        background-color: #d0d0d0;
      }
    </style>
  </head>
  <body>
    <div style="width: 20em">
      <css-3d-progress percent="60"></css-3d-progress>
    </div>
  </body>
</html>

Vue

<script setup>
import "css-3d-progress";
import { ref } from "vue";

const percent = ref(60);
</script>

<template>
  <div style="width: 20em">
    <css-3d-progress :percent="percent"></css-3d-progress>
  </div>
</template>

React

import "css-3d-progress";
import { useState } from "react";

function App() {
  const [percent] = useState(60);
  const style = { width: "20em" };

  return (
    <>
      <div style={style}>
        <css-3d-progress percent={percent}></css-3d-progress>
      </div>
    </>
  );
}

export default App;

Svelte

<script>
  import "css-3d-progress";

  const percent = 60;
</script>

<main>
  <div style="width: 20em;">
    <css-3d-progress {percent}></css-3d-progress>
  </div>
</main>

Options

Name Type Default Description
percent string 0 To set the completion percentage
is-animation string false Whether to enable flow effects
stroke-color string #ec008c99 The color of progress bar
trail-color string #fefefe4d The color of unfilled part
back-shadow string -0.5em -1.5em 4em #ec008ccc Box-shadow on back
bottom-shadow string 0em 0em 2em #ec008ccc Box-shadow on bottom

Badge

standard-readme compliant

Related Efforts

License

MIT

css-3d-progress's People

Contributors

rofixro avatar turbobot-temp avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.