I would like to style the title in ngb-tab so that it is not the default blue of an anchor tag. Ideally something like this, but the class property doesn't seem to have an effect on ngb-tab.
The HTML:
<ngb-tabset #t="ngbTabset">
<ngb-tab [title]="'Followers'" class="tab-title">
<ng-template ngbTabContent>
...
</ng-template>
</ngb-tab>
<ngb-tab [title]="'Following'" class="tab-title">
<ng-template ngbTabContent>
...
</ng-template>
</ngb-tab>
</ngb-tabset>
The CSS:
.tab-title {
color: inherit;
}
According to the documentation https://ng-bootstrap.github.io/#/components/tabs/ you can style the title by using their ngbTabTitle
directive.
Example:
<ngb-tabset>
<ngb-tab>
<ng-template ngbTabTitle><span class="tab-title">Fancy Title</span></ng-template>
<ng-template ngbTabContent>Content</ng-template>
</ngb-tab>
</ngb-tabset>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With