Table of Contents

Disabled/Non-Editable Components

Disabled Vs Readonly Attributes

The properties of the disabled attribute:

The properties of the readonly attribute:

When To Use Disabled Components

When To Avoid Using Disabled Components

1 Avoid using a disabled or readonly component in a starting state.

Example scenario:

- A form that contains a user's information. - We do not want to allow the user to change their email address - But they do need to see the email address to ensure it's correct

Usability Issues with this scenario:

- What if it's the wrong email address. If this component is displayed as an input box, the user will assume it is in someway editable. This will frustrate the user as they don't know how to edit the field.

The Solution:

- Show the email address as regular text and provide a help message for how to proceed if the email address is incorrect.

2 Don't disable the submit button

Disadvantages Of Using Disabled Components

Styling Disabled Components