npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sling-web-component-input

v1.12.5

Published

Sling Input

Readme

sling-web-component-input

Install

npm install sling-web-component-input 

Tag

<sling-input></sling-input>      

Dependencies

  • sling-web-framework
  • sling-web-helpers

Attributes and properties

|Name|Type|Default value|ReflectToAttribute|Observer|callSdk
|:--|:--|:--|:--:|:--|:--:|
|autocomplete|String| |:heavy_check_mark:|
|checked|Boolean | |:heavy_check_mark:|
|disabled|Boolean| |:heavy_check_mark:|
|label|String| |:heavy_check_mark:|
|type|String| text |:heavy_check_mark:|formatType |
|max|Number| |:heavy_check_mark:|
|maxlength|Number| |:heavy_check_mark:|
|min|Number| |:heavy_check_mark:|
|minlength|Number| |:heavy_check_mark:|
|name|String| |:heavy_check_mark:|
|pattern|String| |:heavy_check_mark:|
|placeholder|String| |:heavy_check_mark:|
|readonly|Boolean | |:heavy_check_mark:|
|required|Boolean | |:heavy_check_mark:|
|size|Number| |:heavy_check_mark:|
|src|String| |:heavy_check_mark:|
|state|String| |:heavy_check_mark:|
|step|Number| |:heavy_check_mark:|
|validationmessage|Object| |:heavy_check_mark:|
|value|String| |:heavy_check_mark:| formatValue |

Description

| Name | Description | |:---|:---|
| autocomplete|Indicates whether the control value can be automatically completed by the browser, is ignored if value of type attribute is hidden, password, checkbox, radio, file or button type (button, submit, reset, image). More information on input HTML.
| checked| When the value of the type attribute is radio or checkbox, the presence of this Boolean attribute indicates that the control is selected by default; otherwise, this attribute is ignored. More information on input HTML.
| disabled|Indicates that form control is not available for interaction. More information on input HTML.
| label|Receives the text that will be used as input label.
| type| The type of control to be displayed. The property receives all the options of a input HTML.
| max |The maximum value (numeric or date) for this item, which should not be less than its minimum value (min attribute).More information on input HTML.
| maxlength|If the value of the ** type ** attribute is text, email, search, password, tel or url, this attribute specifies the maximum number of characters (in Unicode code points) that the user can insert. More information on input HTML.
| min|The minimum value (number or date) for this item, which should not be greater than its maximum (max attribute). More information on input HTML.
| minlength|If the value of the ** type ** attribute is text, email, search, password, tel or url, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter. More information on input HTML.
| name|The name of the control, which is sent along with the form data.
| oninput|A function that is called when populated the field, it triggers an input event that loads an object with field information.
| pattern|A regular expression used to validate the value of the control. More information on input HTML.
| placeholder|A hint to the user of what he can enter in the control. More information on input HTML.
| readonly|This Boolean attribute indicates that the user can not modify the value of the control. More information on input HTML.
|required|This attribute specifies that the user must fill in the field with a value before submitting the form. More information on input HTML.
| size|The initial size of the control. More information on input HTML.
| src|If the value of the type attribute is image, this attribute specifies a URI for the location of an image to be displayed on the graphic button. More information on input HTML.
| state|Controls the state of input field, its values ​​may vary in success warning and error
| step|Works together with min and max attributes to limit increments in which numeric values ​​or dates can be changed. More information on input HTML.
| validationmessage|Receives an object with the validation message from the parent.
| value|The initial value of control. This attribute is optional except when the value of the type attribute is radio or checkbox. More information on input HTML.

Events

  • input

Description: Event triggered when field is populated, has the values and field type as properties.

Details:

|Name|Description| |:--|:--| |value|Value of input field that will be passed to the parent.| |type|Type of input field that will be passed to the parent.|

Examples

All component examples can be emulated using the npm start sling-web-component-input command.

Use

<sling-input label="Label" placeholder="Placeholder..."></sling-input>      

image

<sling-input label="Disabled" placeholder="Placeholder..." disabled></sling-input>      

image

<sling-input label="Success" placeholder="Placeholder..." state="success"></sling-input>      

image