Convert Figma logo to code with AI

eludadev logoui-buttons

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

3,431
246
3,431
2

Top Related Projects

71,970

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.

37,442

⚡️ Simple, Modular & Accessible UI Components for your React Applications

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.

Quick Overview

UI Buttons is a collection of customizable and reusable button components for web applications. It offers a wide variety of button styles, animations, and effects, designed to enhance the user interface of modern web projects.

Pros

  • Extensive collection of button designs and styles
  • Easy to integrate into existing projects
  • Customizable and responsive
  • Cross-browser compatible

Cons

  • Limited documentation
  • May require additional CSS knowledge for advanced customization
  • Some button styles might not be suitable for all design aesthetics
  • Potential performance impact if overused

Code Examples

  1. Basic Button:
<button class="ui-button">Click me</button>

This code creates a simple, styled button using the UI Buttons library.

  1. Animated Button:
<button class="ui-button ui-button--animated">
  <span>Hover me</span>
</button>

This example demonstrates an animated button that changes appearance on hover.

  1. Icon Button:
<button class="ui-button ui-button--icon">
  <i class="fas fa-heart"></i>
  Like
</button>

This code creates a button with an icon (using Font Awesome) alongside text.

Getting Started

To use UI Buttons in your project, follow these steps:

  1. Include the CSS file in your HTML:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/eludadev/ui-buttons@main/dist/ui-buttons.min.css">
  1. Add the appropriate classes to your button elements:
<button class="ui-button ui-button--primary">Primary Button</button>
<button class="ui-button ui-button--secondary">Secondary Button</button>
  1. Customize buttons further by combining classes or adding your own CSS styles.

Competitor Comparisons

71,970

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.

Pros of ui

  • More comprehensive UI component library, offering a wider range of components beyond just buttons
  • Utilizes modern React patterns and Tailwind CSS for flexible and customizable styling
  • Actively maintained with frequent updates and contributions from the community

Cons of ui

  • Steeper learning curve due to its more complex architecture and dependencies
  • Requires additional setup and configuration compared to the simpler ui-buttons library

Code Comparison

ui-buttons:

import { Button } from 'ui-buttons';

<Button variant="primary" size="large">
  Click me
</Button>

ui:

import { Button } from "@/components/ui/button"

<Button variant="default" size="lg">
  Click me
</Button>

Both libraries offer similar button implementations, but ui provides more customization options and follows a different import pattern. The ui library also uses a different naming convention for size props ("lg" instead of "large").

ui-buttons focuses solely on button components, making it a lighter and more specialized option. In contrast, ui offers a broader range of components and integrates more deeply with modern React and Tailwind CSS ecosystems, providing greater flexibility but requiring more setup and familiarity with these technologies.

37,442

⚡️ Simple, Modular & Accessible UI Components for your React Applications

Pros of Chakra UI

  • Comprehensive component library with extensive customization options
  • Strong TypeScript support and robust documentation
  • Active community and regular updates

Cons of Chakra UI

  • Larger bundle size due to its extensive feature set
  • Steeper learning curve for beginners
  • May require additional configuration for optimal performance

Code Comparison

UI Buttons:

import { Button } from 'ui-buttons';

<Button variant="primary" size="medium">
  Click me
</Button>

Chakra UI:

import { Button } from '@chakra-ui/react';

<Button colorScheme="blue" size="md">
  Click me
</Button>

Summary

UI Buttons is a lightweight library focused specifically on button components, offering a simpler implementation for projects that primarily need button styling. Chakra UI, on the other hand, is a full-featured component library that provides a wide range of UI elements and styling options.

While Chakra UI offers more flexibility and a broader set of components, it comes with a larger footprint and potentially more complexity. UI Buttons may be more suitable for smaller projects or those specifically focused on button customization, while Chakra UI is better suited for larger applications requiring a comprehensive UI toolkit.

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.

Pros of Headless UI

  • Offers a wider range of UI components beyond just buttons
  • Provides unstyled, accessible components for greater flexibility
  • Integrates seamlessly with Tailwind CSS for easy customization

Cons of Headless UI

  • Requires more setup and configuration compared to UI Buttons
  • May have a steeper learning curve for beginners
  • Less focused on specific button styles and variations

Code Comparison

UI Buttons:

import { Button } from 'ui-buttons'

<Button variant="primary" size="large">
  Click me
</Button>

Headless UI:

import { Button } from '@headlessui/react'

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

Summary

UI Buttons provides a simpler, more focused approach to button components with pre-designed styles. Headless UI offers a broader range of unstyled components, allowing for greater customization but requiring more setup. The choice between the two depends on project requirements and developer preferences for styling and flexibility.

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.

Pros of Primitives

  • More comprehensive UI component library with a wider range of components
  • Highly customizable and accessible components with robust documentation
  • Active development and maintenance with regular updates

Cons of Primitives

  • Steeper learning curve due to its more complex architecture
  • Requires more setup and configuration compared to simpler button libraries

Code Comparison

ui-buttons:

import { Button } from 'ui-buttons';

<Button variant="primary" size="large">
  Click me
</Button>

Primitives:

import * as Button from '@radix-ui/react-button';

<Button.Root className="Button" size="large">
  <Button.Text>Click me</Button.Text>
</Button.Root>

Summary

Primitives offers a more comprehensive and customizable UI component library, including buttons and many other elements. It provides greater flexibility and accessibility features but requires more setup and has a steeper learning curve. ui-buttons, on the other hand, focuses specifically on button components, offering a simpler and more straightforward implementation for projects that primarily need button functionality.

The code comparison shows that ui-buttons has a more concise syntax for basic button implementation, while Primitives offers more granular control over button structure and styling. The choice between the two depends on the project's specific needs, complexity, and desired level of customization.

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.