How to get rid of focus rectangle on tab item

1 Answer 14 Views
TabStrip
Marcin
Top achievements
Rank 1
Marcin asked on 02 Apr 2024, 06:26 PM

Afternoon,

I've attached a picture for it describes the problem best. After clicking on a tab item (Blazor UI) there is a "focus rectangle" around the tab. How can I make sure that this rectangle never shows, that is, clicking on the tab should simply select the tab and not paint the rectangle. To my surprise the following didn't work:

::deep .k-active:active{
    outline: none !important;
}
::deep .k-active:focus{
    outline: none !important;
}

1 Answer, 1 is accepted

Sort by
1
Accepted
Hristian Stefanov
Telerik team
answered on 03 Apr 2024, 01:11 PM

Hi Marcin,

To change the current tab style and remove the border, override the "box-shadow" of the CSS rule. I have prepared an example for you:

<style>
    .k-tabstrip-item.k-item:focus {
        box-shadow: none;
    }
</style>

<TelerikTabStrip TabPosition="Telerik.Blazor.TabPosition.Left">
    <TabStripTab Title="First">
        First tab content.
    </TabStripTab>
    <TabStripTab Title="Second">
        Second tab content. This tab is disabled and you cannot select it.
    </TabStripTab>
    <TabStripTab Title="Third">
        Third tab content.
    </TabStripTab>
</TelerikTabStrip>

I hope this helps. Let me know if you are still facing difficulties.

Regards,
Hristian Stefanov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Marcin
Top achievements
Rank 1
commented on 03 Apr 2024, 06:30 PM

It worked perfectly, much thanks Hristian.
Tags
TabStrip
Asked by
Marcin
Top achievements
Rank 1
Answers by
Hristian Stefanov
Telerik team
Share this question
or