Button
Buttons simplify user interactions with a single tap, enhancing the user experience and aiding those with mobility issues.
Last updated
Buttons simplify user interactions with a single tap, enhancing the user experience and aiding those with mobility issues.
Last updated
The Button component is a flexible user interface element that allows users to interact with your application and trigger different actions and operations. Other than prebuilt 120 variants, we provide many customization options to accommodate various design preferences and use cases. Buttons are commonly placed throughout your user interface, such as in
modal windows
forms
cards
toolbars
The anatomy of a button component consists of essential elements such as the button label, container, prefix/suffix icon, and optional properties for customization, enabling user interaction and engagement within your application.
With our variants and variable structure, you have the creative freedom to tailor your buttons to precisely match your design preferences. All variable and variants identified exactly same on both our design system and our multi-framework component library.
Filled
Default
Default
No icon
Small
Outlined
Primary
Hovered
Prefix icon
Medium
Dashed
Info
Pressed
Suffix icon
Large
Text
Error
Disabled
Icon only
Warning
Loading
Success
Invert
Filled button are used to indicate the main action or the primary path a user should take. They have a strong visual indicator, encouraging users to complete their intended journey. Its a solid-colored button.
Outlined button are typically placed alongside primary buttons and indicate that there are multiple avenues or alternative actions users can take.
Dashed button have a dashed border. They are used to draw attention without being too visually dominant.
Text button are used for less prominent actions to maintain focus on the primary content. They have minimal visual weight and its perfect for text links and unobtrusive calls to action.
The Button Component comes with various statuses, each designed to convey a specific message or action to the user:
Default: This status is the button's standard state, always ready for action and serving as the reliable foundation of your user interface.
Primary: A special status that highlights the button's importance. It acts as the main call to action, designed to stand out and grab user attention.
Info: Indicates that the button will provide additional information when clicked.
Error: Signifies an action that could lead to an error or is used to highlight errors that need to be corrected.
Warning: Warns the user of a potential risk or something that requires caution.
Success: Denotes that an action has been successfully completed or will lead to a positive outcome.
Invert: Reverses the color scheme of the button, which can be used to distinguish it from others or to fit a particular design aesthetic.
The button component also has different states to communicate interactivity and feedback to users.
Default state when it is available for interaction but not being interacted with.
Hovered state when the cursor hovers over it, indicating potential interactivity.
Pressed state appears when the button is clicked, giving visual feedback that the action has been triggered.
Disabled state is used when a button cannot be interacted when a particular action is unavailable.
Loading state is displayed when the button triggers a time-consuming operation, like submitting a form or fetching data.
Incorporating icons into buttons can enhance the user experience by providing visual cues, improving aesthetics, and simplifying interactions.
No Icon button is often used for actions that are self-explanatory or when a text label alone provides sufficient context
Prefix Icon button is positioned before the text label on a button, offering additional context or visual emphasis to the action.
Suffix Icon button appear after the text label, offering visual cues or feedback related to the action.
Icon-Only button use visual symbols without any accompanying text. They are ideal when actions can be represented by universally recognised icons, reducing clutter and text translations.
The Button component supports different sizes such as small, medium, large to fit various design requirements.
Button events are used to perform specific actions when a button is clicked. With the Plus-Button component, you can use the "plus-click" event to capture button click events and trigger functions accordingly.
Layout and spacing for buttons in user interfaces are crucial for usability, aesthetics, and accessibility. By paying attention to the placement and spacing of buttons, designers can create interfaces that are both visually appealing and user-friendly, ultimately enhancing the overall user experience.
Providing both light and dark modes for buttons in user interfaces enhances user comfort, choice, accessibility, and energy efficiency. It also aligns with contemporary design trends and accommodates a variety of user preferences and needs.
We structured the design system simply switch from the light mode to the dark mode within the Layer > Color section.
Accessibility is not only a moral and legal imperative but also a valuable design principle. Ensuring that buttons in a design system are accessible not only benefits users with disabilities but also leads to a more inclusive, user-friendly, and successful digital product.
Discernible Text
Ensures buttons have discernible text
ID Attribute
Ensures every id attribute value is unique
Interactive Controls
Ensures interactive controls aren’t nested as they are not always announced by screen readers or can cause focus problems for assistive technologies
Tabindex Attribute
Ensures tabindex attribute values are not greater than 0
Color Contrast
Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds.
To learn more about Plus UI's accessibility criteria, please visit Accessibility.
kind
Button kind
string
filled, outlined, dashed, text
filled
status
Button status
string
primary, default
default
size
Button size
string
sm, md, lg
md
disabled
Button disabled
boolean
-
false
plus-click
Button click event
-
plus-focus
Button focus event
-
plus-blur
Button blur event
-
default
Button content