Simple buttons you can use easily for your next project

Overview

sButtons

Logo made by Harshit Sharma

GitHub license CodeQL npm version PRs Welcome Open Source Love svg1 All Contributors

💡 Simple buttons you can use easily for your next project.

Contents

Get Started with sButtons

Download CSS File

You can download the (CSS file)(https://raw.githubusercontent.com/sButtons/sbuttons/master/dist/sbuttons.min.css) and then add it to your HTML file in between the tags. Download the file and link it as a stylesheet in between your tags, as shown below.

">
<link rel="stylesheet" href="/path/to/sbuttons.min.css" />

Make sure to replace "/path/to/sbuttons.min.css" with the path you stored it in.

CDN

Or instead of downloading the file, you can use the CDN.

">
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/sbuttons/dist/sbuttons.min.css"
/>

In case of using buttons that have icons in them, make sure to include font awesome's CDN in the tag.

">
<link
  rel="stylesheet"
  href="https://use.fontawesome.com/releases/v5.14.0/css/all.css"
  integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc"
  crossorigin="anonymous"
/>

NPM

You can install sButtons using NPM:

npm i sbuttons

Using in CSS

You can import the CSS file found in dist/sbuttons.css or dist/sbuttons.min.css:

@import url("~sbuttons/dist/sbuttons.min.css");

Using in LESS

You can also import the less file found in src/sbuttons.less:

@import "~sbuttons/src/sbuttons.less";

Modify Colors

To modify button colors, import src/_variables.less in your less file, then make changes to the variables after the import. For example, to change the blue color to a different shade:

@import "/path/to/_variables.less";
@blue: #54a2bd; /* Make it darker */

Check out _variables.less for the full list of variables.

Usage

Basic Button

To use sButtons in your project, just add the classes of sButton you want to either ">

<button class="sbtn basic-btn blue-btn">Buttonbutton>

You can find all classes mentioned in our Examples page.

Block Buttons

To use sButtons with block display, add the class to either ">

<button class="sbtn basic-btn blue-btn block-btn">Buttonbutton>

Disabled Buttons

To make a ">

<button class="sbtn basic-btn blue-btn disabled-btn">Buttonbutton>

Icon Buttons

The base-icon-btn class enables you to have a normal, customizable icon button. Using it, you decide to add any fontawesome icon in it. You can choose to either place it on the left or right side of the button with the available classes.

Only Icon

The icon-btn class alone gives you a default button with no background color and border.

">
<button class="sbtn icon-btn"><i class="fas fa-book">i>button>

Icon Positioned to The Left

Adding the icon-left class to a button makes the icon positioned to the left.

Read ">
<button class="sbtn base-icon-btn icon-left orange-btn">
  <i class="fas fa-book">i>Read
button>

Icon Positioned to The Right

Adding the icon-right class to a button makes the icon positioned to the right.

Read ">
<button class="sbtn base-icon-btn icon-right orange-btn">
  Read<i class="fas fa-book">i>
button>

Toggle Button

The toggle-btn class, along with the toggle-off-btn / toggle-on-btn state class enables you to have a toggle button. Apart from the basic use, it can also be used for checkboxes and radio buttons. While not necessary, you can use the available state classes to choose whether your checkboxes and radio buttons are checked or not.

Toggle Button as Checkboxes

Adding the toggle-btn class to your checkbox inputs converts them to toggle buttons. For example:

">
<input type="checkbox" class="sbtn toggle-btn" />

Toggle Button as Radio Buttons

Adding the toggle-btn class to your radio inputs converts them to toggle buttons.

">
<input type="radio" class="sbtn toggle-btn" />

Rounded buttons

To add the rounded buttons with a particular radius, you can use various classes like rounded-x-btn where x is the radius in pixels which you want. Here x ranges from 5(border-radius = 5px) to fully rounded(border-radius = 50%).

Rounded button ">
<button class="rounded-5-btn sbtn blue-btn">Rounded button button>

Animated Buttons

To use Animated sButtons in your project, add the classes of the animated sButton you want to either ">

<button class="animated sbtn atom-btn blue-btn">Animated Buttonbutton>

Note: Depending on your button, the animation should either run infinitely or just once.

Dark Mode

sButtons is compatible with dark mode. It either works by adding dark-mode class to buttons, or by adding data-theme="dark" to a container element.

Using dark-mode Class

Dark-Mode">
<button class="sbtn dashed-btn black-btn dark-mode">Dark-Modebutton>

Using data-theme attribute

By adding data-theme="dark" to a parent element like the body or a div element, the button will automatically be in dark mode.

">
<div data-theme="dark">
  <button class="sbtn dashed-btn black-btn">Dark-Modebutton>
div>

Note: data-theme="dark" attribute does not give dark mode styling to the container element, you have to do that yourself. It only toggles sButtons to be in dark mode.

Contribution

Please see the contributing guidelines for details.

You can also join or start discussions with the community members if you have any ideas or questions!

Button ideas

If you would like to suggest a new button idea, please create a new discussion with the category "idea".

Projects Using sButtons

If your project uses sButtons, please submit it here to be added to the list of the websites using it!

Contributors

Check out our awesome contributors here!

LICENSE

MIT

Comments
  • Add New Buttons

    Add New Buttons

    First-time contributors are welcome! Add new button styles that you find helpful.

    Currently, there are the following button style types:

    1. Basic: Normal looking buttons
    2. Button Styles: styles for the buttons
    3. Animated: Different animations for buttons.
    4. Hover: Buttons that have a hover effect
    5. Icons: Buttons that have icons in them.
    6. Social Buttons: Login buttons for different social media platforms
    7. Special Buttons: buttons that have a special twist to them.

    Either add something under those types or create new ones. You can check the current ones on the website. For some help on how to add or change button styles, you can learn more on the contributing guide

    To check for new ideas added by contributors to implement, check the button-idea label and the ideas in discussions.

    To submit a new button idea, please create a new discussion under the ideas category.

    help wanted good first issue Always Open up-for-grabs buttons stale-issue 
    opened by shahednasser 123
  • Add animated class to animated buttons

    Add animated class to animated buttons

    Most animated button's animation only happens on hover, we need to add an animated class that triggers the animation without hovering over the button. And when the animation class is added make sure that the animation is not also triggered on hover. In order to avoid repeated code in the buttons, please move the animation or transition to a mixin and call it where it is needed.

    Also, some button's animation needs to be continuous, others don't. I have indicated below which is continuous and which isn't

    This issue is going to be split between contributors. Each contributor can take up a button from the list below. Please comment before taking up a button, choosing which between you will be working on.

    The following buttons need the animated class:

    • [x] Atom (continuous) Taken by @karleypetracca
    • [x] Aura (continuous) Taken by @TomWBush
    • [x] Bounce (continuous) Taken by @TomWBush
    • [x] Diagonal Background on Hover (not continuous) Taken by @TomWBush
    • [x] Expanding Border (not continuous) Taken by @TomWBush
    • [x] Fill Buttons All Types (not continuous) Taken by @TomWBush
    • [x] Flash (continuous) Taken by @TanmayJain17
    • [x] Hinge (not continuous) Taken by @kalimah-apps
    • [x] Invert (not continuous) Taken by @karishmapatel27
    • [x] Liquid (not continuous) Taken by @A3vk
    • [x] Neon (not continuous) Taken by @kyawkyawsoezhu
    • [x] Next (not continuous) Taken by @kyawkyawsoezhu
    • [x] Nudge (continuous) Taken by @modaserMoj
    • [x] Paper Curl (not continuous) taken by @TomWBush
    • [x] Previous (not continuous) taken by @TomWBush
    • [x] Pudding (not continuous) Taken by @AbdulMAbdi
    • [x] Pulse (not continuous) Taken by @AbdulMAbdi
    • [x] Rainbow (continuous) Taken by @A3vk
    • [x] Ripple (not continuous) Taken by @abid1998
    • [x] Scale (not continuous) Taken by @abid1998
    • [x] Shake (continuous) Taken By @kyawkyawsoezhu
    • [x] Shine (continuous) Taken by @kyawkyawsoezhu
    • [x] Skew (not continuous) Taken by @Hassan-Ib
    • [x] Snake Border (not continuous) Taken by @rad10wave
    • [x] Splash (continuous) Taken by @modaserMoj
    • [x] Spring (continuous) Taken by @modaserMoj
    • [x] Transparent on Hover (not continuous) taken by @ChristopherMarques
    • [x] Vibrate (continuous) Taken by @modaserMoj
    enhancement help wanted good first issue Always Open up-for-grabs Priority: High buttons 
    opened by shahednasser 74
  • Hacktoberfest Ideas

    Hacktoberfest Ideas

    As everyone knows, Hacktoberfest will start soon. This issue will be open to discussing any ideas to help contributors contribute and participate in Hacktoberfest!

    Always Open Priority: Low Discussion stale-issue 
    opened by shahednasser 41
  • Add support for Dark Mode for buttons

    Add support for Dark Mode for buttons

    We need to add support for dark mode, as a lot of the buttons need better support for dark mode, not just for our website, but for the users as well.

    This issue will be divided between contributors where each contributor can take up a button to add dark mode support to it.

    Adding the dark mode support need to be done in the following way:

    1. Adding support when the parent is [data-theme="dark"]
    2. Adding support when the button has the class dark-mode

    So, for each button when adding the support for dark mode, you need to apply it to the above 2. For help on it you can refer to hatch button's code as it adds support for them (except adding the dark-mode class)

    The following buttons need support. Please comment below to take up a button:

    • [x] Dashed Button (White and Black Colors) Taken by @singhtalwinder
    • [x] Glow Button Taken by @singhtalwinder
    • [x] Neon Border Taken by @chiragkava
    • [x] Outline (Black and White Colors) Taken by @shahednasser
    • [x] Stack (Remove white color's border) Taken by @shahednasser
    • [x] Atom (Yellow, Black and White Colors) Taken by @shahednasser
    • [x] Diagonal Background (Black and White Colors) Taken by @TomWBush
    • [x] Expanding Border Taken by @TomWBush
    • [x] Fill (All types) (Black and White Colors) Taken by @TomWBush
    • [x] Ripple (Black and White Colors) Taken by @TomWBush
    • [x] Snake Border Taken by @TomWBush
    • [x] Transparent on Hover (Black Color) Taken by @modaserMoj
    • [x] Base Icon (When the icon is with a transparent background, make it white) Taken By @katyabakun
    • [x] Star Icon (similar to above) Taken by @TomWBush
    • [x] Hatch (It support the media query and data-theme but doesn't have a dark-mode class so that needs to be added). Taken by @farhanfajarr
    • [x] Colored On Hover Taken by @farhanfajarr
    enhancement help wanted good first issue Always Open up-for-grabs Priority: High buttons 
    opened by shahednasser 36
  • Add search bar in the examples and documentation pages

    Add search bar in the examples and documentation pages

    In the Examples and documentation pages, we should add a search bar that allows us to search through the sidebar items. The search bar should be a reusable component that would allow us to use it in any sidebar.

    The search bar doesn't need to do anything fancy. Just search through the sidebar items and hide/show the items based on the search term.

    enhancement help wanted good first issue up-for-grabs website Priority: Medium 
    opened by shahednasser 32
  • Sidebar overlays footer

    Sidebar overlays footer

    1 - Describe the bug The sidebar list overlays footer when scrolling to the bottom of the page. 2 - Expected behavior of what should have happened (if applicable)

    3 - Screenshots (if applicable) image

    4 - Additional notes

    bug Priority: High website 
    opened by lovepreet021 30
  • Fix

    Fix "Fill" rounded buttons on mobile

    On mobile devices (specifically iPhone), when clicking on buttons of type "Fill" the overlayed color doesn't fully fill the container button.

    bug help wanted good first issue buttons Priority: Medium Discussion Hacktoberfest Cannot Reproduce 
    opened by shahednasser 27
  • Base icon btn

    Base icon btn

    Issue: #549

    • [x] Create Base Icon Button with the formatting needed to make it look good, without adding any icon to it.
    • [x] Add an additional class for positioning of the icon (left or right of the text).
    • [x] Test that it would work fine with and without text.
    • [x] Add to the documentation (Readme and Get Started page) a note about using any icon with the base icon button.

    I've added the base-icon-btn class and how to use-it guide in the README file and on the website. Kindly review it.

    Below are some of the screenshots I took while testing the button.

    With text Screenshot from 2020-10-04 18-49-25

    without text Screenshot from 2020-10-04 19-09-10

    Kindly review it, thanks

    opened by kaf-lamed-beyt 26
  • Add Social Login buttons under

    Add Social Login buttons under "Social Buttons" type

    Add login buttons for different social platforms. It can be for instagram, github, linkedin, or any other social media platform. You don't have to add all types you can add as many as you want. Please make sure to utilize the social platform's main color when making the button. You can see current buttons on the website for examples. As for the icons in the button, you can find them on font awesome. Add new buttons under src/components/social/ and name it _<social_platform_name>.less and import it in src/components/_social.less

    help wanted good first issue Always Open up-for-grabs buttons Hacktoberfest 
    opened by shahednasser 26
  • Website Description in Google Search

    Website Description in Google Search

    If you search "sButtons" now, you'll see that the website has the description "You need to enable JavaScript to run this app." We need to replace this with good description.

    You'll probably need to use something like react-snap

    enhancement help wanted good first issue up-for-grabs website Priority: Medium 
    opened by shahednasser 25
  • Submissions for projects that use sButtons

    Submissions for projects that use sButtons

    We need to add a page for projects that use sButtons and link to them. So, if anyone is using this project or is considering using it, please link it below this issue to be added on the list of projects that are using sButtons. This would be great to provide others an example of what using sButtons will look like in their projects.

    enhancement help wanted good first issue Always Open up-for-grabs Priority: Medium 
    opened by shahednasser 25
  • Add graphics/screenshots of the buttons in Readme

    Add graphics/screenshots of the buttons in Readme

    Add 2 or 3 GIFs to README showcasing the buttons.

    Discussed in https://github.com/sButtons/sbuttons/discussions/1631

    Originally posted by reev-create June 27, 2022 It would be great and attractive to see some screenshots or previews of the buttons designs in the Readme file

    help wanted good first issue documentation Priority: Medium stale-issue 
    opened by shahednasser 18
Owner
sButtons
Simple buttons you can use easily for your next project.
sButtons
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
This is a project that is used to execute python codes in the web page. You can install and use it in django projects, You can do any operations that can be performed in python shell with this package.

Django execute code This is a project that is used to execute python codes in the web page. You can install and use it in django projects, You can do

Shinu 5 Nov 12, 2022
JOSE ZEPEDA 10 Nov 18, 2022
Seamlessly connect your web server to Rebrandly so that you can re-use your domain name for both your app and your short links

rebrandly-express Seamlessly connect your web server to Rebrandly so that you can re-use your domain name for both your app and your short links Rebra

null 3 Dec 13, 2022
The website which can help you to organize your daily or weekly activities and review them when you need them. you can add, remove and delete an activity

To Do list To do project is webpack project that list activities someone can do at a specific time In this TO-DO list, you can add or remove you activ

Joffrey NKESHIMANA 5 Jul 21, 2022
A simple editor allows you to easily add and customize all the sections you need for your profile's readme.

Create your Profile README using the best Templates tomper-readmify.herokuapp.com This is the frontend + backend of TomperReadmify build with MERN sta

Varun Tiwari 15 Jan 2, 2023
This is a simple web application of a To-do List in which you can add, remove and edit all your tasks and also you can mark each task as completed and delete all completed ones.

To-Do List A simple web application of a to do list Built With HTML, CSS, JS, ES6 & Webpack Getting Started In this repository I created To-Do List SP

Juan Sebastian Sotomayor 12 Apr 11, 2022
This package creates embeds and buttons in a very simple way using the whatsapp-web.js module for whatsapp

This package creates embeds and buttons in a very simple way using the whatsapp-web.js module for whatsapp

DeathAbyss 17 Jan 3, 2023
A simple site to generate useful resources for Gitpodification, including "open in gitpod" buttons and sample configuration scripts

Gitpodify A simple portal to generate "open in Gitpod" links Contributing There is a list of suggested repositories in app/routes/index.tsx. Feel free

Jacob Paris 4 Nov 7, 2022
A simple lightweight file dropzone component based on jQuery. You can easily make any existing element become a dropzone that holds files.

file-dropzone A simple lightweight file dropzone component based on jQuery. You can easily make any existing element become a dropzone that holds file

Anton Bardov 1 May 31, 2021
This is a full-stack exercise tracker web application built using the MERN (MongoDB, ExpressJS, ReactJS, NodeJS) stack. You can easily track your exercises with this Full-Stack Web Application.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

WMouton 2 Dec 25, 2021
A to-do list website task by (@microverseinc), you can easily manage your daily tasks

To DO list Is a website to manage daily tasks Built With HTML,CSS,JS webpack Live Demo (if available) Live Demo Link Getting Started This is an exampl

Yousef Hesham 6 Oct 22, 2022
Running webdriverio in docker containers so you can easily add tests to your CI.

WebDriverIO tests in Docker Running WebdriverIO tests in a docker container allows you to easily add tests to your CI. About This project uses the aut

Promenade 6 Dec 3, 2022
With this plugin, you can easily make a stopwatch or timer on your site. Just init, style and enjoy.

TimezZ With this plugin, you can easily make a stopwatch or timer on your site. Just init, style and enjoy. Features Typescript support Support all en

Valery Strelets 37 Dec 5, 2022
A high-resolution local database that uses precise algorithms to easily record data in local files within a project with persistent JSON and YAML support designed to be easy to set up and use

About A high-resolution local database that uses precise algorithms to easily record data in local files within a project with persistent JSON and YML

Shuruhatik 5 Dec 28, 2022