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.

Icons get cut off

See original GitHub issue

What kind of Issue is this?

  • (x) Bug Report

How are you using the Bottom Navigation?

  • (x) I use the standalone version.

Expected behavior

I expect icons to be fully visible, independent of the given size.

Actual behavior

Icons will be cut off if size increases above a given point.

Additional description and resources

import BottomNavigation, { Tab } from 'react-native-material-bottom-navigation'
import Icon from 'react-native-vector-icons/SimpleLineIcons'
import React from "react";
import { StyleSheet } from 'react-native';

export default class Main extends React.Component {
    render() {
        return (
            <BottomNavigation
                activeTab="1"
                style={styles.bottomNavigation}
            >
                <Tab
                    barBackgroundColor="#FFFAFB"
                    icon={<Icon size={40} color="#282A2A" name="people" />}
                    activeIcon={<Icon size={40} color="#F9D861" name="people" />}
                />
                <Tab
                    labelColor="#282A2A"
                    barBackgroundColor="#FFFAFB"
                    icon={<Icon size={40} color="#282A2A" name="hourglass" />}
                    activeIcon={<Icon size={40} color="#F9D861" name="hourglass" />}
                />
                <Tab
                    barBackgroundColor="#FFFAFB"
                    icon={<Icon size={40} color="#282A2A" name="present" />}
                    activeIcon={<Icon size={40} color="#F9D861" name="present" />}
                />
            </BottomNavigation>
        );
    }
}

const styles = StyleSheet.create({
    bottomNavigation: {
        position: 'absolute',
        left: 0,
        right: 0,
        bottom: 0,
        height: 56
    }
})

Screenshot

img_3951

Environment

  • React Native versions: 0.50.3
  • react-native-material-bottom-navigation version: 0.7.0
  • I tested this with: iOS

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
bijomon-tolexocommented, Jan 28, 2020

Same issue, for now solving issue placing ICON inside TEXT <Text><Icon type="MaterialIcons" name="crop-portrait" /></Text>

0reactions
JanOwiesniakcommented, Jan 13, 2018

Ok, get it. Thanks for the explanation. I will just go with a 24 size for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

icons cut off - Microsoft Community
Just changed to a new hdmi tv for display and desktop icons are cut off on the borders. How do I get them...
Read more >
Font Awesome Icon is getting cut off - Stack Overflow
It might resolve your issue letter-spacing: 1px;.
Read more >
Desktop icons cut off on top of screen - Windows 11
Besides the attached image it sometimes gets much larger, only thing I can do to fix it is to move an icon into...
Read more >
Cut off Icons – Download for Free in PNG and SVG - Icons8
Free Cut off icons in various UI design styles for web, mobile. Download static and animated Cut off vector icons for free in...
Read more >
FontAwesome Icon getting cut off. : r/Rainmeter - Reddit
I'm working on this skin but the Font Awesome Icon showing the current media player (using webnowplaying) is getting cut off on the...
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