A set of layered sections of content—known as tab panels—that are displayed one at a time.
Account
Make changes to your account here. Click save when you're done.
Password
Change your password here. After saving, you'll be logged out.
Installation
Install bits-ui:
Copy and paste the component source files linked at the top of this page into your project.
Usage
<script lang="ts">
import * as Tabs from "$lib/components/ui/tabs/index.js";
</script>
<Tabs.Root value="account" class="w-[400px]">
<Tabs.List>
<Tabs.Trigger value="account">Account</Tabs.Trigger>
<Tabs.Trigger value="password">Password</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="account">
Make changes to your account here.
</Tabs.Content>
<Tabs.Content value="password">Change your password here.</Tabs.Content>
</Tabs.Root>