Skip to content

Add controlled icons to Button and ButtonLink - #19

Merged
codefoxx merged 1 commit into
mainfrom
feat/button-icons
Sep 13, 2026
Merged

codefoxx merged 1 commit into
mainfrom
feat/button-icons

Conversation

@codefoxx

Copy link
Copy Markdown
Owner

Summary

Add controlled icon support to Button and ButtonLink while keeping icon layout owned by Codefox UI.

Closes #18

Included

  • typed icon prop on Button and ButtonLink
  • logical iconPosition values: start and end
  • default icon position is start
  • logical LTR/RTL behavior inherited from the surrounding dir
  • internal icon spacing, alignment, and sizing
  • decorative icon wrapper so visible text remains the accessible name
  • Storybook Overview coverage for LTR and RTL plus Playground control for icon position
  • tests for logical placement and accessibility
  • public ButtonIconPosition type export
  • README and AGENTS directionality guidance

Stacked PR

This PR is intentionally based on feat/button-link / PR #17 because ButtonLink is part of the change. Merge #17 first; after that this PR can be retargeted to main without mixing the two feature reviews.

Local visual review

Review Primitives/Button / Overview, Primitives/Button / Playground, Primitives/ButtonLink / Overview, and Primitives/ButtonLink / Playground in Storybook. No new dependencies were added.

Base automatically changed from feat/button-link to main September 13, 2026 17:42
@codefoxx
codefoxx merged commit b31e51a into main Sep 13, 2026
1 check passed
@codefoxx
codefoxx deleted the feat/button-icons branch September 13, 2026 17:45
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.

Add controlled icon support to Button and ButtonLink

1 participant