Skip to content

Commit 833ce9e

Browse files
kb(tabstrip): Add KB for dotted outline (#2703)
Co-authored-by: Dimo Dimov <961014+dimodi@users.noreply.github.com>
1 parent 9d781ba commit 833ce9e

File tree

2 files changed

+71
-2
lines changed

2 files changed

+71
-2
lines changed

knowledge-base/tabstrip-customize-selected-tab-border-blazor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ else
9595

9696
## See Also
9797

98-
* [Telerik TabStrip Overview](https://docs.telerik.com/blazor-ui/components/tabstrip/overview)
98+
* [Remove Dotted Tab Outline](slug://tabstrip-kb-remove-dotted-outline)
99+
* [Override the Theme or Apply Custom CSS Styles](slug://themes-override)
99100
* [Telerik TabStrip Tabs Configuration](https://docs.telerik.com/blazor-ui/components/tabstrip/tabs-configuration)
100-
* [Override the Theme or Apply Custom CSS Styles](slug://themes-override)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Remove Dotted Outline of Focused TabStrip Tab
3+
description: Learn how to remove the dotted outline that appears on Telerik TabStrip tabs when focused or clicked.
4+
type: how-to
5+
page_title: How to Remove Dotted Outline of Focused TabStrip Tab
6+
slug: tabstrip-kb-remove-dotted-outline
7+
tags: telerik, blazor, tabstrip, css, styles
8+
ticketid: 1675627, 1644688, 1558648, 1577788, 1539971, 1533822, 1509800
9+
res_type: kb
10+
---
11+
12+
## Environment
13+
14+
<table>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>TabStrip for Blazor</td>
19+
</tr>
20+
</tbody>
21+
</table>
22+
23+
## Description
24+
25+
This KB article answers the following questions:
26+
27+
* How to remove the dotted line around the TabStrip tab content when focus is set on the tab?
28+
* How to hide the border for selected tab that appears after click?
29+
* How to get rid of TabStrip borders outlines on click, active, and focus?
30+
* How to prevent selection of the TabStrip content `<div>`?
31+
* How to supress the darker dashed border that appears when you click inside the Tab Strip?
32+
* How can I control the appearance of the Telerik Blazor TabStrip tabs?
33+
34+
## Solution
35+
36+
The focus outline of TabStrip tabs is an accessibility feature. The example below shows to how to remove it, but this is not recommended. Instead, consider using different custom focus styles.
37+
38+
1. Set the TabStrip `Class` parameter to a custom CSS class.
39+
1. Use the custom class to apply an `outline-style:none` or `outline:none` style to the `div.k-tabstrip-content` children of the TabStrip element.
40+
41+
>caption Remove TabStrip tab dotted outline
42+
43+
````RAZOR
44+
<TelerikTabStrip @bind-ActiveTabIndex="@TabStripActiveTabIndex"
45+
Class="no-outline">
46+
<TabStripTab Title="Tab 1">
47+
Tab 1 Content
48+
</TabStripTab>
49+
<TabStripTab Title="Tab 2">
50+
Tab 2 Content
51+
</TabStripTab>
52+
</TelerikTabStrip>
53+
54+
<style>
55+
div.no-outline > .k-tabstrip-content:focus {
56+
outline-style: none;
57+
}
58+
</style>
59+
60+
@code {
61+
private int TabStripActiveTabIndex { get; set; }
62+
}
63+
````
64+
65+
## See Also
66+
67+
* [Customize Selected Tab Shadow](slug://tabstrip-customize-selected-tab-border-blazor)
68+
* [TabStrip Overview](slug://components/tabstrip/overview)
69+
* [Override Theme Styles](slug://themes-override)

0 commit comments

Comments
 (0)