Skip to content

Button

Button component allows users to take actions variants.

First release: 1.0.0 Latest update: July 1, 2025 Current version: 1.0.0

React Angular Vue Svelte HTML

Import

import { PlusButton } from '@plusui/react';
import { PlusButtonComponent } from '@plusui/angular';
import { PlusButton } from '@plusui/vue';
import PlusButton from '@plusui/svelte';
<script src="https://cdn.jsdelivr.net/npm/@plusui/core"></script>

Package

@plusui/react
@plusui/angular
@plusui/vue
@plusui/svelte
@plusui/core

Docs

Changelog

Button Changelog

Recent changes and updates for the button component

v1.0.0

June 26, 2025
Fix

Fixed the `full-width` prop not working correctly.

  • Adjusted host element CSS (`display: inline-block`) that was preventing the component from expanding to full width.
  • This change is part of the "Form System Critical Fixes" EPIC (#72).
Feat

Added Button component with multiple variants

  • 4 visual styles: filled, outlined, dashed, text
  • 6 status variants: default, primary, success, warning, danger, info
  • 3 sizes: sm, md, lg
  • Loading state with spinner
  • Full-width support
  • Form integration with proper ARIA attributes

The Button component enables users to perform actions and make choices with a single tap. It’s a fundamental interactive element that can render as either a <button> for actions or an <a> for navigation when an href is provided.

Button - anatomy

A standard button using default settings.

Button

Show code

The kind prop defines the button’s visual style.

Button

Button

Button

Button

Show code

The status prop sets the button’s color scheme to convey semantic meaning.

Button

Button

Button

Button

Button

Button

Show code

The size prop controls the button’s dimensions.

ButtonButtonButton
Show code

Set the disabled attribute or prop to prevent user interaction.

Disabled Filled

Disabled Outlined

Disabled Text

Show code

Set the loading attribute or prop to indicate an ongoing background process. This also disables the button.

Loading Filled

Loading Outlined

Loading Text

Show code

Set the full-width attribute or fullWidth prop to make the button span the full width of its container.

Full Width Button
Show code

Use the prefix and suffix slots to add icons or other elements alongside the button text.

Download

Upload

Settings

Show code

When an href is provided, the button renders as an anchor element while maintaining button styling.

Dashboard

Profile

GitHub

Show code

Use the external prop for external links that should open in a new tab with secure attributes.

GitHub

Google

Show code

Use the download prop to create download links.

Download PDF

Download Image

Show code

Use the type prop to specify button behavior in forms.

Submit

Reset

Cancel

Show code

Listen for the plus-click event to trigger actions when the button is clicked.

Click Me
Show code
Show console
Button - layout spacing Button - light & dark mode
  • Keyboard Behavior:
    • Buttons and links are focusable via the Tab key.
    • Can be activated using Enter or Space keys when focused.
    • Links support Enter key activation, buttons support both Enter and Space.
  • Screen Reader:
    • When no href is provided, uses the native <button> element with implicit role="button".
    • When href is provided, uses the native <a> element with appropriate link semantics.
    • The text content provided within the component serves as the accessible name.
    • For icon-only buttons/links, provide a descriptive aria-label attribute.
  • Required Developer Actions:
    • Use href for navigation, omit it for actions.
    • Ensure button/link text clearly indicates the action or destination.
    • For icon-only components, always provide an aria-label attribute (e.g., <plus-button href="/settings" aria-label="Settings"><i class="fas fa-cog"></i></plus-button>).
    • Ensure sufficient color contrast between the text/icon and background.
    • Use external prop for external links to automatically add secure attributes.
Site favicon https://www.figma.com/community/file/1310670219738074447/plus-ui-design-system
Visit
NameTypeDefaultDescriptionRequired
kind'filled' | 'outlined' | 'dashed' | 'text''filled'Visual style of the button.No
status'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info''default'Status/color variant of the button.No
size'sm' | 'md' | 'lg''md'Size of the button.No
disabledbooleanfalseDisables button interaction.No
loadingbooleanfalseShows loading spinner and disables interaction.No
fullWidthbooleanfalseMakes the button span the full width.No
hrefstringundefinedWhen provided, renders as anchor link instead of button.No
targetstringundefinedSpecifies where to display the linked URL.No
relstringundefinedRelationship between current and linked document.No
downloadstringundefinedSets link to download instead of navigate.No
externalbooleanfalseAutomatically sets secure attributes for external links.No
type'button' | 'submit' | 'reset''button'Button type for form interactions (button only).No
NamePayload TypeDescription
plus-clickCustomEvent<void>Fired when the button is clicked.
plus-focusCustomEvent<void>Fired when the button receives focus.
plus-blurCustomEvent<void>Fired when the button loses focus.
NameDescription
default (unnamed)The main content of the button (text, etc.).
prefixContent placed before the default slot content.
suffixContent placed after the default slot content.
NameDescription
--text-colorControls the text color.
--border-colorControls the border color.
--bg-defaultControls the default background color.
--bg-hoveredControls the background on hover.
--bg-pressedControls the background when pressed.
--bg-focusedControls the background when focused.
--bg-loadingControls the background when loading.
PartDescription
buttonThe main button container.

Join the Community

Plus UI is built by the community. Join us on our platforms to contribute, get help, and stay up to date.