You can import the CSS file found in dist/sbuttons.css or dist/sbuttons.min.css:
@importurl("~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 */
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.
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:
">
<inputtype="checkbox" class="sbtn toggle-btn" />
Toggle Button as Radio Buttons
Adding the toggle-btn class to your radio inputs converts them to toggle buttons.
">
<inputtype="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%).
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.
First-time contributors are welcome!
Add new button styles that you find helpful.
Currently, there are the following button style types:
Basic: Normal looking buttons
Button Styles: styles for the buttons
Animated: Different animations for buttons.
Hover: Buttons that have a hover effect
Icons: Buttons that have icons in them.
Social Buttons: Login buttons for different social media platforms
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 wantedgood first issueAlways Openup-for-grabsbuttonsstale-issue
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
enhancementhelp wantedgood first issueAlways Openup-for-grabsPriority: Highbuttons
As everyone knows, Hacktoberfest will start soon. This issue will be open to discussing any ideas to help contributors contribute and participate in Hacktoberfest!
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:
Adding support when the parent is [data-theme="dark"]
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
enhancementhelp wantedgood first issueAlways Openup-for-grabsPriority: Highbuttons
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.
enhancementhelp wantedgood first issueup-for-grabswebsitePriority: Medium
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)
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 wantedgood first issueAlways Openup-for-grabsbuttonsHacktoberfest
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
enhancementhelp wantedgood first issueup-for-grabswebsitePriority: Medium
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.
enhancementhelp wantedgood first issueAlways Openup-for-grabsPriority: Medium
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 wantedgood first issuedocumentationPriority: Mediumstale-issue
opened by shahednasser 18
Owner
sButtons
Simple buttons you can use easily for your next project.
BestBuy Bot — Open Source GPU/PS5/Xbox Bot I took bits from best open and closed sourced bots and made this simple bot.
Please star my repo if this co