Problem
1. AddressDisplay does not support a masked mode that hides the middle of the address — some privacy-focused UIs want to show only the first 4 and last 4 characters (e.g. GBAM...ZJQZ) with the middle completely hidden, unlike truncateAddress which shows more context characters by default.
2. AddressDisplay does not support a monospace font toggle — Stellar addresses are best read in monospace, but the default rendering inherits the parent font. An mono?: boolean prop would apply font-mono to the address span.
3. AddressDisplay wraps label and address in separate DOM layers with no logical grouping — the label span and address span are siblings in a flex column, but there is no <dl>/<dt>/<dd> structure or aria-labelledby linking the label to the value for screen readers.
Solution
- Add
masked?: boolean prop — when true, shows only the first 4 and last 4 chars with ··· in the middle regardless of start/end props.
- Add
mono?: boolean prop — applies font-mono to the address <span>.
- Wrap the component in a
<dl> when label is provided; use <dt> for label and <dd> for address + copy button.
Acceptance Criteria
Note for Contributors: Write a clear PR description. Include a screenshot of masked mode and the monospace vs non-monospace comparison.
Problem
1.
AddressDisplaydoes not support amaskedmode that hides the middle of the address — some privacy-focused UIs want to show only the first 4 and last 4 characters (e.g.GBAM...ZJQZ) with the middle completely hidden, unliketruncateAddresswhich shows more context characters by default.2.
AddressDisplaydoes not support amonospacefont toggle — Stellar addresses are best read in monospace, but the default rendering inherits the parent font. Anmono?: booleanprop would applyfont-monoto the address span.3.
AddressDisplaywraps label and address in separate DOM layers with no logical grouping — thelabelspan and address span are siblings in a flex column, but there is no<dl>/<dt>/<dd>structure oraria-labelledbylinking the label to the value for screen readers.Solution
masked?: booleanprop — when true, shows only the first 4 and last 4 chars with···in the middle regardless ofstart/endprops.mono?: booleanprop — appliesfont-monoto the address<span>.<dl>whenlabelis provided; use<dt>for label and<dd>for address + copy button.Acceptance Criteria
maskedmode showsGBAM···ZJQZformatmonoprop applies monospace font to the addresslabelprovided renders<dl>/<dt>/<dd>structurenpm run buildandtsc --noEmitpass