New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@growth-ui/currency-input

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@growth-ui/currency-input

<!-- Logo -->

latest
Source
npmnpm
Version
0.6.0
Version published
Weekly downloads
11
37.5%
Maintainers
1
Weekly downloads
 
Created
Source

logo

Growth UI

React Currency Input Field Component

Install

npm install @growth-ui/currency-input

or

yarn add @growth-ui/currency-input

Usage

import CurrencyInput from ' @growth-ui/currency-input';

<CurrencyInput
  defaultValue={0}
  fixed={2}
  onChange={(value, props) => console.log(value, props)}
/>;

Props

NameTypeDefaultDescription
basicbooleanfalseAn input can be just pure html input look and feel.
compactbooleanfalseAn input can reduce its padding to fit into tighter spaces.
decimalsLimitnumber2Limit length of decimals allowed.
defaultValuenumberDefault value.
errorbooleanAn Input field can show the data contains errors.
fixednumberValue will always have the specified length of decimals.
focusbooleanAn input field can show a user is currently interacting with it.
onBlurfuncCalled on blur.
onChangefuncCalled on change.
onFocusfuncCalled on focus.
placeholderstringPlaceholder if no value
prefixstringAn input can be descriptive. e.g) $
separatorsbooleanAn input can format number with commas as thousands separators.
sizenumberAn input can have different sizes.
valuenumberAn input value.

Prefix

You can add a prefix or suffix by passing in prefix or suffix.

import CurrencyInput from ' @growth-ui/currency-input';

<CurrencyInput prefix="£" value={123} />;
// £123

For more examples and interactions, visit growth-ui-react.


Looking for UI library?

Check out our react ui library Growth-UI-React.

Check out our native ui library Growth-UI-Native.


Credit

Created by @kyuhakyuk.

Keywords

growth-ui-react

FAQs

Package last updated on 13 Dec 2021

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