Convert Figma logo to code with AI

youneslaaroussi logoui-buttons

100 Modern CSS Buttons. Every style that you can imagine.

3,506
252
3,506
3

Top Related Projects

18,374

A lightweight and modular front-end framework for developing fast and powerful web interfaces

A utility-first CSS framework for rapid UI development.

171,238

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Semantic is a UI component framework based around useful principles from natural language.

49,506

Modern CSS framework based on Flexbox

12,651

Primer is GitHub's design system. This is the CSS implementation

Quick Overview

UI-buttons is a collection of customizable and reusable button components for web development. It offers a variety of button styles and designs that can be easily integrated into different web projects, providing developers with ready-to-use, visually appealing button elements.

Pros

  • Wide variety of button styles and designs
  • Easy to integrate into existing projects
  • Customizable to fit different design needs
  • Responsive and mobile-friendly

Cons

  • Limited documentation
  • May require additional styling for perfect integration with some design systems
  • Not actively maintained (last update was over a year ago)
  • Lacks advanced features like animations or state management

Code Examples

  1. Basic button usage:
<button class="ui-button">Click me</button>
  1. Styled button with icon:
<button class="ui-button ui-button--primary">
  <i class="fas fa-check"></i>
  Submit
</button>
  1. Disabled button:
<button class="ui-button ui-button--secondary" disabled>
  Disabled Button
</button>

Getting Started

  1. Clone the repository:

    git clone https://github.com/youneslaaroussi/ui-buttons.git
    
  2. Include the CSS file in your HTML:

    <link rel="stylesheet" href="path/to/ui-buttons.css">
    
  3. Use the button classes in your HTML:

    <button class="ui-button ui-button--primary">My Button</button>
    
  4. Customize the buttons by modifying the CSS variables or extending the existing classes.

Competitor Comparisons

18,374

A lightweight and modular front-end framework for developing fast and powerful web interfaces

Pros of UIkit

  • Comprehensive UI framework with a wide range of components and utilities
  • Extensive documentation and community support
  • Regular updates and maintenance

Cons of UIkit

  • Larger file size and potential performance impact
  • Steeper learning curve due to its extensive feature set
  • Less focused on specific button styles

Code Comparison

UIkit button example:

<button class="uk-button uk-button-default">Default</button>
<button class="uk-button uk-button-primary">Primary</button>
<button class="uk-button uk-button-secondary">Secondary</button>

ui-buttons example:

<button class="btn btn-primary">Primary</button>
<button class="btn btn-secondary">Secondary</button>
<button class="btn btn-success">Success</button>

Summary

UIkit is a full-featured UI framework offering a wide range of components and utilities, while ui-buttons focuses specifically on button styles. UIkit provides more comprehensive documentation and regular updates but comes with a larger file size and steeper learning curve. ui-buttons offers a simpler, more focused approach to button styling, which may be preferable for projects that don't require a full UI framework. The code examples demonstrate the different approaches to button implementation, with UIkit using its own class naming convention and ui-buttons following a more common Bootstrap-like syntax.

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Comprehensive utility-first CSS framework with extensive documentation
  • Large and active community, providing support and resources
  • Highly customizable with a robust configuration system

Cons of Tailwind CSS

  • Steeper learning curve due to its utility-first approach
  • Larger file size if not properly optimized
  • Requires additional setup and configuration

Code Comparison

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Button
</button>

ui-buttons:

<button class="ui-button ui-button-primary">
  Button
</button>

Summary

Tailwind CSS offers a more comprehensive and flexible approach to styling, with a utility-first methodology that allows for rapid development and customization. It has a larger community and more extensive documentation, but comes with a steeper learning curve and potential performance considerations.

ui-buttons, on the other hand, provides a simpler, more focused solution for button styling. It offers a more traditional class-based approach, which may be easier to adopt for developers familiar with conventional CSS frameworks. However, it lacks the extensive customization options and broader utility classes that Tailwind CSS provides.

