Coder Social home page Coder Social logo

paraboly / web-component-chmod-checkbox Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 292 KB

CHMOD based animated checkbox WebComponent with StencilJS

Home Page: https://paraboly.com

License: MIT License

TypeScript 48.67% HTML 9.55% SCSS 41.79%
web-component web-components chmod checkbox ui web front-end paraboly freakycoder animated

web-component-chmod-checkbox's Introduction

Built With Stencil

WebComponent Chmod Checkbox

CHMOD based animated checkbox WebComponent with StencilJS

npm version npm Platform - Android and iOS License: MIT styled with prettier

WebComponent Chmod Checkbox WebComponent Chmod Checkbox

Chmod Checkbox comes with three (3) animated checkbox which includes READ, WRITE and EXECUTE values. These text values are customizable. It has built-in chmod calculator for each value.

Fundamental CHMOD Architecture

Value R W X Description
0 0 0 0 NO_PERMISSION
1 1 0 0 READ
2 0 1 0 WRITE
3 1 1 0 READ/WRITE
4 0 0 1 EXECUTE
5 1 0 1 READ/EXECUTE
6 0 1 1 WRITE/EXECUTE
7 1 1 1 ALL

Installation

First Install the Peer Dependency

This peer dependency is essential for this library! You need to install it

npm i @paraboly/pwc-animated-checkbox

Script tag (Recommended: Painless)

  • Put a script tag similar to this <script src="https://unpkg.com/@paraboly/chmod-checkbox@latest/dist/chmod-checkbox.js"></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run npm install @paraboly/chmod-checkbox --save
  • Put a script tag similar to this <script src='node_modules/@paraboly/chmod-checkbox/dist/chmod-checkbox.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run npm install @paraboly/chmod-checkbox --save
  • Add an import to the npm packages import @paraboly/chmod-checkbox;
  • Then you can use the element anywhere in your template, JSX, html etc

Usage

<chmod-checkbox permission="0" />

How to get value from a prop?

document.querySelectorAll("chmod-checkbox")[0].permission
document.querySelectorAll("chmod-checkbox")[0].first
document.querySelectorAll("chmod-checkbox")[0].middle
document.querySelectorAll("chmod-checkbox")[0].last

Configuration - Props

Property Type Default Description
permission number 0 get the changing permission value

Future Plans

  • LICENSE
  • Customizable colors
  • Make another web-component with just animated checkbox and implement it on this library
  • Write an article about the lib on Medium

Author

FreakyCoder, [email protected]

License

WebComponent Chmod Checkbox is available under the MIT license. See the LICENSE file for more info.

web-component-chmod-checkbox's People

Contributors

dependabot[bot] avatar wrathchaos avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mertuslu12

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.