{"id":23442255,"url":"https://github.com/teamwertarbyte/material-ui-currency-textfield","last_synced_at":"2025-06-16T05:32:38.991Z","repository":{"id":252408331,"uuid":"839254412","full_name":"TeamWertarbyte/material-ui-currency-textfield","owner":"TeamWertarbyte","description":"Currency textfield for React Material UI","archived":false,"fork":false,"pushed_at":"2024-11-07T16:06:09.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T07:56:47.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TeamWertarbyte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T08:47:29.000Z","updated_at":"2024-10-04T09:39:23.000Z","dependencies_parsed_at":"2024-11-07T14:21:56.235Z","dependency_job_id":"dca95e2d-d731-4fff-a7d7-bff3b722471e","html_url":"https://github.com/TeamWertarbyte/material-ui-currency-textfield","commit_stats":null,"previous_names":["teamwertarbyte/material-ui-currency-textfield"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/TeamWertarbyte/material-ui-currency-textfield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Fmaterial-ui-currency-textfield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Fmaterial-ui-currency-textfield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Fmaterial-ui-currency-textfield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Fmaterial-ui-currency-textfield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeamWertarbyte","download_url":"https://codeload.github.com/TeamWertarbyte/material-ui-currency-textfield/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Fmaterial-ui-currency-textfield/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260106141,"owners_count":22959614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-23T17:29:03.874Z","updated_at":"2025-06-16T05:32:38.944Z","avatar_url":"https://github.com/TeamWertarbyte.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CurrencyTextField - React Material UI Component\n\n## Overview\n\n`CurrencyTextField` is a [React][react] component built using [Material UI's][mui] `TextField` and `react-number-format`. It provides a text field for currency input, supporting custom formatting options.\n\n[react]: https://react.dev/\n[mui]: https://mui.com/material-ui/\n\n![Example of currency field](currency_field_example.gif)\n\n## Installation\n\n```sh\n# npm\nnpm install @wertarbyte/material-ui-currency-textfield\n\n# yarn\nyarn add @wertarbyte/material-ui-currency-textfield\n```\n\n## Usage\n\n```jsx\nimport * as React from 'react';\nimport Dinero from 'dinero.js';\nimport { CurrencyTextField } from '@wertarbyte/material-ui-currency-textfield';\n\nexport const MyComponent: React.FC = () =\u003e {\n\n  const [value, setValue] = React.useState\u003cDinero.Dinero\u003e();\n\n  return (\n    \u003cCurrencyTextField\n        label={'Amount'}\n        name={'amount'}\n        value={value}\n        variant={'outlined'}\n        currencySymbol=\"€\"\n        currency=\"EUR\"\n        precision={2}\n        minimumValue={0}\n        decimalCharacter=\",\"\n        digitGroupSeparator=\".\"\n        onChange={(value) =\u003e {\n            setValue(value);\n        }}\n    /\u003e\n  );\n};\n```\n\n## Documentation\n\n### Props\n\n|Name|Type|Default|Description|\n|---|---|---|---|\n|decimalCharacter|`string`|`'.'`|The character used as the decimal separator.|\n|digitGroupSeparator|`string`|`','`|The character used as the thousand separator.|\n|currency|`Dinero.Currency`|`'USD'`|ISO 4217 CURRENCY CODES as specified in the [documentation][iso]. Sorted and parsed|\n|currencySymbol|`string`|`'$'`|The symbol used as the currency prefix.|\n|minimumValue|`string` `number`|`'-10000000000000'`|The minimum allowable value as a string.|\n|maximumValue|`string` `number`|`'10000000000000'`|The maximum allowable value as a string.|\n|precision|`number`|`2`|The number of decimal places to display.|\n|value|`Dinero.Dinero`||The current value of the text field. Can be a number or a string.|\n|defaultValue|`Dinero.Dinero`||The default value of the text field.|\n|onChange|`func`||Callback function that is called when the value changes. Receives the new value and formatted value as arguments.|\n|onBlur|`func`||Callback function that is called when the input loses focus. Receives the event and value as arguments.|\n\n[iso]: https://www.iso.org/iso-4217-currency-codes.html\n\n## Development\n\n### Testing\n\nThe library can be easily testet in dev mode via the provided 'dev' script and App.tsx.\n\n```\n# npm\nnpm run dev\n\n# yarn\nyarn dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamwertarbyte%2Fmaterial-ui-currency-textfield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteamwertarbyte%2Fmaterial-ui-currency-textfield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamwertarbyte%2Fmaterial-ui-currency-textfield/lists"}