@dpa-id-components/ui-button

0.8.0 • Public • Published

@dpa-id-components/ui-button

UiButton Vue 2.x input component based on the dpa Design Kit

Installation

yarn add @dpa-id-components/ui-button

Usage

<!-- SomeComponent.vue using UiButton -->
<template>
  <ui-button :size="medium" :color="blue" :disabled="false"
    :to="myfunction()"
  >
  <!-- Custom button text in default slot -->
  Click me
  </ui-button>
</template>

<script>
  import UiButton from "@dpa-id-components/ui-component";

  export default {
    components: {
      UiButton,
    }
  };
</script>

Demo

View a demo of <ui-button> on Storybook

API

Props

Name Type Default Description
size String medium Sets the size attribute of the Button
color String blue Sets the color attribute of the Button
disabled Boolean false Wether the button is disabled
to Object null vue-router route object, renders button as router-link
href String "" The href attribute, renders button as a tag
rounded Boolean false Whether a rounded border-radius is applied to the button
textClasses String "" Additional classes to override default button text styles

Events

Name Type Description
hover HoverEvent Emitted when the button is hovered
click ClickEvent triggerd when the button is clicked

Slots

Name Description
default slot for the rendering the button's content

Readme

Keywords

none

Package Sidebar

Install

npm i @dpa-id-components/ui-button

Weekly Downloads

1

Version

0.8.0

License

MIT

Unpacked Size

384 kB

Total Files

10

Last publish

Collaborators

  • goersch.juliane
  • martinherweg
  • borchert.manja
  • roessel.nico
  • karlbanke
  • hajo.cirksena.dpa
  • schubert.florian
  • michelle3105
  • arifpehlivan
  • dpa-connect-deployment
  • antje.sommer
  • mlnmln
  • kgierke
  • andrewbeng89
  • mridul_dpa