This component is distributed with npm. After installing npm, you can install the vf-button
with this command.
$ yarn add --dev @visual-framework/vf-button
The source files included are written in Sass(scss
). You can point your Sass include-path
at your node_modules
directory and import it like this.
@import "@visual-framework/vf-button/index.scss";
Make sure you import Sass requirements along with the modules.
File system location: components/vf-button
{% render '@vf-button--default', {
"component-type": "element",
"text": "a primary button",
"theme": "primary"
} %}
<button class="vf-button vf-button--primary">a primary button</button>
{% render '@vf-button--secondary', {
"component-type": "element",
"text": "a secondary button",
"theme": "secondary"
} %}
<button class="vf-button vf-button--secondary">a secondary button</button>
{% render '@vf-button--tertiary', {
"component-type": "element",
"text": "a tertiary button",
"theme": "tertiary"
} %}
<button class="vf-button vf-button--tertiary">a tertiary button</button>
{% render '@vf-button--small', {
"component-type": "element",
"text": "a small button",
"theme": "primary",
"size": "sm"
} %}
<button class="vf-button vf-button--primary vf-button--sm ">a small button</button>
{% render '@vf-button--regular', {
"component-type": "element",
"text": "a regular button",
"theme": "primary"
} %}
<button class="vf-button vf-button--primary">a regular button</button>
{% render '@vf-button--large', {
"component-type": "element",
"text": "a large button",
"theme": "primary",
"size": "lg"
} %}
<button class="vf-button vf-button--primary vf-button--lg ">a large button</button>
{% render '@vf-button--pill', {
"component-type": "element",
"text": "a pill style",
"theme": "primary",
"style": [
"pill"
]
} %}
<button class="vf-button vf-button--primary vf-button--pill">a pill style</button>
{% render '@vf-button--rounded', {
"component-type": "element",
"text": "a rounded style",
"theme": "primary",
"style": [
"rounded"
]
} %}
<button class="vf-button vf-button--primary vf-button--rounded">a rounded style</button>
{% render '@vf-button--outline', {
"component-type": "element",
"text": "an outline style",
"theme": "primary",
"style": [
"outline"
]
} %}
<button class="vf-button vf-button--primary vf-button--outline">an outline style</button>
{% render '@vf-button--link', {
"component-type": "element",
"text": "a link variant",
"button_href": "JavaScript:Void(0);",
"theme": "primary"
} %}
<button class="vf-button vf-button--primary">a link variant</button>
vf-componenet-rollup
vf-core-components
vf-local-overrides
vf-sample
This page is part of the components section.