Skip to content

feat(button): match COSS button design - #24

Merged
Jettonn merged 1 commit into
mainfrom
feat/coss-button-primitive
Jul 13, 2026
Merged

feat(button): match COSS button design#24
Jettonn merged 1 commit into
mainfrom
feat/coss-button-primitive

Conversation

@Jettonn

@Jettonn Jettonn commented Jul 13, 2026

Copy link
Copy Markdown
Owner

First primitive in the component audit (primitives-first approach). Updates the buttonVariants cva to match COSS's new button styling from packages/ui/src/components/button.tsx (MIT).

What changed

Base + variant classes now mirror COSS:

  • rounded-lg with a border on every variant
  • Inset top-highlight (inset-shadow-[0_1px_rgba(255,255,255,0.16)]) + colored shadow (shadow-primary/24) on filled variants — the signature COSS 'raised' look
  • cursor-pointer, softer disabled (opacity-64), responsive heights (h-9 sm:h-8), [&_svg]:opacity-80

Base UI → Vue/Reka translation

COSS uses Base UI conventions this port can't: data-pressed:active:, --theme(--color-white/16%)rgba(...) (compiles without COSS's helper), and data-slot loading plumbing dropped.

Size keys (default/sm/lg/icon) are preserved so the 51 button demos and every consumer keep working via cn() overrides.

Verification

  • ✅ type-check · ✅ eslint · ✅ build (new inset-shadow/not-disabled/opacity-64 utilities compile)
  • ✅ Visual check on /buttons (light + dark): rounded-lg, borders, inset highlight render

This establishes the template for the remaining primitives (Input, Badge, Checkbox, Switch, …).

Adopt COSS's button styling (packages/ui button.tsx), adapted for Vue/Reka:
- rounded-lg with a border on every variant
- inset top-highlight (inset-shadow) + colored shadow on filled variants
- cursor-pointer, softer disabled state (opacity-64), responsive heights
- Base UI conventions translated: data-pressed -> active, --theme() -> rgba()

Keeps the existing size keys (default/sm/lg/icon) so demos are unaffected.
Verified: type-check, lint, build, and light/dark visual check on /buttons.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying originui-vue with  Cloudflare Pages  Cloudflare Pages

Latest commit: 57a7660
Status: ✅  Deploy successful!
Preview URL: https://fb2aa30d.originui-vue.pages.dev
Branch Preview URL: https://feat-coss-button-primitive.originui-vue.pages.dev

View logs

@Jettonn
Jettonn merged commit 5aef04a into main Jul 13, 2026
3 checks passed
@Jettonn
Jettonn deleted the feat/coss-button-primitive branch July 13, 2026 14:30
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.

1 participant