npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ribertec/directus-extension-phone-input

v1.0.0

Published

Phone number interface and display for Directus with country selector, as-you-type formatting, validation, and configurable storage formats.

Readme

Phone Input for Directus

A Directus bundle providing a phone number interface and matching display built on libphonenumber-js. Pick a country, type freely, and the input formats as you go, validates on blur, and stores the value in the format you choose.

Features

  • Country selector with localized country names and dial codes
  • As-you-type formatting powered by libphonenumber-js
  • Configurable storage format: E.164 or digits only
  • Optional validation with inline error message
  • Prevents input past the country's maximum length
  • Matching display component with four output formats (International, E.164, National, Digits)
  • Sandboxed extension — no extra Directus permissions required

Translations

Extension options in the collection editor are always displayed in English.

User-facing elements shown in the Data Studio during data entry (such as the "Invalid phone number." validation message) are automatically translated into all languages supported by Directus. Translations are machine-generated — if you notice anything incorrect or unnatural in your language, contributions are welcome! Open a pull request on GitHub with the corrected strings in src/i18n/<locale>.json.

Installation

Via Directus Marketplace (Recommended)

  1. Navigate to your Directus project
  2. Go to SettingsExtensions
  3. Search for "Phone Input"
  4. Click Install

Via npm

npm install @ribertec/directus-extension-phone-input

Then restart your Directus instance.

Setup

This bundle provides one interface and one display.

Phone interface (phone-input)

Use on any string field where a phone number should be captured.

| Option | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------------- | | Default country | Country used to parse input when no selector is shown, or as the initial selection. Required when the selector is hidden. | | Show country selector | Renders the country dropdown next to the input. Disable to lock the field to a single country. | | Format as you type | Applies libphonenumber-js as-you-type formatting while the user types. | | Storage format | How the value is persisted: E.164 (e.g. +12133734253) or Digits only (e.g. 12133734253). | | Validate number | When enabled, shows an inline error after the field is blurred if the number is not valid for the country. |

Phone display (phone-display)

Renders a stored phone value in read-only contexts (listings, detail pages, relational previews).

| Option | Description | | --------------- | --------------------------------------------------------------------------------- | | Default country | Country used to parse stored values that are not already in international format. | | Display format | Output format: International, E.164, National, or Digits only. |

Requirements

  • Directus 11.0.0+

License

MIT License — see LICENSE file for details