-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Describe the feature request
The Button component supports an icon prop, but the icon position is currently fixed (leading). There is no built-in way to render a trailing icon.
Kumo already solves this exact layout problem in the Checkbox component using a layout switch that applies flex-row-reverse. Introducing the same pattern for Button would improve consistency across the system and avoid introducing new concepts.
Proposed API
A minimal prop that maps directly to layout direction:
iconPosition?: "start" | "end"or, mirroring Checkbox semantics more closely:
iconReverse?: booleanExample
<Button
variant="secondary"
icon={<PlusIcon />}
iconPosition="end"
>
Create Worker
</Button>Internally, this would apply:
flex-row-reverseto the button root while preserving spacing via gap.
Current limitation
<Button variant="secondary" icon={<PlusIcon />}>
Create Worker
</Button>Icon is always rendered before the label, making it impossible to express common trailing-icon patterns such as:
- “Next →”
- “Open ↗”
- “Continue ›”
References
- Button docs: https://kumo-ui.com/components/button/
- Checkbox behavior (row-reverse ordering)
Question for Maintainers
Why use the icon prop instead of just passing as children ??
<Button variant="primary"><ArrowRightIcon/> Click me </Button>
<Button variant="primary" icon={<ArrowRightIcon/>}>Click me </Button>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels