Suppers Software Logo
HomeUI Components
ButtonDropdownLoginButtonModalSearchButtonSearchModalSwapThemeController
AccordionAvatarBadgeCardCarouselChat BubbleCollapseCountdownDiffKbdLogoStatTableTimelineUserInfo
BreadcrumbsDockLinkMenuNavbarPaginationSidebarStepsTabsUserProfileDropdown
CheckboxColorInputDateInputDatetimeInputEmailInputFile InputInputNumberInputPasswordInputRadioRangeRatingSelectTextareaTimeInputToggle
ArtboardDividerDrawerFooterHeroIndicatorJoinMaskStack
AlertLoadingProgressRadial ProgressSkeletonToastTooltip
BrowserCodePhoneWindow

Button

Interactive buttons with multiple variants, sizes, and states for user actions, fully compatible with DaisyUI 5 and Tailwind 4

  • Home
  • Components

Basic Colors

Standard button colors and variants

Show Code

Button Variants

Different visual styles

Show Code

Button Sizes

Various sizes for different use cases

Show Code

Button States

Different states and interactions

Show Code

Usage Notes

  • Use Button component for server-side rendered buttons without interactivity
  • Use Button island for client-side interactive buttons with event handlers
  • Primary buttons should be used sparingly for the main action on a page
  • Outline buttons work well for secondary actions
  • Ghost buttons are ideal for tertiary actions or navigation
  • Loading state automatically disables the button to prevent multiple submissions
  • Enhanced loading spinner patterns with DaisyUI 5: supports spinner, dots, ring, and ball types
  • Improved hover states and animations with smoother transitions
  • Better accessibility with enhanced focus rings and ARIA support
  • Enhanced color system with better semantic tokens and contrast ratios
  • Supports Tailwind 4 arbitrary values for custom styling: bg-[#custom], text-[14px]
  • Optimized performance with better CSS generation and tree-shaking
  • Fully backward compatible - all existing usage patterns continue to work
  • Respects user's prefers-reduced-motion settings for animations

API Props

PropTypeRequiredDefaultDescription
activebooleanNofalseApply active state styling
aria-describedbystringNo-ID of element that describes this component
aria-expandedbooleanNo-Whether expandable element is expanded
aria-hiddenbooleanNo-Whether element is hidden from screen readers
aria-labelstringNo-Accessible label
asstringNo-Render as different HTML element (e.g., 'a', 'div')
childrenanyNo-Component content
circlebooleanNofalseMake button circular (requires fixed dimensions)
classstringNo-Additional CSS classes
color'primary' | 'secondary' | 'accent' | 'neutral' | 'base-100' | 'base-200' | 'base-300' | 'base-content' | 'info' | 'success' | 'warning' | 'error'No-Component color theme
disabledbooleanNofalseDisable component interactions
glassbooleanNofalseApply glass morphism effect
Examples: true
Since: 1.1.0
hrefstringNo-Link URL
idstringNo-HTML id attribute
loadingbooleanNofalseShow loading state
loadingType'spinner' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity'No"spinner"Loading animation type (DaisyUI 5)
noAnimationbooleanNofalseDisable button animations and transitions
onBlur(arg0: any) => voidNo-Blur event handler
onClick(arg0: any) => voidNo-Click event handler (Islands only)
onFocus(arg0: any) => voidNo-Focus event handler
relstringNo-Link relationship
rolestringNo-ARIA role attribute
shape'circle' | 'square'No-Button shape (alternative to circle/square props)
size'xs' | 'sm' | 'md' | 'lg' | 'xl'No"md"Component size
squarebooleanNofalseMake button square (equal width and height)
tabIndexnumberNo-Tab index for keyboard navigation
target'_blank' | '_self' | '_parent' | '_top'No-Link target
type'button' | 'submit' | 'reset'No"button"HTML button type attribute
variant'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'outline' | 'ghost' | 'link' | 'neutral'No-Component visual style variant
widebooleanNofalseMake button full width
Examples: true, false
Since: 1.0.0
Components
UI LibraryBrowse AllGetting Started
Builder
Generate AppTemplatesAPI Reference
Resources
DocumentationDenodaisyUI

© 2025 Suppers Software Limited. Built with Deno, Fresh, Preact & DaisyUI.