The choice between the two depends on project requirements, team expertise, and desired level of customization.

171,238

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Pros of Bootstrap

  • Comprehensive framework with extensive components and utilities
  • Large community support and extensive documentation
  • Regular updates and maintenance

Cons of Bootstrap

  • Larger file size and potential performance impact
  • Less customizable without significant overrides
  • Steeper learning curve for full utilization

Code Comparison

Bootstrap button:

<button type="button" class="btn btn-primary">Primary</button>

UI-buttons button:

<button class="ui-button">
  <span>Button</span>
</button>

Summary

Bootstrap is a full-featured CSS framework offering a wide range of components and utilities, backed by a large community and extensive documentation. However, it comes with a larger file size and can be less flexible for custom designs.

UI-buttons focuses specifically on button components, providing a lighter-weight solution for projects that only need button styling. It offers more customization options out of the box but lacks the comprehensive feature set of Bootstrap.

The code comparison shows that Bootstrap uses utility classes for styling, while UI-buttons relies on more specific class names. This reflects the different approaches of the two projects: Bootstrap's utility-first design versus UI-buttons' component-specific focus.

Semantic is a UI component framework based around useful principles from natural language.

Pros of Semantic-UI

  • Comprehensive UI framework with a wide range of components and themes
  • Extensive documentation and community support
  • Responsive design and mobile-friendly components

Cons of Semantic-UI

  • Larger file size and potential performance impact
  • Steeper learning curve due to its extensive features
  • Less flexibility for custom designs compared to simpler libraries

Code Comparison

Semantic-UI button example:

<button class="ui primary button">
  Save
</button>

ui-buttons example:

<button class="btn btn-primary">
  Save
</button>

Both libraries offer similar basic button implementations, but Semantic-UI provides more advanced customization options and variations out of the box.

Semantic-UI is a full-featured UI framework that offers a wide range of components and theming options, making it suitable for large-scale projects. It provides extensive documentation and community support, which can be beneficial for developers working on complex applications.

On the other hand, ui-buttons is a more focused library specifically for button components. It offers a simpler approach with less overhead, making it easier to integrate into existing projects or for developers who only need button functionality.

While Semantic-UI provides more advanced features and customization options, it comes with a larger file size and potential performance impact. ui-buttons, being more lightweight, may be preferable for projects with simpler requirements or where performance is a critical factor.

49,506

Modern CSS framework based on Flexbox

Pros of Bulma

  • More comprehensive CSS framework with a wider range of components
  • Larger community and better documentation
  • Regular updates and maintenance

Cons of Bulma

  • Larger file size, potentially impacting page load times
  • Less focused on specific UI elements like buttons
  • Steeper learning curve for beginners

Code Comparison

ui-buttons:

.btn-primary {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
}

Bulma:

.button.is-primary {
  background-color: #00d1b2;
  border-color: transparent;
  color: #fff;
}

Summary

ui-buttons is a lightweight library focused specifically on button styles, making it easier to implement and customize for projects that primarily need button components. It's ideal for developers who want a simple solution without the overhead of a full CSS framework.

Bulma, on the other hand, is a more robust CSS framework that provides a complete set of UI components and utilities. It offers greater flexibility and consistency across various UI elements but may be overkill for projects that only require button styling.

The choice between the two depends on the project's scope and requirements. For button-centric projects, ui-buttons might be more suitable, while Bulma is better for larger, more complex web applications that need a comprehensive UI toolkit.

12,651

Primer is GitHub's design system. This is the CSS implementation

Pros of css

  • More comprehensive CSS framework with broader component coverage
  • Larger community and more frequent updates (20k+ stars, 300+ contributors)
  • Extensive documentation and design guidelines

Cons of css

  • Steeper learning curve due to its extensive nature
  • Potentially larger file size if not using a build process to remove unused styles
  • Less focused on specific UI elements like buttons

