Skip to content

ReadonlyInput

A lightweight read-only input component with copy and reveal functionality.

••••••••••••
import { ReadonlyInput } from '@fintech-sandpit/ui/react';
return (
<ReadonlyInput
value="supersecretpassword"
copyable
revealable
masked
/>
);
NameTypeDefaultDescription
valuestring | number | nullThe value to display
sizeFieldSizemdThe size of the component
maskedbooleanfalseWhether the value should be masked
copyablebooleanfalseWhether the value should be copyable
revealablebooleanfalseWhether the value should be revealable
NameTypeDescription
onCopy() => voidEvent handler for when the value is copied
onReveal(state: boolean) => voidEvent handler for when the value is revealed or hidden
type FieldSize = 'sm' | 'md' | 'lg'