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
sizeSizemdThe 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 Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'