Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
mds-input
- Lit versionInstall the component via npm
npm install mds-input
Or use yarn
yarn add mds-input
Import the component in your project
<script type="module">
import 'mds-input';
</script>
His dependencies
<script type="module">
import { defineCustomElements } from '@maggioli-design-system/mds-text/loader';
defineCustomElements();
</script>
Maggioli Design System
style in the head
tag
<link rel="stylesheet" href="./node_modules/@maggioli-design-system/styles/dist/css/colors-rgb.css">
The use it in your HTML
<mds-input type="text" placeholder="Write something"></mds-input>
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
autocomplete | autocomplete | Specifies whether the element should have autocomplete enabled | "address" | "name" | "url" | "email" | "off" | "on" | "additional-name" | "address-level1" | "address-level2" | "address-level3" | "address-level4" | "address-line1" | "address-line2" | "address-line3" | "bday" | "bday-day" | "bday-month" | "bday-year" | "cc-additional-name" | "cc-csc" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-family-name" | "cc-given-name" | "cc-name" | "cc-number" | "cc-type" | "country" | "country-name" | "current-password" | "family-name" | "given-name" | "honorific-prefix" | "honorific-suffix" | "impp" | "language" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "photo" | "postal-code" | "sex" | "street-address" | "tel" | "tel-area-code" | "tel-country-code" | "tel-extension" | "tel-local" | "tel-national" | "transaction-amount" | "transaction-currency" | "username" | 'off' |
autofocus | autofocus | Specifies that the element should automatically get focus when the page loads | boolean | false |
datalist | -- | A list of search terms to be searched from the input field, it should be used with type="search" input. | string[] | undefined |
disabled | disabled | If true, the element is displayed as disabled | boolean | false |
icon | icon | An icon displayed at the right of the input | string | undefined |
max | max | Specifies the maximum value use it with input type="number" or type="date" Example: max="180", max="2046-12-04" | number | undefined |
maxlength | maxlength | Specifies the maximum number of characters allowed in an element use it with input type="number" | number | undefined |
min | min | Specifies the minimum value use it with input type="number" or type="date" Example: min="-3", min="1988-04-15" | string | undefined |
minlength | minlength | Specifies the minimum number of characters allowed in an element use it with input type="number" | number | undefined |
name | name | Is needed to reference the form data after the form is submitted | string | undefined |
pattern | pattern | Specifies a regular expression that element's value is checked against | string | undefined |
placeholder | placeholder | Specifies a short hint that describes the expected value of the element | string | undefined |
readonly | readonly | Specifies that the element is read-only | boolean | false |
required | required | Specifies that the element must be filled out before submitting the form | boolean | false |
step | step | Specifies the interval between legal numbers in an input field | string | undefined |
type | type | Specifies the type of input element | "date" | "email" | "number" | "password" | "search" | "tel" | "text" | "textarea" | "time" | "url" | 'text' |
value | value | Specifies the value of the input element | number | string | '' |
variant | variant | Sets the variant of the input field | "error" | "info" | "success" | "warning" | undefined |
variantTip | variant-tip | Sets the word(s) of the variant of the input field | string | undefined |
Event | Description | Type |
---|---|---|
blurEvent | Emits a void event when input element is blurred | CustomEvent<void> |
changeEvent | Emits an InputChangeEventDetail when the value of the input element changes | CustomEvent<InputValue> |
focusEvent | Emits a void event when input element is focused | CustomEvent<void> |
inputEvent | Emits a KeyboardEvent when a keboard key is pressed on the focused input element | CustomEvent<InputEvent> |
To be able to use the form component in Safari, you will need to include this polyfill in your application's dependencies and add it in your main TypeScript file:
import 'element-internals-polyfill'
or in your main HTML file like:
<script type="module">
import 'element-internals-polyfill'
</script>
Built with lit
and vite
FAQs
## Install
The npm package mds-input receives a total of 1 weekly downloads. As such, mds-input popularity was classified as not popular.
We found that mds-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.