New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@belong-ui/input

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@belong-ui/input

belong-ui: Input Component

  • 0.1.29
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-96%
Maintainers
3
Weekly downloads
 
Created
Source
Basic Input Usage:
initialState = {
  value: '',
  smallValue: '',
  textAreaValue: '',
};
<div className="styleguidist__input-wrap">
  <Input
    placeholder="Placeholder"
    value={state.value}
    onChange={(value) => { setState({ value }); }}
    onEnter={(value) => { alert(`value: ${value}`); }}
  />
  <br/>
  <br/>

  <Input
    placeholder="Small Input"
    size="small"
    value={state.smallValue}
    onChange={(smallValue) => { setState({ smallValue }); }}
    onEnter={(smallValue) => { alert(`Value: ${smallValue}`); }}
  />
  <br/>
  <br/>

  <Input
    isTextarea
    placeholder="TextArea Placeholder"
    value={state.textAreaValue}
    onChange={(textAreaValue) => { setState({ textAreaValue }); }}
    onEnter={(textAreaValue) => { alert(`value: ${textAreaValue}`); }}
    htmlAttributes={{
      rows: '2',
      cols: '30',
    }}
  />
</div>

Disabled Inputs

initialState = {
  value: '',
};
<div className="styleguidist__input-wrap">
  <Input
    placeholder="Placeholder"
    isDisabled
    value={"Disabled Value"}
  />
  <br /><br />
  <Input
    isTextarea
    placeholder="Placeholder"
    isDisabled
    value={"Disabled TextArea Value"}
  />
</div>

Uncontrolled Mode

initialState = {
  value: '',
};
<div className="styleguidist__input-wrap">
  <Input
    placeholder="Uncontrolled Input"
    onEnter={(value) => { alert(`value: ${value}`); }}
  />
</div>

FAQs

Package last updated on 05 Aug 2020

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