Skip to content

feat(Button): add new component#166

Merged
johnleider merged 15 commits intomasterfrom
feat/button-component
Mar 24, 2026
Merged

feat(Button): add new component#166
johnleider merged 15 commits intomasterfrom
feat/button-component

Conversation

@johnleider
Copy link
Copy Markdown
Member

@johnleider johnleider commented Mar 24, 2026

Summary

  • New headless Button compound component with disabled, readonly, passive, and loading states
  • Button.Group for toggle selection with v-model, single/multi-select, and mandatory support
  • Loading grace period (1s) prevents UI flicker on fast operations
  • Icon accessibility enforcement with aria-label warnings for icon-only buttons
  • Hidden form input for toggle value submission
  • Documentation page with 5 interactive examples
  • 39 tests covering all states, group integration, and loading behavior

Sub-components

Component Purpose
Button.Root Primary element via Atom (button/anchor/router-link)
Button.Group Selection container for toggle groups
Button.Loading Loading content (visible after grace period)
Button.Content Default content (fallback when not loading)
Button.Icon Icon wrapper with accessibility
Button.HiddenInput Hidden form input for toggle values

Test plan

  • 39 unit tests passing (states, group, loading grace period, icon a11y, hidden input)
  • Lint clean
  • Typecheck clean (only pre-existing Splitter errors)
  • Package builds successfully
  • Playwright visual verification of all 4 states
  • Manual review of docs page at /components/actions/button

The v-bind spread `{ ...attrs, ...slotProps.attrs }` silently
overwrote user-provided :style with internal styles. Add explicit
:style array binding to merge user, slot, and component styles.

Same fix applied to Slider in 5216ff0.
@johnleider johnleider self-assigned this Mar 24, 2026
@johnleider johnleider added this to the v0.2.0 milestone Mar 24, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 24, 2026

Open in StackBlitz

commit: d81dfea

@johnleider johnleider merged commit 718822f into master Mar 24, 2026
12 of 13 checks passed
@johnleider johnleider deleted the feat/button-component branch March 24, 2026 03:42
johnleider added a commit that referenced this pull request Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant