feat(button): match COSS button design - #24
Merged
Conversation
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.
Deploying originui-vue with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First primitive in the component audit (primitives-first approach). Updates the
buttonVariantscva to match COSS's new button styling frompackages/ui/src/components/button.tsx(MIT).What changed
Base + variant classes now mirror COSS:
rounded-lgwith a border on every variantinset-shadow-[0_1px_rgba(255,255,255,0.16)]) + colored shadow (shadow-primary/24) on filled variants — the signature COSS 'raised' lookcursor-pointer, softer disabled (opacity-64), responsive heights (h-9 sm:h-8),[&_svg]:opacity-80Base 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), anddata-slotloading plumbing dropped.Size keys (
default/sm/lg/icon) are preserved so the 51 button demos and every consumer keep working viacn()overrides.Verification
inset-shadow/not-disabled/opacity-64utilities compile)This establishes the template for the remaining primitives (Input, Badge, Checkbox, Switch, …).