Skip to content

Button ​

Trigger actions, submit forms, and navigate. Buttons communicate what action will occur when the user interacts with them.

Open in Storybook

Interactive Demo ​

Hierarchy Variants ​

All hierarchy styles

Sizes ​

Size variants

Radius ​

Border radius styles

States ​

Loading and disabled states

Full Width ​

Full width button

Usage ​

vue
<script setup>
import { Button } from '@yellowcard/b2b-design-system';
</script>

<template>
  <Button
    hierarchy="primary"
    size="large"
    label="Submit"
    @click="handleSubmit"
  />
</template>

API Reference ​

Props ​

PropTypeDefaultDescription
hierarchy'primary' | 'secondary-color' | 'secondary-grey' | 'ghost' | 'danger''primary'Visual style variant
size'small' | 'large''large'Button size
radius'regular' | 'curved''regular'Border radius style
labelstring''Button text content
type'button' | 'submit' | 'reset''button'HTML button type attribute
disabledbooleanfalseDisabled state
loadingbooleanfalseLoading state with animated dots
hasLeftIconbooleanfalseWhether left icon slot is populated
hasRightIconbooleanfalseWhether right icon slot is populated
iconOnlybooleanfalseRender as icon-only button (no label)
fullWidthbooleanfalseStretch to full container width
skeletonbooleanfalseShow skeleton loading placeholder

Events ​

EventPayloadDescription
clickMouseEventEmitted on click (not emitted when disabled, loading, or type=submit)

Slots ​

SlotBindingsDescription
default—Button text content (overrides label prop)
left-icon—Icon rendered before the label
right-icon—Icon rendered after the label
icon—Icon content for icon-only buttons

Accessibility ​

  • Uses native <button> element for full keyboard support
  • aria-busy applied during loading state
  • aria-disabled reflects disabled state
  • Disabled buttons prevent focus and click propagation
  • Loading state is communicated to screen readers