SkyLineCSS provides a set of utility classes to quickly style buttons. These classes can be used to create buttons of different sizes, colors, and styles.
Basic Button
To create a basic button, use the .btn class:
<buttonclass="btn">Button</button>
Button Sizes
You can also specify the size of the button using the following classes:
SkyLineCSS provides predefined color classes for buttons:
.btn-primary: Primary color
.btn-secondary: Secondary color
.btn-success: Success color
.btn-danger: Danger color
.btn-warning: Warning color
Example:
Rounded Buttons
You can create rounded buttons using the .rounded class:
Full-Width Button
To create a full-width button, use the .btn-block class:
Disabled Button
To create a disabled button, add the disabled attribute and use the .btn-disabled class:
Button with Icons
You can include icons inside buttons using classes like .btn-icon-left and .btn-icon-right:
Hover and Focus Styles
SkyLineCSS provides hover and focus styles for buttons:
.hover:bg-gray-200: Background color on hover
.hover:text-white: Text color on hover
.focus:outline-none: Remove outline on focus
.focus:ring-2: Add ring on focus
.focus:ring-purple-600: Ring color on focus
.focus:ring-offset-2: Ring offset on focus
Example:
Complete Example
Here's a complete example combining different button styles:
These are some of the available button styles in SkyLineCSS. Feel free to mix and match these classes to create various button designs for your projects.