mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-17 15:38:30 +00:00
Prepare 1.0.0-beta.3
This commit is contained in:
@@ -65,8 +65,8 @@
|
||||
<Step title="Include the JavaScript files">
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/basecoat-css@1.0.0-beta.2/dist/js/basecoat.min.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/basecoat-css@1.0.0-beta.2/dist/js/tabs.min.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/basecoat-css@1.0.0-beta.3/dist/js/basecoat.min.js" defer></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/basecoat-css@1.0.0-beta.3/dist/js/tabs.min.js" defer></script>
|
||||
```
|
||||
|
||||
</Step>
|
||||
@@ -133,19 +133,19 @@
|
||||
### HTML structure
|
||||
|
||||
<dl>
|
||||
<dt><code class="highlight language-html"><div class="tabs"></code></dt>
|
||||
<dt><code><div class="tabs"></code></dt>
|
||||
<dd>
|
||||
Root tabs container. It becomes horizontal or vertical based on the child tablist's <code>aria-orientation</code>.
|
||||
<dl>
|
||||
<dt><code class="highlight language-html"><nav role="tablist" aria-orientation="horizontal"></code></dt>
|
||||
<dt><code><nav role="tablist" aria-orientation="horizontal"></code></dt>
|
||||
<dd>
|
||||
Tablist containing tab buttons. Set <code>aria-orientation="vertical"</code> for vertical tabs and <code>data-variant="line"</code> for the line style.
|
||||
<dl>
|
||||
<dt><code class="highlight language-html"><button role="tab" id="{ TAB_ID }" aria-controls="{ PANEL_ID }" aria-selected="true" tabindex="0"></code></dt>
|
||||
<dt><code><button role="tab" id="{ TAB_ID }" aria-controls="{ PANEL_ID }" aria-selected="true" tabindex="0"></code></dt>
|
||||
<dd>Tab trigger. The active tab has <code>aria-selected="true"</code> and <code>tabindex="0"</code>. Inactive tabs use <code>tabindex="-1"</code>. Disabled tabs use <code>disabled</code> or <code>aria-disabled="true"</code>.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><code class="highlight language-html"><div role="tabpanel" id="{ PANEL_ID }" aria-labelledby="{ TAB_ID }"></code></dt>
|
||||
<dt><code><div role="tabpanel" id="{ PANEL_ID }" aria-labelledby="{ TAB_ID }"></code></dt>
|
||||
<dd>Panel controlled by a tab. Inactive panels are hidden.</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
### Line
|
||||
|
||||
<Preview class="w-full max-w-md">
|
||||
<Preview>
|
||||
<div class="tabs" id="tabs-line">
|
||||
<nav role="tablist" aria-orientation="horizontal" data-variant="line">
|
||||
<button type="button" role="tab" id="tabs-line-tab-1" aria-controls="tabs-line-panel-1" aria-selected="true" tabindex="0">Account</button>
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
### Vertical
|
||||
|
||||
<Preview class="w-full max-w-md">
|
||||
<Preview>
|
||||
<div class="tabs w-full" id="tabs-vertical">
|
||||
<nav role="tablist" aria-orientation="vertical">
|
||||
<button type="button" role="tab" id="tabs-vertical-tab-1" aria-controls="tabs-vertical-panel-1" aria-selected="true" tabindex="0">Account</button>
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
### Disabled
|
||||
|
||||
<Preview class="w-full max-w-md">
|
||||
<Preview>
|
||||
<div class="tabs" id="tabs-disabled">
|
||||
<nav role="tablist" aria-orientation="horizontal">
|
||||
<button type="button" role="tab" id="tabs-disabled-tab-1" aria-controls="tabs-disabled-panel-1" aria-selected="true" tabindex="0">Account</button>
|
||||
@@ -207,7 +207,7 @@
|
||||
|
||||
### Icons
|
||||
|
||||
<Preview class="w-full max-w-md">
|
||||
<Preview>
|
||||
<div class="tabs" id="tabs-icons">
|
||||
<nav role="tablist" aria-orientation="horizontal">
|
||||
<button type="button" role="tab" id="tabs-icons-tab-1" aria-controls="tabs-icons-panel-1" aria-selected="true" tabindex="0">
|
||||
@@ -233,7 +233,7 @@
|
||||
|
||||
Tabs support document direction. Set `dir="rtl"` on the tabs root or a parent element.
|
||||
|
||||
<Preview class="w-full max-w-md">
|
||||
<Preview>
|
||||
<div dir="rtl">
|
||||
<div class="tabs" id="tabs-rtl">
|
||||
<nav role="tablist" aria-orientation="horizontal" data-variant="line">
|
||||
|
||||
Reference in New Issue
Block a user