feat(select): add trigger sizes + error state, align with COSS - #35
Merged
Conversation
Match the COSS UI select docs (coss.com/ui/docs/components/select):
SelectTrigger:
- Add size prop ('sm' | 'default' | 'lg') via cva, with responsive
min-heights matching our button sizing (min-h-9 sm:min-h-8, etc.)
- Switch trigger affordance to the ChevronsUpDown icon (COSS's select
affordance) and add the COSS before-highlight inset shadow
- Add aria-invalid/error styling (destructive border + ring)
Demos (the COSS docs examples our set lacked):
- Select52: small size
- Select53: large size
- Select54: error / aria-invalid state
The existing 51 demos already cover the other documented patterns
(icons, groups, labels, multiple, object values, combobox, etc.).
type-check, lint and build pass; verified in-browser (all three sizes
distinct, error border, dropdown opens on the sized trigger).
Deploying originui-vue with
|
| Latest commit: |
fb0caf5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ba45e8ef.originui-vue.pages.dev |
| Branch Preview URL: | https://feat-coss-select-enhancement.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.
Applies the same treatment as the table port to Select — matching the COSS UI select docs. Unlike Table, our Select already ships 51 demos covering most documented patterns (icons, groups, labels, multiple, object values, combobox, flags, avatars…), so this focuses on the genuine capability gaps rather than re-porting what exists.
SelectTrigger enhancements
sizeprop (sm|default|lg) via cva — the parallel to Table'svariant. Responsive min-heights match our existing button sizing (min-h-9 sm:min-h-8, etc.), so the default size is unchanged.before:inset-highlight shadow for surface consistency.New demos
size="sm")size="lg")aria-invalidstateNative selects (
SelectNative) are untouched.Verification