Skip to content

feat(select): add trigger sizes + error state, align with COSS - #35

Merged
Jettonn merged 1 commit into
mainfrom
feat/coss-select-enhancements
Jul 14, 2026
Merged

feat(select): add trigger sizes + error state, align with COSS#35
Jettonn merged 1 commit into
mainfrom
feat/coss-select-enhancements

Conversation

@Jettonn

@Jettonn Jettonn commented Jul 14, 2026

Copy link
Copy Markdown
Owner

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

  • size prop (sm | default | lg) via cva — the parallel to Table's variant. Responsive min-heights match our existing button sizing (min-h-9 sm:min-h-8, etc.), so the default size is unchanged.
  • ChevronsUpDown icon — COSS's select affordance (was a single ChevronDown), plus the COSS before: inset-highlight shadow for surface consistency.
  • aria-invalid / error styling — destructive border + ring.

New demos

Demo COSS example
Select52 Small size (size="sm")
Select53 Large size (size="lg")
Select54 Error / aria-invalid state

Native selects (SelectNative) are untouched.

Verification

  • ✅ type-check
  • ✅ eslint
  • ✅ build
  • ✅ in-browser: three sizes render distinctly, error border shows, ChevronsUpDown applied across the styled selects, dropdown opens and selects on a sized trigger

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).
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying originui-vue with  Cloudflare Pages  Cloudflare Pages

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

View logs

@Jettonn
Jettonn merged commit f7a5897 into main Jul 14, 2026
3 checks passed
@Jettonn
Jettonn deleted the feat/coss-select-enhancements branch July 14, 2026 09:02
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