NKButton alternatives and similar libraries
Based on the "Button" category.
Alternatively, view NKButton alternatives based on common mentions on social networks and blogs.
-
LiquidFloatingActionButton
Material Design Floating Action Button in liquid state -
VBFPopFlatButton
Flat button with 9 different states using POP -
LGButton
A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code. -
KCFloatingActionButton
:heart: Floating Action Button for iOS -
ZFRippleButton
Custom UIButton effect inspired by Google Material Design -
TransitionButton
UIButton sublass for loading and transition animation. -
WCLShineButton
This is a UI lib for iOS. Effects like shining. -
TVButton
Recreating the cool parallax icons from Apple TV as iOS UIButtons (in Swift). -
HTPressableButton
Flat design pressable button for iOS developers. -
FloatingButton
Easily customizable floating button menu created with SwiftUI -
PMSuperButton
🔥 PMSuperButton is a powerful UIButton coming from the countryside, but with super powers! 😎 -
gbkui-button-progress-view
Inspired by Apple’s download progress buttons in the app store -
ButtonProgressBar-iOS
A small and flexible (well documented) UIButton subclass with animated loading progress, and completion animation. -
TORoundedButton
A high-performance button control with rounded corners for iOS. -
NFDownloadButton
Revamped Download Button. It's kinda a reverse engineering of Netflix's app download button. -
VCFloatingActionButton
A Floating Action Button just like Google inbox for iOS -
JOEmojiableBtn
Since Facebook introduced reactions in 2016, it became a standard in several applications as a way for users to interact with content. ReactionButton is a control that allows developers to add this functionality to their apps in an easy way. -
EasySocialButton
An easy way to create beautiful social authentication buttons -
FlowBarButtonItem
Bar Button Item that can be moved anywhere in the screen, like Android's stickers button. -
JTFadingInfoView
UIButton-based view with fade in/out animation features -
ProgressButton
Custom button class that displays a progress bar around it to gauge -
ExpandableButton
Customizable and easy to use expandable button in Swift. -
DesignableButton
A Custom UIButton with Centralised Styling and common styles available in Interface Builder -
EMEmojiableBtn
Option selector that works similar to Reactions by fb. Objective-c version -
MultiToggleButton
Multiple state tap-to-toggle UIButton (like old camera flash button) -
AnimatablePlayButton
Animated Play and Pause Button written in Swift, using CALayer, CAKeyframeAnimation. -
WYMaterialButton
Interactive and fully animated Material Design button for iOS developers. -
JSButton
A fully customisable swift subclass on UIButton which allows you to create beautiful buttons without writing any line of code.
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of NKButton or a related project?
README
NKButton
A fully customizable UIButton
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Installation
NKButton is available through Swift Package Manager
(Recommended) and CocoaPods:
pod 'NKButton'
Usage
Creation and basic customization:
let button = NKButton()
button.title = "Button"
button.setTitleColor(.black, for: .normal) // set title color for normal state
button.setTitleColor(.white, for: .highlighted) // set title color for highlight state
button.setTitleFont(normalFont, for: .normal)
button.setTitleFont(boldFont, for: .highlight)
button.setBackgroundColor(.blue, for: .normal) // set background color for normal state
button.setBackgroundColor(.green, for: .highlighted) // set background color for highlight state
button.spacing = 10.0 // space between icon and title
button.imageAlignment = .top // icon alignment
button.underlineTitleDisabled = true // no underline text when `Settings > Accessibility > Button Shapes` is ON
button.isRoundedButton = true
button.cornerRadius = 10.0
button.extendSize = CGSize(width: 50, height: 20) // size that will be included in sizeThatFits
Add border:
button.setBorderColor(.black, for: .normal) // set border color for normal state
button.setBorderColor(.white, for: .highlighted) // set border color for highlight state
button.setBorderSize(1.0, for: .normal) // border stroke size
button.setBorderSize(2.0, for: .highlighted)
Add shadow:
button.setShadowColor(.blue, for: .normal) // set shadow color for normal state
button.setShadowColor(.green, for: .highlighted) // set shadow color for highlight state
button.shadowOffset = CGSize(width: 0, height: 5)
button.shadowOpacity = 0.6
button.shadowRadius = 10
Add gradient color:
button.setGradientColor([UIColor(white: 1.0, alpha: 0.5), UIColor(white: 1.0, alpha: 0.0)], for: .normal) // set gradient color for normal state
button.setGradientColor([UIColor(white: 1.0, alpha: 0.0), UIColor(white: 1.0, alpha: 0.5)], for: .highlighted) // set gradient color for highlight state
Set loading state:
button.loadingIndicatorStyle = .ballBeat // loading indicator style
button.loadingIndicatorAlignment = .atImage // loading indicator alignment
button.hideImageWhileLoading = true
button.hideTitleWhileLoading = false
button.isLoading = true // show loading indicator in the button, and button will be disabled automatically until setting isLoading = false
Flashing:
button.startFlashing()
button.startFlashing(flashDuration: 0.25, intensity: 0.9, repeatCount: 10)
Subscript syntax:
button.titleColors[.normal] = .black
button.titleFonts[.normal] = normalFont
button.titleFonts[.highlight] = boldFont
button.backgroundColors[.normal] = .white
button.backgroundColors[.highlight] = .yellow
button.borderColors[.normal] = .gray
button.borderColors[[.highlight, .selected]] = .black
button.shadowColors[.normal] = .black
Dependency
NKButton uses NVActivityIndicatorView for loading indicator, so it currently has 32 animation types.
NKButton uses FrameLayoutKit for content layout so you can customize the layout easily
Author
Nam Kennic, [email protected]
License
NKButton is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the NKButton README section above
are relevant to that project's source code only.