Skip to content

feat: add --justify-content variable to button component #29935

@craigbehnke

Description

@craigbehnke

Prerequisites

Describe the Feature Request

Add a css variable to pierce the button component's shadow dom and allow for custom justification of the button's contents.

Describe the Use Case

This would work well for supporting buttons in lists, where all of the existing text is aligned to one side and where the button should be full-width to support easier clicking & tapping.

Describe Preferred Solution

Add a --justify-content css variable to the button definition. This variable should be used in the span.button-inner component, with the fallback being the current behavior of 'center'.

Here's the location in code where this should be added

Describe Alternatives

The only alternative to get the desired behavior is to create a button component from scratch, which would result in having to miss out on many other features already included in the IonButton.

Related Code

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions