Socket
Socket
Sign inDemoInstall

@lion/input

Package Overview
Dependencies
Maintainers
2
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/input

It enhances the functionality of the native `` element


Version published
Weekly downloads
1.3K
increased by16.65%
Maintainers
2
Weekly downloads
 
Created
Source

Inputs >> Input >> Overview ||10

import { html } from '@lion/core';
import '@lion/input/define';

A web component that enhances the functionality of the native <input> element.

export const main = () => html`<lion-input label="First Name"></lion-input>`;

Features

  • Extra visual elements can be added via slots:
    • label: can also be provided via the label attribute, but the slot can be used to change the html and CSS of the label. For example add an u-sr-only class to the label to make it visually hidden. A label is always needed for accessibility reasons.
    • help-text: a helper text shown below the label to give extra clarification.
    • prefix: does not have an active use case yet, but the option is in place.
    • suffix: can be used for addons to the input like a calculator, datepicker or addressbook. In these cases a button with an icon is used.
    • before: does not have an active use case yet, but the option is in place.
    • after: can be used to show a currency or percentage.
  • Delegates attributes like type, disabled, placeholder and readonly to the native input.
  • Can make use of validation.

Installation

npm i --save @lion/input
import '@lion/input/define';

Keywords

FAQs

Package last updated on 16 May 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc