Button

Buttons allow users to take actions and make choices with a single tap. They communicate actions that users can take and are typically placed throughout your UI.

Basic Button

Default Button

The simplest button with default variant and size

Preview

Variants

Button Variants

vui provides 4 different button variants: contained (filled), outlined (border), text (minimal), and gradient (colorful gradient background)

Preview

Gradient Buttons

Gradient Variant

Eye-catching gradient buttons perfect for primary CTAs. Features a smooth color transition from primary to blue to mint, with hover effects and optional glow.

Preview

Colors

Button Colors

Customize the color scheme to match your design system. Available colors work with all variants.

Preview

Contained

Outlined

Text

Sizes

Button Sizes

Four different sizes to fit various use cases: sm, md, lg, and xl

Preview

Buttons with Icons

Icon Buttons

Combine buttons with icons for better visual communication

Preview

Import

import { Button } from '@vui/material';

API Reference

PropTypeDescription
variant'contained' | 'outlined' | 'text' | 'gradient'The visual style variant of the buttonDefault: 'contained'
color'primary' | 'secondary' | 'success' | 'error'The color scheme of the buttonDefault: 'primary'
size'sm' | 'md' | 'lg' | 'xl'The size of the buttonDefault: 'md'
disabledbooleanIf true, the button will be disabledDefault: false
glowbooleanIf true, adds a glow effect to the buttonDefault: false
isLoadingbooleanIf true, shows a loading spinner and disables the buttonDefault: false
leftIconReact.ReactNodeIcon element to display on the left side of the button
rightIconReact.ReactNodeIcon element to display on the right side of the button
fullWidthbooleanIf true, the button will take up the full width of its containerDefault: false
disableRipplebooleanIf true, the ripple effect on click will be disabledDefault: false
onClick(event: React.MouseEvent) => voidCallback fired when the button is clicked
classNamestringAdditional CSS classes to apply
childrenReact.ReactNodeThe content of the button