Coder Social home page Coder Social logo

ubaldop / vuemodoro Goto Github PK

View Code? Open in Web Editor NEW
38.0 4.0 6.0 227 KB

Vue component implementing a Pomodoro timer

Home Page: http://flatmap.it/vuemodoro

License: MIT License

JavaScript 29.03% Vue 70.97%
pomodoro timer pomodoro-timer pomodoro-clock vue vuejs-components

vuemodoro's Introduction

vuemodoro

SFC Vue component implementing a Pomodoro timer

vuemodoro


Vuemodoro is a Vue Single File Component implementing a countdown timer, intended to provide a Pomodoro countdown in your Vue applications. It comes with a set of properties making the component customizable for your needs. For example, you can customize either the duration of the countdown or the labels of the buttons for interacting with the component.
Moreover, you can choose between different styles for your Vuemodoro look and feel. ๐Ÿ…

Properties

If you need to customize the Pomodoro timer behavior, you can use one of the following optional properties.

Properties Default Description Type
minutes 25 sets the minutes of the countdown Number
seconds 0 sets the seconds of the countdown Number
pomodoro-label Pomodoro Timer adds a descriptive label to the timer container String
start-label Start adds a descriptive label to the start button of the timer String
pause-label Pause adds a descriptive label to the pause button of the timer String
reset-label Reset adds a descriptive label to the reset button of the timer String
muted false defines if the timer must play a sound when the countdown ends. Boolean
theme dark defines the styles of the timer. It comes with three different styles. bare, light and dark are the available options. String

Installation

You can install Vuemodoro using npm:

npm install --save vuemodoro

Alternatively, you can import vuemodoro via <script> tag in the browser directly, avoiding the NPM installation:

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vuemodoro"></script>

Usage

Once installed, it is easy to use it.

Importing the component

First, you need to import vuemodoro in your files. You can do that in different ways. For example, it can be imported into a build process for use in full-fledged Vue applications:

import Pomodoro from 'vuemodoro';

export default {
  components: {
    Pomodoro,
  },
  // rest of the component
}

Using the component

Once imported, you can use your component as follows:

<Pomodoro/>

Themes

Vuemodoro comes with a theme prop. It allows to modify the look and feel of the component. The available options are:

  • bare, it is a minimal look and feel, intended for customization:

vuemodoro

  • light, it is the light theme of Vuemodoro:

vuemodoro

  • dark, it is the dark theme of Vuemodoro:

vuemodoro

Contributing

This component can be improved both in features and performances. Please, help me in doing it better ๐Ÿ…

vuemodoro's People

Contributors

dependabot[bot] avatar p3trur0 avatar ubaldop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vuemodoro's Issues

Labels customization doesn't work

Although specified in the component documentation, in the current version the customization of labels through props does not work.

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.