Tabbed views

Arrr! Pirrrates

Fello' pirrates, be awarrre some featurrres may not work fer us in this trrranslat'n. Like table of rrramblings, some Merrrmaids and stuff.

Th' tabs shorrrtcode displays arbitrary rrrambl'n 'n unlimited number o' tabs. This comes 'n handy eg. fer provid'n code snippets fer multiple languages or provid'n configurat'n 'n different formats.

print("Hello World!")
echo "Hello World!"

Usage

{{< tabs >}}
{{% tab name="python" %}}
```python
print("Hello World!")
```
{{% /tab %}}
{{% tab name="bash" %}}
```bash
echo "Hello World!"
```
{{% /tab %}}
{{< /tabs >}}

Parameter

Name Default Notes
groupId default Arbitrary name o' th' group th' tab view belongs t'.

Tab views wit' th' same groupId sychr'nize their selected tab. This sychronizat'n applies t' th' whole ship!
<content> <empty> Arbitrary number o' tabs defined wit' th' tab sub-shortcode.
Arrr

When us'n tab views wit' different rrrambl'n sets, make sure t' use a common groupId fer equal sets o' tabs but distinct groupId fer different sets.

Th' tab select'n be restored automatically based on th' groupId an' if it cannot find a tab item because it came from th' 'default' group on a different plank then all tabs will be empty at first!

Examples

Distinct groupId

{{< tabs groupId="config" >}}
{{% tab name="json" %}}
```json
{
  "Hello": "World"
}
```
{{% /tab %}}
{{% tab name="XML" %}}
```xml
<Hello>World</Hello>
```
{{% /tab %}}
{{% tab name="properties" %}}
```properties
Hello = World
```
{{% /tab %}}
{{< /tabs >}}
{
  "Hello": "World"
}
<Hello>World</Hello>
Hello = World

Non-Distinct groupId

See what happens t' this tab view if ye select properties tab from th' previous example.

{{< tabs groupId="config" >}}
{{% tab name="json" %}}
```json
{
  "Hello": "World"
}
```
{{% /tab %}}
{{% tab name="XML" %}}
```xml
<Hello>World</Hello>
```
{{% /tab %}}
{{< /tabs >}}
{
  "Hello": "World"
}
<Hello>World</Hello>