@1.0.6 by Stephen Dolan

A StimulusJS controller for forcing any input field to uppercase only.

Score: 22.3

npm codebeat badge

Stimulus Uppercaseable Input

This is a simple StimulusJS controller that forces any element that emits an input event to allow only uppercase letters.

JSFiddle Demo.


This assumes that StimulusJS is already installed.

Add the stimulus-uppercaseable-input module:

$ yarn add stimulus-uppercaseable-input


$ npm install stimulus-uppercaseable-input

Basic Usage

First, register the controller with StimulusJS:

// application.js
import { Application } from 'stimulus';
import { UppercaseableInput } from 'stimulus-uppercaseable-input';

const application = Application.start();
application.register("uppercaseable-input", UppercaseableInput);

Next, you need an input element that emits an input event to attach the controller to:

    <input data-controller="uppercaseable-input" type="text" />


Bug reports and pull requests are welcome on GitHub at This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.


This package is available as open source under the terms of the MIT License.