Tabs

Overview

Tabs is a component that allows for switching between multiple sections of content.

Import

import { Tabs, Tab } from "css-materials";

Usage

Content for Tab 1
<Tabs>
    <Tab label="Tab 1">
        <div>
            Content for Tab 1
        </div>
    </Tab>
    <Tab label="Tab 2">
        <div>Content for Tab 2</div>
    </Tab>
</Tabs>

Disabled

To disable a tab, set disabled to true.

Content for Tab 1
<Tabs>
        <Tab label="Tab 1">
            <div>
                Content for Tab 1
            </div>
        </Tab>
        <Tab label="Tab 2" disabled>
            <div>Content for Tab 2 (disabled)</div>
        </Tab>
    </Tabs>