0.0.14 • Published 2 months ago

ace-ip-input v0.0.14

Weekly downloads
-
License
-
Repository
github
Last release
2 months ago

Ace Ip Input

A convinient way to type IP address in your forms.

Features

  • Type '.' to move to next octet
  • Use arrow keys to navigate between octets
  • Flawless usage of Backspace and Delete keys
  • Type IP address with port or prefix

Installation and basic usage

npm install ace-ip-input

For the type prop you can just pass a string. (All possible types are listed down below)

<script setup>
import { ref } from "vue";
import { AceIpInput } from "ace-ip-input";

const ip = ref("");
</script>

<template>
  <div>
    <ace-ip-input v-model="ip" type="ipAddress" />
  </div>
</template>

<style src="ace-ip-input/style.css"></style>

Usage with TypeScript

Import the IpInputType enum to pass the type

<script setup lang="ts">
import { ref } from "vue";
import { AceIpInput, IpInputType } from "ace-ip-input";

const ip = ref("");
</script>

<template>
  <div>
    <ace-ip-input v-model="ip" type="IpInputType.Mask" />
  </div>
</template>

<style src="ace-ip-input/style.css"></style>

Props

NameTypeDefaultDescription
typestring \|\| IpInputTypeipAddress \|\| IpInputType.IpAddressDetermines the type of the IP address
v-modelstringYour model

Slots

NameDescription
clearSlot for your clear button

Events

NameAttributesListen toDescription
clear@clearEmitted when clear button is pressed
copystring@copyEmitted when Ctrl-C or Copy is pressed
blur@blurEmitted when IpInput is blurred
focus@focusEmitted when IpInput is focused
0.0.14

2 months ago

0.0.13

2 months ago

0.0.12

2 months ago

0.0.11

2 months ago

0.0.10

2 months ago

0.0.9

2 months ago

0.0.8

2 months ago

0.0.7

2 months ago

0.0.6

2 months ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago

0.0.0

2 months ago