Buttons

Versatile button components with multiple variants, sizes, and modifiers.

Variants

Thrynd provides 4 button variants for different use cases:

Button Variants

VariantUsage
btn-primaryMain call-to-action, most important action on page
btn-secondarySecondary actions, less prominent
btn-dangerDestructive actions like delete, remove
btn-ghostMinimal style for tertiary actions

Sizes

Buttons come in three sizes: small, medium (default), and large.

Button Sizes

Modifiers

Outline

Add btn-outline for a bordered button style:

Outline Buttons

Full Width

Use btn-block or w-full utility for full-width buttons:

Full Width Button

Loading State

Add btn-loading to indicate a loading state:

Loading Button

Disabled

Use the disabled attribute to disable a button:

Disabled Buttons

Combining Modifiers

You can combine multiple modifiers for custom button styles:

Combined Modifiers

Accessibility

Best Practices:
  • Use descriptive text that explains the action
  • Add aria-label for icon-only buttons
  • Use disabled attribute instead of aria-disabled when possible
  • Ensure sufficient color contrast (all Thrynd buttons meet WCAG AA)

Common Patterns

Button Group

Button Group

Form Actions

Form with Buttons