Code Comparison

css:

.btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background-repeat: repeat-x;
  background-position: -1px -1px;
  background-size: 110% 110%;
  border: 1px solid rgba(27,31,35,0.2);
  border-radius: 0.25em;
  appearance: none;
}

ui-buttons:

.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

🚀️ We're on Product Hunt!

If you want me to keep making amazing free resources for you, I would really appreaciate your feedback and support on my Product Hunt launch! 🤗️

100 CSS Buttons

🤖️ To See Code, Click on One of The Links

PreviewLinkDescription
CSS Button that changes color on click or hover.BasicCSS Button that changes color on click or hover.
CSS Button slides its two inverted triangles to the middle on click or hover.Inverted TrianglesCSS Button slides its two inverted triangles to the middle on click or hover.
CSS Button that slides its pseudo-element underline on hover or click.Line SlideCSS Button that slides its pseudo-element underline on hover or click.
CSS Button that crosses over itself and expands on hover or click.Don't Cross The LineCSS Button that crosses over itself and expands on hover or click.
CSS Button that slices its background and cycles its content vertically on click or hover.Slicer And MarqueeCSS Button that slices its background and cycles its content vertically on click or hover.
CSS Button that slides two inward-pointing pseudo-element triangles to the center on hover or click.Zoom In And Text RotateCSS Button that slides two inward-pointing pseudo-element triangles to the center on hover or click.
CSS Button that slides its four alternate blocks and flips its text vertically on click or hover.Alternate Blocks And Text FlipCSS Button that slides its four alternate blocks and flips its text vertically on click or hover.
CSS Button with background that slides right on click or hover.Slide RightCSS Button with background that slides right on click or hover.
CSS Button that slides its increasingly tilted diagonal to the right on click or hover.Tilted diagonalCSS Button that slides its increasingly tilted diagonal to the right on click or hover.
CSS Button that slides its background to the right on click or hover and more to the right again on click or hover.In And OutCSS Button that slides its background to the right on click or hover and more to the right again on click or hover.
CSS Button that slides its circular background to the right on click or hover.Bubble RightCSS Button that slides its circular background to the right on click or hover.
CSS Button that moves copies of its text horizontally and at an angle on click or hover.Marquee SignCSS Button that moves copies of its text horizontally and at an angle on click or hover.
CSS Button that morphs one side of its border into a triangle pseudo-element on click or hover.ShapeShifterCSS Button that morphs one side of its border into a triangle pseudo-element on click or hover.
CSS Button with background that fills it up vertically on click.Click To FillCSS Button with background that fills it up vertically on click.
CSS Button that morphs both sides into a triangle pseudo-element on click or hover.Double ShapeShifterCSS Button that morphs both sides into a triangle pseudo-element on click or hover.
CSS Button that morphs into an X using pseudo-elements on click or hover.X ShapeShifterCSS Button that morphs into an X using pseudo-elements on click or hover.
CSS Button that folds from the middle using CSS 3D Transforms on hover or click.Fold MiddleCSS Button that folds from the middle using CSS 3D Transforms on hover or click.
CSS Button that folds from one side using CSS 3D Transforms on hover or click.Fold One SideCSS Button that folds from one side using CSS 3D Transforms on hover or click.
CSS Button that slides its triangular background from the left to the right and rotates its text on hover or click.Arrow Slide + Text RotateCSS Button that slides its triangular background from the left to the right and rotates its text on hover or click.
CSS Button with backgrounds that slides down on click or hover.Slide DownCSS Button with backgrounds that slides down on click or hover.
CSS Button that slides its bubbly radial background to the bottom and rotates its text on hover or click.Bubble Up + Text RotateCSS Button that slides its bubbly radial background to the bottom and rotates its text on hover or click.
CSS Button that moves one corner from the bottom right to the top left to reveal its background on hover or click.OverFoldCSS Button that moves one corner from the bottom right to the top left to reveal its background on hover or click.
CSS Button that focuses its border in on hover or click.Focus InCSS Button that focuses its border in on hover or click.
CSS Button that has a pseudo-element background going over it and out on hover or click.Cover OverCSS Button that has a pseudo-element background going over it and out on hover or click.
CSS Button that fills up its background radially from the center and scales up on hover or click.EnlargeCSS Button that fills up its background radially from the center and scales up on hover or click.
CSS Button that tilts its background from the top left corner on hover or click.SlantedCSS Button that tilts its background from the top left corner on hover or click.
CSS Button that reveals new text by splitting it horizontally from the center on hover or click.Split RevealCSS Button that reveals new text by splitting it horizontally from the center on hover or click.
CSS Button that reveals new text by splitting it alternately from the center on hover or click.Split Reveal AlternateCSS Button that reveals new text by splitting it alternately from the center on hover or click.
CSS Button that reveals new text by splitting it horizontally from the center on hover or click.Split Reveal HorizontalCSS Button that reveals new text by splitting it horizontally from the center on hover or click.
CSS Button that reveals new text by sliding it to the right on hover or click.Slide RevealCSS Button that reveals new text by sliding it to the right on hover or click.
CSS Button that slides its diagonal background to the right on click or hover.Diagonal SwipeCSS Button that slides its diagonal background to the right on click or hover.
CSS Button that reveals new text by sliding it to the right and sliding the old text down on hover or click.Slide Reveal + Text DownCSS Button that reveals new text by sliding it to the right and sliding the old text down on hover or click.
CSS Button that scales its pill-like background down on hover or click.Pill ShrinkCSS Button that scales its pill-like background down on hover or click.
CSS Button that focuses in its pill-like border on hover or click.Pill HaloCSS Button that focuses in its pill-like border on hover or click.
CSS Button that has a moving and glowing border on hover or click.Glow ButtonCSS Button that has a moving and glowing border on hover or click.
CSS Button that reveals new text by rotating it in from the bottom left on hover or click.Rotate RevealCSS Button that reveals new text by rotating it in from the bottom left on hover or click.
CSS Button that slides its two backgrounds successively to the bottom on hover or click.Double Slide DownCSS Button that slides its two backgrounds successively to the bottom on hover or click.
CSS Button that slides its two backgrounds successively to the right on hover or click.Double Slide RightCSS Button that slides its two backgrounds successively to the right on hover or click.
CSS Button that rotates down using 3D Transforms on hover or click.3D Rotate DownCSS Button that rotates down using 3D Transforms on hover or click.
CSS Button that rotates right using 3D Transforms on hover or click.3D Rotate RightCSS Button that rotates right using 3D Transforms on hover or click.
CSS Button that rotates left using 3D Transforms on hover or click.3D Rotate LeftCSS Button that rotates left using 3D Transforms on hover or click.
CSS Button that rotates up using 3D Transforms on hover or click.3D Rotate DownCSS Button that rotates up using 3D Transforms on hover or click.
CSS Button that slides its triangular background to the right on click or hover.Rush TriangleCSS Button that slides its triangular background to the right on click or hover.
CSS Button that has a large box shadow and that tilts down using 3D Transforms on hover or click.3D FloatCSS Button that has a large box shadow and that tilts down using 3D Transforms on hover or click.
CSS Button that pushes itself down in 3D space on hover or click.3D Button ClickCSS Button that pushes itself down in 3D space on hover or click.
CSS Button with striped background that scrolls on click or hover.Striped ZebraCSS Button with striped background that scrolls on click or hover.
CSS Button that slides its characters down successively one after the other on hover or click.Letter DanceCSS Button that slides its characters down successively one after the other on hover or click.
CSS Button that slides its characters up and down alternately on hover or click.Letter Dance 2CSS Button that slides its characters up and down alternately on hover or click.
CSS Button that simulates 3D using html elements and that pushes down on hover or click.3D Button 2CSS Button that simulates 3D using html elements and that pushes down on hover or click.
CSS Button that reveals its fun rainbow gradient background sitting inside of its rainbow gradient image border on hover or click.Rainbow FillCSS Button that reveals its fun rainbow gradient background sitting inside of its rainbow gradient image border on hover or click.
CSS Button that pulsates on hover on hover or click.PulseCSS Button that pulsates on hover on hover or click.
CSS Button that moves its background back into-place on hover or click.OffsetCSS Button that moves its background back into-place on hover or click.
CSS Button that overlays a blurry layer on its background on hover or click.Backdrop BlurCSS Button that overlays a blurry layer on its background on hover or click.
CSS Button that plays the TADA animation from animate.css on hover or click.TadaCSS Button that plays the TADA animation from animate.css on hover or click.
CSS Button that slides its two backgrounds horizontally to the middle on click or hover.Double HorizontalCSS Button that slides its two backgrounds horizontally to the middle on click or hover.
CSS Button that plays the jello animation from animate.css on hover or click.JelloCSS Button that plays the jello animation from animate.css on hover or click.
CSS Button with four blocks on alternate sides that move to the center on click or hover.Alternate BlocksCSS Button with four blocks on alternate sides that move to the center on click or hover.
CSS Button that plays the rubberband animation from animate.css on hover or click.RubberbandCSS Button that plays the rubberband animation from animate.css on hover or click.
CSS Button that plays the wobble animation from animate.css on hover or click.WobbleCSS Button that plays the wobble animation from animate.css on hover or click.
CSS Button that plays the head-shake animation from animate.css on hover or click.Head ShakeCSS Button that plays the head-shake animation from animate.css on hover or click.
CSS Button that plays the heart-beat animation from animate.css on hover or click.Heart BeatCSS Button that plays the heart-beat animation from animate.css on hover or click.
CSS Button that plays the flash animation from animate.css on hover or click.FlashCSS Button that plays the flash animation from animate.css on hover or click.
CSS Button that slides a copy of its text vertically with another color on hover or click.Text SlideCSS Button that slides a copy of its text vertically with another color on hover or click.
CSS Button that has borders that fill-up one after another on hover or click.Border SnakeCSS Button that has borders that fill-up one after another on hover or click.
CSS Button that has borders filling up from the parallel sides on hover or click.Snakes AlternateCSS Button that has borders filling up from the parallel sides on hover or click.
CSS Button that has borders filling up to meet at 2 points on hover or click.Snakes MeetCSS Button that has borders filling up to meet at 2 points on hover or click.
CSS Button with two backgrounds that slide vertically to the center on click or hover.Double VerticalCSS Button with two backgrounds that slide vertically to the center on click or hover.
CSS Button with 4 corners that all converge to the middle on click or hover.Quadruple CornersCSS Button with 4 corners that all converge to the middle on click or hover.
CSS Button that has borders filling up from the center on hover or click.Snakes CenterCSS Button that has borders filling up from the center on hover or click.
CSS Button that fills up its background radially from the center then fades out on hover or click.Material RippleCSS Button that fills up its background radially from the center then fades out on hover or click.
CSS Button that has a fluffy shadow that moves to the inside on hover or click.Neumorphism 1CSS Button that has a fluffy shadow that moves to the inside on hover or click.
CSS Button that has a fluffy shadow and text with a 3D effect using text shadows and that moves to the inside on hover or click.Neumorphism 2CSS Button that has a fluffy shadow and text with a 3D effect using text shadows and that moves to the inside on hover or click.
CSS Button that has a fluffy shadow that smoothly moves to the inside on hover or click.Neumorphism 3CSS Button that has a fluffy shadow that smoothly moves to the inside on hover or click.
CSS Button that moves down on hover or click.Neumorphism 4CSS Button that moves down on hover or click.
CSS Button that has borders filling up slowly then revealing a large neon shadow on hover or click.NeonCSS Button that has borders filling up slowly then revealing a large neon shadow on hover or click.
CSS Button that keeps pulsing on hover or click.I Want AttentionCSS Button that keeps pulsing on hover or click.
CSS Button that moves its background from the outside to the inside on hover or click.HugCSS Button that moves its background from the outside to the inside on hover or click.
CSS Button that moves its background closer from the outside to the inside on hover or click.Hug 2CSS Button that moves its background closer from the outside to the inside on hover or click.
CSS Button that floats up with a box shadow below it on click or hover.Float UpCSS Button that floats up with a box shadow below it on click or hover.
CSS Button that slides its two diagonal backgrounds horizontally to the center on click or hover.Double DiagonalCSS Button that slides its two diagonal backgrounds horizontally to the center on click or hover.
CSS Button that has a background that slowly fills up with a progress animation on hover or click.Progress Fill RightCSS Button that has a background that slowly fills up with a progress animation on hover or click.
CSS Button that has a background that slowly fills up vertically on hover or click.Progress Fill UpCSS Button that has a background that slowly fills up vertically on hover or click.
CSS Button that shrinks into a progress-bar horizontally on hover or click.Progress Shrink VerticalCSS Button that shrinks into a progress-bar vertically on hover or click.
CSS Button that tilts in 3D space to reveal a horizontal progress-bar on hover or click.3D ProgressCSS Button that tilts in 3D space to reveal a horizontal progress-bar on hover or click.
CSS Button that shrinks into a horizontal progress-bar in a smooth and elastic animation on hover or click.Elastic ProgressCSS Button that shrinks into a horizontal progress-bar in a smooth and elastic animation on hover or click.
CSS Button that double-fills its background and plays an elastic animation with its characters on hover or click.Letter Dance 3CSS Button that double-fills its background and plays an elastic animation with its characters on hover or click.
CSS Button that has a circular border that is clipped and fills up then fills up the background on hover or click.Circular ChargeCSS Button that has a circular border that is clipped and fills up then fills up the background on hover or click.
CSS Button that scales its background like a pulse on hover or click.Icon PulseCSS Button that scales its background like a pulse on hover or click.
CSS Button that slices its background in half on click or hover.SlicerCSS Button that slices its background in half on click or hover.
CSS Button that slides vertically inside its borders on hover or click.Icon SlideCSS Button that slides vertically inside its borders on hover or click.
CSS Button that slides its two triangular backgrounds horizontally to the center on click or hover.Double TriangleCSS Button that slides its two triangular backgrounds horizontally to the center on click or hover.
CSS Button that moves two circles closer to each other that have a gooey and slimy effect on hover or click.GooeyCSS Button that moves two circles closer to each other that have a gooey and slimy effect on hover or click.
CSS Button that plays an RGB split animation on hover or click.Seizure GlitchCSS Button that plays an RGB split animation on hover or click.
CSS Button that has borders mimicking hand-drawn edges on hover or click.HandDrawn 1CSS Button that has borders mimicking hand-drawn edges on hover or click.
CSS Button that has borders mimicking hand-drawn edges and floats up on hover or click.HandDrawn 2CSS Button that has borders mimicking hand-drawn edges and floats up on hover or click.
CSS Button that scales down inside its borders on hover or click.Icon ZoomCSS Button that scales down inside its borders on hover or click.
CSS Button that has a border scaling in on it on hover or click.Icon FocusCSS Button that has a border scaling in on it on hover or click.
CSS Button that paper-folds one side to reveal a progress-bar on hover or click.Progress FoldCSS Button that paper-folds one side to reveal a progress-bar on hover or click.
CSS Button that moves up many shadows successively on hover or click.SandwishCSS Button that moves up many shadows successively on hover or click.