KeyFilter

KeyFilter is a directive to restrict individual key strokes. In order to restrict the whole input, use InputNumber or InputMask instead.

import { KeyFilterModule } from 'primeng/keyfilter';

KeyFilter provides various presets configured with the pKeyFilter property.

In addition to the presets, a regular expression can be configured for customization.

Refer to InputText for accessibility as KeyFilter is a built-in add-on of the InputText.

Figma UI Kit
The official Figma UI Kit for Prime UI libraries, the essential resource for designing with PrimeOne components.