9.5k
HTML

Button

Buttons allow the user to take actions or make choices.

Buttons allow the user to take actions or make choices.

Class name
Type
btnComponentButton
btn-neutralColorneutral color
btn-primaryColorprimary color
btn-secondaryColorsecondary color
btn-accentColoraccent color
btn-infoColorinfo color
btn-successColorsuccess color
btn-warningColorwarning color
btn-errorColorerror color
btn-outlineStyleoutline style
btn-softStylesoft style
btn-textStyletext only style
btn-gradientStylegradient style
btn-ghostStyleghost style
btn-activeBehaviorlooks active
btn-disabledBehaviorlooks disabled
btn-xsSizeExtra small size
btn-smSizeSmall size
btn-mdSizeMedium size (default)
btn-lgSizeLarge size
btn-xlSizeExtra large size
btn-wideModifiermore horizontal padding
btn-blockModifierFull width
btn-squareModifier1:1 ratio
btn-circleModifier1:1 ratio with rounded corners

Default Button

The base button only requires the btn class. This provides the default styling with proper padding, typography, and hover states.

Button Sizes

Control the button size using btn-xs, btn-sm, btn-md (default), btn-lg, or btn-xl.

Button Colors

Apply semantic colors using btn-primary, btn-secondary, btn-accent, btn-neutral, btn-info, btn-success, btn-warning, or btn-error.

Soft Buttons

Use btn-soft for a subtle, low-emphasis button style. Combine with color classes for colored soft buttons.

Outline Buttons

Use btn-outline for buttons with transparent background and visible border.

Text Buttons

Use btn-text for minimal buttons without background or border.

Gradient Buttons

Use btn-gradient for buttons with animated gradient backgrounds.

Ghost Button

Use btn-ghost for buttons that blend with the background until hovered.

Active Buttons

Use btn-active to show a permanently pressed state.

Disabled Buttons

Use btn-disabled class or the native disabled attribute to indicate a button cannot be clicked.

Wide Button

Use btn-wide for buttons with more horizontal padding.

Block Button

Use btn-block for full-width buttons that span the entire container.

Square and Circle Buttons

Use btn-square for icon buttons with 1:1 ratio, or btn-circle for rounded icon buttons.

Button with Icon

Add icons inside buttons using SVG elements. Icons automatically scale with the button.

Button with Loading

Use the loading component inside buttons to indicate a pending action.

coss.com ui

Built by and for the team of Cal.com, Inc. — the leading commercial open source company (“coss”).