GithubHelp home page GithubHelp logo

adityanaag3 / lwc-clock-utils Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 526 KB

A collection of clock related LWC OSS components.

Home Page: https://www.npmjs.com/package/lwc-clock-utils

License: Creative Commons Zero v1.0 Universal

JavaScript 52.33% HTML 28.71% CSS 18.96%
lwc-oss lwc-component npm timer-component

lwc-clock-utils's Introduction

Clock Utils for Lightning Web Components

npm version

A collection of clock related Lightning Web Components Open Source (LWC OSS) components.

Installation and Usage

  • Run the command npm install lwc-clock-utils in your LWC OSS project's root folder.
  • Update the lwc.config.json file in your project to include a new object { "npm": "lwc-clock-utils" } in the modules array.
  • Use any of the components listed below.

Timer Component

A visually stunning countdown timer.

Usage

Use the tag <clock-timer></clock-timer>.

Attributes

Name Description
duration-in-seconds Required. The duration of the timer in seconds
start-on-load Optional. If specified, the timer starts immediately when the component loads.

Methods

Name Description
startTimer() Starts the timer. You dont need to call it if start-on-load attribute is set.
resetTimer() Resets the timer to restart from the duration-in-seconds specified

Events

The component emits a timeup event when the timer runs out.

Example

Check the component src/modules/my/app to see how the Timer Component is used.


Make it your own

Start simple by running yarn watch (or npm run watch, if you set up the project with npm). This will start the project with a local development server.

The source files are located in the src folder. All web components are within the src/modules folder. The folder hierarchy also represents the naming structure of the web components.

lwc-clock-utils's People

Contributors

adityanaag3 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tulasiramt

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.