Moving Away From Primer::ButtonComponent

This guide will show you how to upgrade from the now deprecated Primer::ButtonComponent to the latest Primer::Beta::Button component.

Arguments

The following arguments for the component initializer have changed between the deprecated and newer versions of the Primer Button.

From Primer::ButtonComponentTo Primer::Beta::ButtonNotes
dropdownn/aremoved in Primer::Beta::Button
group_itemn/aremoved in Primer::Beta::Button
schemeschemeremoved :outline value. use :invisible instead
variantsizerenamed; values remain the same

The remaining arguments have stayed the same.

Primer::Beta::Button no longer supports the boolean settings for being part of a group, nor the dropdown caret via initializer argument. See the following for examples of how to replace this functionality.

Slot Names

The following slots have changed with the newer Primer Button.

From Primer::ButtonComponentTo Primer::Beta::ButtonNotes
n/atrailing_actionappears to the right of the trailing_visual slot

The remaining slot names have stayed the same.

Back to development docs