Skip to content

[button]: Support icon position (start / end) #36

@CiscoFran10

Description

@CiscoFran10

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.

Image

Proposed API

A minimal prop that maps directly to layout direction:

iconPosition?: "start" | "end"

or, mirroring Checkbox semantics more closely:

iconReverse?: boolean

Example

<Button
  variant="secondary"
  icon={<PlusIcon />}
  iconPosition="end"
>
  Create Worker
</Button>

Internally, this would apply:

flex-row-reverse

to 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

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions