Tabs

You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.

# Basics

To create tabs, you can use the moonshine::tabs component

<x-moonshine::tabs
:tabs="[
'tab_1' => 'Tab 1',
'tab_2' => 'Tab 2'
]"
:contents="[
'tab_1' => fake()->text(),
'tab_2' => fake()->text()
]"
/>

# Active tab

You can specify the default active tab by setting the activeTab.

<x-moonshine::tabs
:tabs="[
'tab_1' => 'Tab 1',
'tab_2' => 'Tab 2'
]"
:contents="[
'tab_1' => fake()->text(),
'tab_2' => fake()->text()
]"
activeTab="tab_2"
/>