Skip to content

feat: add Tabs compound component#284

Merged
IzumiSy merged 7 commits into
mainfrom
tabs-component-2
May 26, 2026
Merged

feat: add Tabs compound component#284
IzumiSy merged 7 commits into
mainfrom
tabs-component-2

Conversation

@IzumiSy
Copy link
Copy Markdown
Contributor

@IzumiSy IzumiSy commented May 25, 2026

Add Tabs compound component for tab-based navigation, backed by Base UI's Tabs primitive.

Screen shots

スクリーンショット 2026-05-25 17 38 09

Usage

import { Tabs } from "@tailor-platform/app-shell";

<Tabs.Root defaultValue="overview">
  <Tabs.List>
    <Tabs.Tab value="overview">Overview</Tabs.Tab>
    <Tabs.Tab value="projects">Projects</Tabs.Tab>
    <Tabs.Tab value="settings">Settings</Tabs.Tab>
    <Tabs.Tab value="archived" disabled>Archived</Tabs.Tab>
  </Tabs.List>
  <Tabs.Panel value="overview">Overview content</Tabs.Panel>
  <Tabs.Panel value="projects">Projects content</Tabs.Panel>
  <Tabs.Panel value="settings">Settings content</Tabs.Panel>
  <Tabs.Panel value="archived">Archived content</Tabs.Panel>
</Tabs.Root>

@IzumiSy IzumiSy force-pushed the tabs-component-2 branch from 7c2e5ff to 6cb097b Compare May 25, 2026 02:20
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 25, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@tailor-platform/app-shell@284
npm i https://pkg.pr.new/@tailor-platform/app-shell-sdk-plugin@284
npm i https://pkg.pr.new/@tailor-platform/app-shell-vite-plugin@284

commit: dc6b436

@IzumiSy IzumiSy changed the title feat: add Tabs compound component backed by Base UI feat: add Tabs compound component May 25, 2026
@IzumiSy IzumiSy marked this pull request as ready for review May 25, 2026 03:18
Copy link
Copy Markdown
Contributor

@erickteowarang erickteowarang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@IzumiSy IzumiSy requested a review from erickteowarang May 25, 2026 08:36
@IzumiSy IzumiSy self-assigned this May 25, 2026
</svg>
);

const FolderKanbanIcon = () => (
Copy link
Copy Markdown
Contributor

@erickteowarang erickteowarang May 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super minor, but you can probably just pull the example icons from lucide instead for a more "realistic" example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right. Let me quickly updated that before merging this PR. It won't need the extra review again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the other examples are using SVG icons too, so will work in a different PR to eradicate those things with lucide-react all at once.

"astw:text-muted-foreground",
"astw:focus-visible:outline-ring/70 astw:focus-visible:ring-ring/50 astw:focus-visible:outline-1 astw:focus-visible:ring-[3px]",
"astw:data-disabled:pointer-events-none astw:data-disabled:opacity-50",
variant === "line"
Copy link
Copy Markdown
Contributor

@erickteowarang erickteowarang May 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same nested ternary issue 😅, would be great to split this off into it's own function but not that big of a deal.

I can see that the BaseTabs.List component has the same nested class names, you can probably just make a function that accepts an argument of variant and componentType and then return the right class names but it's not that important.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created a seperated ticket to eradicate the nested ternaries 👍

@IzumiSy IzumiSy merged commit 902fad2 into main May 26, 2026
3 checks passed
@IzumiSy IzumiSy deleted the tabs-component-2 branch May 26, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants