`tabs-trigger.svelte`: `data-active` should be `data-[state=active]`
### Description
The `tabs-trigger.svelte` component uses Tailwind's `data-active:` shorthand for styling active tab triggers. However, `bits-ui`'s `Tabs.Trigger` sets `data-state="active"` on the active tab — not a boolean `data-active` attribute.
As a result, all active-state styles on `Tabs.Trigger` are silently broken: the active tab gets no background, text color, shadow, or line indicator.
### Affected file
[`docs/src/lib/registry/ui/tabs/tabs-trigger.svelte`](https://github.com/huntabyte/shadcn-svelte/blob/main/docs/src/lib/registry/ui/tabs/tabs-trigger.svelte)
### Current (broken)
```
data-active:bg-background
data-active:text-foreground
group-data-[variant=default]/tabs-list:data-active:shadow-sm
group-data-[variant=line]/tabs-list:data-active:shadow-none
group-data-[variant=line]/tabs-list:data-active:bg-transparent
group-data-[variant=line]/tabs-list:data-active:after:opacity-100
…
```
### Expected (fix)
Replace all `data-active:` with `data-[state=active]:` to match the attribute that `bits-ui` actually sets:
```
data-[state=active]:bg-background
data-[state=active]:text-foreground
group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm
group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none
group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent
group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100
…
```
### Note
The `doc-tabs-trigger.svelte` [already uses `data-[state=active]` correctly](https://github.com/huntabyte/shadcn-svelte/blob/main/docs/src/lib/components/doc-tabs/doc-tabs-trigger.svelte), so this appears to be an oversight in the registry component only.
关闭于 2026-05-18 0 条评论