Skip to content

Commit cc846d3

Browse files
authored
Merge pull request #79 from github/clarify-n-in-readme
clarify N in Readme
2 parents 7a8fa4a + 8ff3dbe commit cc846d3

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,16 @@ import '@github/tab-container-element'
3131
</tab-container>
3232
```
3333

34-
If none of the tabs have `aria-selected=true`, then the first tab will be selected automatically. You can also add the `default-tab=N` attribute to avoid having to set `aria-selected=true` on the desired tab.
34+
If none of the tabs have `aria-selected=true`, then the first tab will be selected automatically. You can also add the `default-tab=N` attribute to avoid having to set `aria-selected=true` on the desired tab, where `N` is the 0-based tab index:
35+
36+
```html
37+
<!-- The _second_ tab will be selected -->
38+
<tab-container default-tab="1">
39+
<button type="button" id="tab-one" role="tab">Tab one</button>
40+
<button type="button" id="tab-two" role="tab">Tab two</button>
41+
<button type="button" id="tab-three" role="tab">Tab three</button>
42+
<!-- ... -->
43+
</tab-container>
3544

3645
### Events
3746

0 commit comments

Comments
 (0)