Buttons

Foundational interactive elements that enable user actions and workflow navigation.

Edit this file
Purpose of Buttons
Understanding the core purpose and benefits of button components in user interfaces.

Trigger Actions

Enable users to initiate functions, submit data, and perform operations with clear affordances.

Navigate Workflows

Guide users through processes, open dialogs, and control application state changes.

Provide Feedback

Communicate system states, loading progress, and action outcomes to users.

Core Functions

Form Submission:

Submit forms, save data, and validate user input

State Management:

Toggle features, switch modes, and control application state

Navigation Control:

Open overlays, navigate between views, and control user flow

Process Control:

Start, stop, pause operations and manage workflows

When to Use Buttons
Understanding the appropriate contexts for button components.
Use Buttons When:
  • • Performing actions (Save, Delete, Submit)
  • • State changes (Toggle features, switch modes)
  • • Process control (Start, stop, pause operations)
  • • Opening overlays (Modals, dialogs, popovers)
  • • Form submission and validation
  • • API calls and data operations
Avoid Buttons When:
  • • Navigation between pages or sections
  • • Opening external websites or resources
  • • Downloading content or files
  • • Jumping to page sections or anchors
  • • Inline content within text flows
  • • Reference links to documentation

Button vs Alternatives

Button vs Link:

Use buttons for actions that change application state. Use links for navigation and accessing external resources.

Button vs Toggle/Switch:

Use buttons for actions requiring confirmation. Use toggles for immediate state changes and settings that take effect instantly.

Button vs Menu Item:

Use buttons for primary actions visible on the interface. Use menu items for secondary actions grouped within dropdowns or context menus.

Button vs Alternatives Comparison
Understanding when to use buttons over other interactive components
ComponentPrimary UseAction TypeVisual WeightExample Context
ButtonActions & State ChangesImmediate executionHigh visibilitySubmit, Save, Delete
LinkNavigation & ReferencesPage transitionText-integratedGo to page, Open docs
ToggleBinary State ControlInstant toggleFocused utilityDark mode, Notifications
Icon ButtonSpace-constrained ActionsQuick actionsMinimal footprintClose, Edit, More options
Menu ItemGrouped ActionsContextual actionsHidden until revealedDropdown options, Context menus
TabView SwitchingContent filteringPersistent navigationOverview, Details, Settings
Design Principles
Core principles that guide effective button design
Clear Affordance:

Buttons should look clickable and indicate their interactive nature through visual design

Predictable Behavior:

Users should be able to predict what will happen when they click a button

Appropriate Hierarchy:

Visual weight should match the importance of the action

Contextual Relevance:

Button labels and styling should match the current context and user goals

Usage Metrics
Key metrics to consider when implementing buttons
Click-through Rate85-95%
Touch Target Size44px min
Loading State Duration< 3 seconds
Error Recovery Time< 5 seconds
PrimaryMain Actions
Primary buttons for the most important actions users can take

Best for:

  • • Form submissions
  • • Primary CTAs
  • • Confirmation actions
  • • Workflow progression
SecondarySupporting Actions
Secondary and tertiary buttons for supporting actions and alternatives

Best for:

  • • Cancel actions
  • • Secondary options
  • • Subtle interactions
  • • Supporting workflows
Button vs Alternatives Comparison
Understanding when to use buttons over other interactive components
ComponentPrimary UseAction TypeVisual WeightExample Context
ButtonActions & State ChangesImmediate executionHigh visibilitySubmit, Save, Delete
LinkNavigation & ReferencesPage transitionText-integratedGo to page, Open docs
ToggleBinary State ControlInstant toggleFocused utilityDark mode, Notifications
Icon ButtonSpace-constrained ActionsQuick actionsMinimal footprintClose, Edit, More options
Menu ItemGrouped ActionsContextual actionsHidden until revealedDropdown options, Context menus
TabView SwitchingContent filteringPersistent navigationOverview, Details, Settings
Design Principles
Core principles that guide effective button design
Clear Affordance:

Buttons should look clickable and indicate their interactive nature through visual design

Predictable Behavior:

Users should be able to predict what will happen when they click a button

Appropriate Hierarchy:

Visual weight should match the importance of the action

Contextual Relevance:

Button labels and styling should match the current context and user goals

Usage Metrics
Key metrics to consider when implementing buttons
Click-through Rate85-95%
Touch Target Size44px min
Loading State Duration< 3 seconds
Error Recovery Time< 5 seconds