Skip to content

Add option to completely disable flag rendering and SVG loading #246

@ScobarDen

Description

@ScobarDen

Hey!
I want to use react-international-phone without any country flag being rendered or loaded (not just hidden with CSS, but not present in the DOM and not loaded as SVG at all).

Currently, even with hideDropdown and countrySelectorStyleProps={{ buttonStyle: { display: 'none' } }} the flag SVG is still rendered and loaded inside the input.
There is no public prop like hideFlag or similar to prevent this.

Use case:

  • Privacy: don't want to load any external SVGs/assets
  • Performance: reduce bundle size and network requests
  • UI: want a clean input without any flag or country indicator

Request:
Please add a prop (e.g. hideFlag or showFlag={false}) to completely disable flag rendering and SVG loading.

Workarounds tried:

  • CSS hacks (just hides, but SVG still loads)
  • No public API for custom input or flag component
  • Forking/patching the library (not ideal)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions