I wonder if the Office-UI Fabric Label should only be used to label a field, like a TextField.

Should read-only data be displayed in TextField with contentEditable={ false } and readOnly={ true }?

Or should a Label be used to display read-only information?

The TextField documentation states

Use the TextField to accept data input on a form or page.

I think a Label would be better performance as well. I just wonder if it violates good PnP?

For shipped/packaged webparts, e.g. not running on a workbench, a colon (:) is automatically appended. Does that state that a Label should only label something else?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.