Home > Back-end >  How to enable Placeholder for Floating Input Field in react?
How to enable Placeholder for Floating Input Field in react?

Time:05-17

bootstrap based Floating input place holder value not able to change. wanted to show some text as default like placeholder & should enable the placeholder/value area editable. Please help

enter image description here

Technically you need to provide a placeholder value, but it's not shown:

A placeholder is required on each <Form.Control> as our method of CSS-only floating labels uses the :placeholder-shown pseudo-element.

https://react-bootstrap.netlify.app/forms/floating-labels/

Here is a working codesanbox with floating labels and changeable value: https://codesandbox.io/s/floating-input-placeholder-forked-3tvf50

  • Related