Inkline provides you with custom button styles with support for multiple sizes, states, and more.
Variants
Inkline includes several predefined button styles, each serving its own semantic purpose, with a few extra variants available for more control.
Button Variants
<i-buttonvariant="primary">Primary</i-button>
<i-buttonvariant="secondary">Secondary</i-button>
<i-buttonvariant="success">Success</i-button>
<i-buttonvariant="danger">Danger</i-button>
<i-buttonvariant="warning">Warning</i-button>
<i-buttonvariant="info">Info</i-button>
<i-buttonvariant="light">Light</i-button>
<i-buttonvariant="dark">~~~~Dark</i-button>
Button Type
The <i-button> component makes use of a <button> element markup behind the scenes. Therefore, you can assign a type to it,
just like with the <button> element.
Button Type
<i-buttontype="button">Button</i-button>
<i-buttontype="submit">Submit</i-button>
<i-buttontype="reset">Reset</i-button>
If you need to change the <button> node used to render the component, you can use the tag property to change it.
Sometimes, buttons should not stand out so much. Replace the default modifier classes with the outline property
to remove background images and colors on any button when not interacted with.
Circle buttons are very common when working with icon actions. You can transform buttons into circles using the circle
modifier. You're also able to use the size modifier to control the size of your circle buttons.
Circle Button
<i-buttoncirclesize="sm">S</i-button>
<i-buttoncircle>M</i-button>
<i-buttoncirclesize="lg">L</i-button>
Sizes
You're able to use the size modifier to control the size of your buttons, using one of the available sizes: sm, md, and lg.
The default size is set to md.
Button Sizes
<i-buttonsize="sm">Small Button</i-button>
<i-buttonsize="md">Medium Button</i-button>
<i-buttonsize="lg">Large Button</i-button>
Block
You can create block level buttons that span the full width of a parent by adding the block property.
Block Button
<i-buttonblock>Block Button</i-button>
Social Variants
You can use variants for the most common social login buttons out of the box. The examples below make use of the block modifier to have them full-width.
Social Variants
<i-buttonvariant="facebook"block>Singin with Facebook</i-button>
<i-buttonvariant="google"block>Singin with Google</i-button>
<i-buttonvariant="twitter"block>Singin with Twitter</i-button>
<i-buttonvariant="github"block>Singin with GitHub</i-button>
Button Icon
You can easily use the i-button component together with any icon component (i.e. FontAwesome, IcoMoon), including any of the list of icons of the i-icon component.
Buttons will appear pressed when active. You can force a button to have an active appearance with the active property (this will also include the aria-pressed="true" attribute).
Here you can find a list of the various customization options you can use for the button component as props, as well as available slots and events.
Button API
Property active
TypeBoolean
Acceptedtrue, false
Defaultfalse
Description Sets the button component state as active.
Property block
TypeBoolean
Acceptedtrue, false
Defaultfalse
Description Sets the button component style to span the whole parent width.
Property circle
TypeBoolean
Acceptedtrue, false
Defaultfalse
Description Sets the button component style to be a circle.
Property disabled
TypeBoolean
Acceptedtrue, false
Defaultfalse
Description Sets the button component state as disabled.
Property href
TypeString
Description Treats the button component as an anchor.
Property link
TypeBoolean
Acceptedtrue, false
Defaultfalse
Description Sets the button component style to be a plain link.
Property loading
TypeBoolean
Acceptedtrue, false
Defaultfalse
Description Sets the button loading state. To be used together with the loading slot.
Property outline
TypeBoolean
Acceptedtrue, false
Defaultfalse
Description Sets the button component style to be an outline.
Property size
TypeString
Acceptedsm, md, lg
Defaultmd
Description Sets the size of the button component.
Property tag
TypeString
Accepteda, button, input
Defaultbutton
Description Sets the tag used to render the button component.
Property to
Type Object
Description Treats the button component as a router-link.
Property variant
TypeString
Acceptedprimary, secondary, light, dark, success, danger, warning, info
Defaultlight
Description Sets the color variant of the button component.
Slot default
Description Slot for button default content.
Slot loading
Description Slot for button loading state.
Event click
Type(event: Event) => {}
Description Emitted when button component is clicked.
Sass Variables
Here you can find a list of the Sass variables you can use for the button components. If you're looking to find common variables that these rely on, you should take a look at the Sass Variables page.