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.

feat: allow overflowing content in ion-tab-button

See original GitHub issue

Feature Request

I would like to modify our tabs component a little by highlighting our middle tab item. Unfortunately I cannot do much because the shadow dom native-button has an overflow: hidden set. Would be neat if this is exposed by a custom-prop as well or some option to disable overflow in there at all.

This is what I am trying to accomplish; first image is button-native wiht overflow: visible.

Bildschirmfoto 2020-05-23 um 13 51 15

Bildschirmfoto 2020-05-23 um 13 52 29

Ionic version:

[x] 5.x (template should be updated here)

Describe the Feature Request

Answered above. Is this section needed?

Describe Preferred Solution

An option [noOverflow]="false" or custom property --overflow: visible.

Describe Alternatives

Related Code

Additional Context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
roman-rrcommented, May 23, 2020

Hi @muuvmuuv Try it:

tabs.page.scss

.new-button {
    position: absolute;
    width: 70px;
    height: 70px;
    background: var(--ion-color-primary);
    border-radius: 50%;
    bottom: calc(-10px + var(--ion-safe-area-bottom));
    position:absolute;
    left:0;
    right:0;
    margin-left:auto;
    margin-right:auto;
    z-index: 100;
}

tabs.page.ts

import { Component, ViewChild, ElementRef } from '@angular/core';

@Component({
  selector: 'app-tabs',
  templateUrl: 'tabs.page.html',
  styleUrls: ['tabs.page.scss']
})
export class TabsPage {

  @ViewChild('specialTab', { read: ElementRef, static: false }) specialTab: ElementRef;
  constructor() {}
  activateTab() {
    this.specialTab.nativeElement.click();
  }
}

tabs.page.html

<div class="new-button" (click)="activateTab();"></div>
<ion-tabs>
  <ion-tab-bar slot="bottom">
    <ion-tab-button tab="tab1">
      <ion-icon name="triangle"></ion-icon>
      <ion-label>Tab 1</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="tab2" #specialTab>
      <ion-icon name="ellipse"></ion-icon>
      <ion-label>Tab 2</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="tab3">
      <ion-icon name="square"></ion-icon>
      <ion-label>Tab 3</ion-label>
    </ion-tab-button>
  </ion-tab-bar>
</ion-tabs>
0reactions
ionitron-bot[bot]commented, Jun 24, 2020

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ionic 4 tab bar overflow
My button is cutting by tab-bar. How I can solve this? I try to add "overflow: visible" for all of tags, but it's...
Read more >
ion-tab-button | Ionic Documentation
A tab button is a UI component that is placed inside of a tab bar. The tab button can specify the layout of...
Read more >
Falcon Sandbox v8.31 © Hybrid Analysis
Submit malware for free analysis with Falcon Sandbox and Hybrid Analysis technology. Hybrid Analysis develops and licenses analysis tools to fight malware.
Read more >
How To Get Ios Style For Ionic Modal - ADocLib
Let's find tags that usually go together: Co-occurring tags on Stack Overflow questions These groupings make sense: centroid 7: android, java, javascript, ios, ......
Read more >
Styling ion-tabs in Ionic 5 - DEV Community ‍ ‍
The good news is that it's also flexible enough to allow us to ... <ion-tabs> <ion-tab-bar slot="bottom"> <ion-tab-button tab="home" ...
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