Skip to content

yishiashia/wc-mac-input

Repository files navigation

wc-mac-input

NPM

Published on webcomponents.org

Mac address input web component.

Install

$ npm install wc-mac-input

Syntax

<script src="mac-input.js"></script>

<form action="#" method="POST" onsubmit="return form_submit(event)">
    <label for="mac-input">Mac address:</label>
    <mac-input id="mac-input" name="mac"></mac-input>
    <input type="submit" value="submit" />
</form>

Demo page

The demo page: https://yishiashia.github.io/wc-mac-input/

Usage

If you want to customize this web component, you can import the library and implement your new class by extend MacInput.

import MacInput from "wc-mac-input";

class customizedMacInput extends MacInput {
    // override here
}