Button

Default

Color

Available values are prm, yellow, red, green, any HEX or RGBA/RGB value.

Types

You can change the variant of RButton by passing the boolean props of flat, fill, bordered or textStyle.

Loading

You can set a loading over the button using boolean loading prop

Icon

You can show an icon before or after button content with icon prop or named icon slot. In order to customize you own icon pack please refer to icons section.

iconAfter prop places the icon after the content of the button.

Only Icon

iconOnly prop makes button fit the icon by setting fixed width and height to it.

Compact

Tag

Which tag it should render instead of button. can be any html tag or a Vue component.

Routing

incomplete: You can use RButton as nuxt-link / router-link or a tag.

If you are using to prop on RButton in a nuxt application, the passed options.nuxtOptions.NuxtLink will be used, or you can pass it directly to RButton
<RButton :tag="NuxtLink" to="/some-route" />
If none of conditions above meet, router-link will be used.

Props

NameTypeRequiredDefaultDescription
tostringNo''The target route of the link. Only use either to or href.
hrefstringNo''The target URL of the link. Only use either to or href.
flatbooleanNofalseIf true, removes background.
borderedbooleanNofalseIf true, adds border styling.
fillbooleanNofalseIf true, sets background color to primary theme color (prm).
cancelbooleanNofalseIf true, gives disabled style without disabling the button.
colorstringNo''The primary color of the button.
textColorstringNo''The text color of the button ( only when fill is true ).
textStylebooleanNofalseIf true, sets the style of normal text to it.
roundbooleanNofalseIf true, adds border radius to create a circular shape.
disabledbooleanNofalseIf true, disables the button and changes its appearance.
iconstringNo''The name of the icon to be displayed in the button.
iconOnlybooleanNofalseIf true, gives specific width and height..
iconAfterbooleanNofalseIf true, displays the icon after the button text.
colorInheritbooleanNofalseIf true, text color will be inheritted from parent.
tagstring | componentNoundefinedThe html tag or view components instead of button
compactbooleanNoundefinedReduces padding of the button.
loadingbooleanNoundefinedIf true set a loading state on component.

Events

All events/attrs passed down will be passed to button/nuxt-link/router-link/a component.

Slots

NameDescription
defaultDefault slot for button
iconIcon slot for button (overrides icon prop)