Skip to content

Input inputStyle="floating" vs inlinePlaceholder={true} #181

@ButuzGOL

Description

@ButuzGOL

What the difference between inputStyle="floating" and inlinePlaceholder={true} ?

When I do

<Input ref="state" type="text" name="state" inlinePlaceholder={true} placeholder="State" description="Your state as it appears on your credit card." />
<Input ref="state" type="text" name="state" inputStyle="floating" placeholder="State" description="Your state as it appears on your credit card." />

The looks the same
screen shot 2014-12-26 at 9 45 33 am

The difference is that
inlinePlaceholder={true} leaves input placeholder
inputStyle="floating" adds <span class="mui-input-placeholder" data-reactid=".0.2.0.0.1.0.1.6.1">State</span> but on focus just hide it

So the behaviour and looks the same

May leave one option remove inlinePlaceholder prop ?
Or it has some benefits ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: stylesSpecific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.scope: text fieldChanges related to the text field.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions