About RelayUI
Installation
Contributing

Components

BadgesButtonsCode BlocksHeadingsLinksListsMarkdownNavigationSlideoutsText

Coming Soon

AccordionsComing Soon
AlertsComing Soon
CardsComing Soon
FormsComing Soon
Profile ImagesComing Soon
SnackbarsComing Soon
TablesComing Soon

RUI::Buttons

RUI::Buttons is a namespace containing different button variations that can be used in RelayUI. Each button has a different style and purpose, but all buttons share a common interface.

Note that RelayUI differentiates between buttons and links. Buttons are used to trigger actions, while links are used to navigate to a different page or location. For this reason, buttons do not take an href parameter, while links do.

Parameters

Parameter Type Default Description
icon string nil The tabler icon to be used for this link. If blank, no icon will be shown.
data hash {} HTML data attributes for the button, eg: data: { action: slideout#hide }

Variants

Button variants are listed below.

RUI::Buttons::Primary

render RUI::Buttons::Primary.new { "Primary Button" }
render RUI::Buttons::Primary.new(icon: 'star') { "Primary Button" }
render RUI::Buttons::Primary.new(icon: 'star')

RUI::Buttons::Secondary

render RUI::Buttons::Secondary.new { "Secondary Button" }
render RUI::Buttons::Secondary.new(icon: 'star') { "Secondary Button" }
render RUI::Buttons::Secondary.new(icon: 'star')

RUI::Buttons::Outline

render RUI::Buttons::Outline.new { "Outline Button" }
render RUI::Buttons::Outline.new(icon: 'star') { "Outline Button" }
render RUI::Buttons::Outline.new(icon: 'star')

RUI::Buttons::Desctructive

render RUI::Buttons::Destructive.new { "Destructive Button" }
render RUI::Buttons::Destructive.new(icon: 'star') { "Destructive Button" }
render RUI::Buttons::Destructive.new(icon: 'star')

RUI::Buttons::Ghost

render RUI::Buttons::Ghost.new { "Ghost Button" }
render RUI::Buttons::Ghost.new(icon: 'star') { "Ghost Button" }
render RUI::Buttons::Ghost.new(icon: 'star')

Dependencies

The following gems have been included in RelayUI to make this component work: