Web Component: j-Button


  • Info
  • HTML
  • JS
  • CSS
  • Meta

j-Button

A simple button component with great features.

  • jComponent v19
  • fully responsive
  • supports validation

Configuration:

  • exec {String} required a path to the function(el, path) method
  • icon {String} Total JS icons (default: undefined)
  • color {String} An icon color (default: undefined)
  • validation {Boolean} Enables validation for all components on the path (default: true)
  • delay {Number} a timeout for validation (default: 100)
  • name {String} a name for the name attribute (default: submit)
  • size {String} a size:
    • small
    • normal (default)
    • large
    • big
  • ddos {String} A simple DDOS prevetion for multiple clicks, possible values:
    • undefined disables prevention
    • 10 seconds
    • session
    • 1 day
    • etc.
  • if {String} can contain JS condition for evaluation(optional)
    • value {Object} contains entire model
    • path {String} contains changed path
    • must return boolean
  • track {String} can contain paths divided by comma which evaluate validation (executors for paths aren't components, but these methods SET(), UPD(), INC(), etc.)
  • validonly {Boolean} skips dirty state (default: false)

Author