TextCopy
Last updated
Last updated
A read-only text input component that allows the user to copy the value to the clipboard.
Extra props will be passed to the TextInput
component which is used internally.
adornment
Allows to set an adornment that will get used on the left side of the text field (in left to right languages). The copy button is always displayed on the other side.
autofocus
Focus the text field when the component gets mounted.
message
The message that gets displayed when the copy is successful.
monospace
Set this to false to disable the use of the monospace font (e.g. for Ethereum addresses).
onCopy
When not set, a toast will get displayed on copy, with the message
provided.
When set to null
, disables the message entirely.
When set to a function, calls this function when the copy is successful, with the message
as a parameter.
value
The field content (single line).
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
TYPE | DEFAULT VALUE |
---|---|
React node
None
Boolean
false
String
"Copied"
Boolean
true
Function
or null
None
String
None