question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Floating label cut off

See original GitHub issue

react-native, react and native-base version

  • React-Native 0.52.0

  • React: 16.2.0

  • Native-Base: 2.3.7

Expected behaviour

When using an input with a floating label, the entire label should be visible when floating.

Actual behaviour

Once the label starts floating, the top half of the label is cut off.

Steps to reproduce (code snippet or screenshot)

Something as simple as the following basic case causes it:

<Form>
  <Item floatingLabel>
    <Label>Test</Label>
    <Input />
  </Item>
  <Item floatingLabel>
    <Label>Test</Label>
    <Input />
  </Item>
  ...
</Form>

Screenshot of emulator/device

screenshot_1516514113

Is the bug present in both ios and android or in any one of them?

I am not able to test it on iOS at the moment.

Any other additional info which would help us debug the issue quicker.

It used to work a while ago but I only noticed it is broken now, not sure on which version it broke.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

13reactions
akhil-gacommented, Jan 23, 2018

@carathorys you can add some padding to the top for <Label/>.

Gif

floating label

4reactions
raajnadarcommented, Apr 3, 2018

This is still in Native base 2.4.1 This will be very helpful instead of hard coding in each form.

Put a padding in the theme/components/Label.js file the path may be different for you

import variable from "./../variables/platform";

export default (variables = variable) => {
	const labelTheme = {
		".focused": {
			width: 0
		},
		fontSize: 17,
		paddingTop: 2 // This much is enough to fix
	};
	return labelTheme;
};
Read more comments on GitHub >

github_iconTop Results From Across the Web

BS5 - Floating Labels + Select - Text is cut off · Issue #33711
I couldn't find an open ticket for that, so here it is: Letters which are going a little bit under the baseline are...
Read more >
How do I style correctly a floating label to not stay on top of ...
I am trying to make a floating label input ...
Read more >
Floating labels are problematic. After writing Placeholders are…
The label may get cropped. If the floating label is longer than the size of the field, it will be cut off by...
Read more >
Donut label 'cut off' in Kendo UI for jQuery | Telerik Forums
Please see attached, I've got a basic donut, with three labels. The label for the amber segment overlaps the boundary of the chart....
Read more >
Form field - Angular Material
The floating label for a mat-form-field . ... Whether the form field should reserve space for one line of hint/error text (default) or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found