Disabled State
Use the disabled attribute or the .hu-btn-disabled class to prevent user interaction. Disabled buttons have reduced opacity and a not-allowed cursor.
Disabled Buttons
HTML
<button class="hu-btn hu-btn-primary" disabled>Primary</button>
<!-- Or use the class -->
<button class="hu-btn hu-btn-secondary hu-btn-disabled">Secondary</button>
Loading State
Add the .hu-btn-loading class to show a spinning animation. The button text becomes transparent and a spinner appears in its place.
Loading Buttons
HTML
<button class="hu-btn hu-btn-primary hu-btn-loading">Loading</button>
Real-World Examples
Common button patterns used in dashboards and admin panels and client-facing pages.
Order CTA Buttons
HTML
<button class="hu-btn hu-btn-primary hu-btn-lg">Get Started Now</button>
<button class="hu-btn hu-btn-outline hu-btn-lg">Learn More</button>
Server Control Buttons
HTML
<button class="hu-btn hu-btn-success">
<svg>...check icon...</svg>
Start Server
</button>
<button class="hu-btn hu-btn-warning">
<svg>...refresh icon...</svg>
Restart Server
</button>
<button class="hu-btn hu-btn-danger">
<svg>...stop icon...</svg>
Stop Server
</button>
Domain Search Input Group
HTML
<div class="hu-input-group">
<input type="text" class="hu-form-control" placeholder="Enter your domain name">
<button class="hu-btn hu-btn-primary">Search</button>
</div>
API Reference
Complete list of CSS classes available for buttons.
| Class | Description |
|---|---|
.hu-btn |
Base button class. Apply to any <button> or <a> element. |
.hu-btn-primary |
Primary filled button with brand color. |
.hu-btn-secondary |
Secondary filled button with neutral color. |
.hu-btn-success |
Success filled button with green color. |
.hu-btn-danger |
Danger filled button with red color. |
.hu-btn-warning |
Warning filled button with amber color. |
.hu-btn-info |
Info filled button with blue color. |
.hu-btn-outline |
Outline button with transparent background. |
.hu-btn-outline-primary |
Outline button with primary border and text. |
.hu-btn-outline-success |
Outline button with success border and text. |
.hu-btn-outline-danger |
Outline button with danger border and text. |
.hu-btn-ghost |
Ghost button with transparent background and border. |
.hu-btn-link |
Link-styled button that looks like a text link. |
.hu-btn-xs |
Extra small button size. |
.hu-btn-sm |
Small button size. |
.hu-btn-md |
Medium (default) button size. |
.hu-btn-lg |
Large button size. |
.hu-btn-xl |
Extra large button size. |
.hu-btn-icon |
Square button for icon-only content. |
.hu-btn-block |
Full-width button that fills its container. |
.hu-btn-loading |
Shows a spinner animation and hides button text. |
.hu-btn-disabled |
Disables the button (alternative to disabled attribute). |
.hu-btn-group |
Container to group buttons together with shared borders. |