Responsive UI - v8.2

Caps Lock Warning

Components > User Interaction > Caps Lock Warning
Use this component to...
Warn the user that Caps Lock is on as they enter hidden data, such as a password

Overview

Password inputs hide the user’s input for security reasons. If the user enters a password while Caps Lock is on, this will uppercase their password input without them knowing, resulting in an incorrect password entry, which might result in an account lockout.

To avoid that scenario, use the caps lock warning component to warn the user that Caps Lock is on whenever you prompt them to enter hidden data, such as a password.

The form below prompts for the user’s password. Caps Lock is currently on, so the caps lock warning displays an error inline notification, warning the user.
Caps lock warning

Development

Web component development

Component reference

rui-caps-lock-warning
rui-caps-lock-warning
Module: rui-notifications - Package: @jkhy/responsive-ui-wc

Inline error notification that displays when Caps Lock is on

No properties or events

Implementation

Begin by importing the rui-notifications module into your application.

Import the module
/ import into app.module
import '@jkhy/responsive-ui-wc/components/rui-notifications/rui-notifications-imports';

Add a rui-caps-lock-warning component in an appropriate location in any view that prompts for a password. It displays an inline error notification whenever the user types while Caps Lock is on. Otherwise it is hidden.

Caps lock warning example
<rui-caps-lock-warning></rui-caps-lock-warning>

Angular wrapper development

Wrapper reference

jha-caps-lock-warning
jha-caps-lock-warning
Module: JhaNotificationsModule - Package: @jkhy/responsive-ui-angular

Inline error notification that displays when Caps Lock is on

No properties or events

Implementation

Begin by importing the rui-notifications module into your application.

Import the module
// import into app.module
import { JhaNotificationsModule } from '@jkhy/responsive-ui-angular/jha-notifications';

@NgModule({
    imports: [
        ...
        JhaNotificationsModule,
        ...
    ]
})

export class AppModule(){}

Add a jha-caps-lock-warning component in an appropriate location in any view that prompts for a password. It displays an inline error notification whenever the user types while Caps Lock is on. Otherwise it is hidden.

Caps lock warning example
<jha-caps-lock-warning></jha-caps-lock-warning>

Design

To display a caps lock warning in your design docs:

  • Add an inline notification to your design.
  • Set the notification’s type to “Error”.
  • Change the notification text to “Caps lock is on”.

Support options
Have questions on this topic?
Join the Responsive UI team in Microsoft Teams to connect with the community.
See something in this page that needs to change?
Send us feedback on this page.
Last updated Mon May 1 2023