Skip to content

add support for left and right aligned buttons#73

Open
brendanlensink wants to merge 2 commits intomainfrom
bwl/button-alignment
Open

add support for left and right aligned buttons#73
brendanlensink wants to merge 2 commits intomainfrom
bwl/button-alignment

Conversation

@brendanlensink
Copy link
Collaborator

@brendanlensink brendanlensink commented Feb 13, 2026

This has come up a couple times where I've wanted a button that fills its parent view but has the text left aligned, but we don't really have a good way of supporting it.

This PR adds that option by introducing a new contentHorizontalAlignment parameter that defaults to center but allows users to set it to trailing or leading to move the content to the respective edge.
It also slighly changes the default behaviour for the horizontalContentPadding parameter to fit with this. Since the default was previously nil in all cases, but if you set leading/trailing alignment that would mean the text is right up against the edge of the button which looks obviously wrong.

Screenshot 2026-02-13 at 11 46 51 AM

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.

2 participants