AxisRatingBar for SwiftUI

Overview

AxisRatingBar for SwiftUI

This library is a UI control for iOS and macOS developed with SwiftUI. You can display ratings along the horizontal/vertical axis and receive ratings from users. You can use any view that conforms to the View protocol, not just the star shape.

Platforms iOS macOS instagram SPM MIT

Screenshot

Horizontal Vertical
2022-02-20.9.45.00.mov

Example

https://fabulaapp.page.link/230

Usages

/// Initializes `ARConstant`
/// - Parameters:
///   - rating: The number of views filled is typically between 1 and 5. The view is displayed according to the fill mode setting. The default value is `5`.
///   - size: The size of the individual view. The default value is `CGSize(width: 44, height: 44)`.
///   - spacing: The spacing between the view and the view. The default value is `0`
///   - fillMode: Defines how the view is filled when the rating is not an integer number. The default value is `.half`.
///   - axisMode: Defines the horizontal/vertical orientation of the rating bar. The default value is `.horizontal`.
///   - valueMode: The mode of the filled value. The default value is `.ratio`
///   - disabled: A condition that controls whether users can interact with rating bar. The default value is 'false'
///   - animation: The animation effect of the view being filled. The default value is `.easeOut(duration: 0.16)`
///

AxisRatingBar(value: $value, constant: constant) {
    /// A view builder for background views.
    ARStar(count: 5), innerRatio: 1)
        .fill(Color.gray.opacity(0.2))
} foreground: {
    /// A view builder for foreground views.
    ARStar(count: 5, innerRatio: 1)
        .fill(Color.accentColor)
}

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding AxisRatingBar as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/jasudev/AxisRatingBar.git", .branch("main"))
]

Contact

instagram : @dev.fabula
email : [email protected]

License

AxisRatingBar is available under the MIT license. See the LICENSE file for more info.

You might also like...
Create SwiftUI Views with any data

Create SwiftUI Views with any data

Advanced List View for SwiftUI with pagination & different states

AdvancedList This package provides a wrapper view around the SwiftUI List view which adds pagination (through my ListPagination package) and an empty,

Swipe Left2Right & Right2Left, pure SwiftUI implementation
Swipe Left2Right & Right2Left, pure SwiftUI implementation

SwipeCell Preview Features Swipe cell from Left2Right & Right2Left. Destructive swipe Usage Simply add onSwipe(leading, trailing) method to your list

Native Pager in SwiftUI
Native Pager in SwiftUI

SwiftUIPager SwiftUIPager provides a Pager component built with SwiftUI native components. Pager is a view that renders a scrollable container to disp

SwiftUI library for a walkthrough or onboarding flow with tap actions
SwiftUI library for a walkthrough or onboarding flow with tap actions

Concentric Onboarding iOS library for a walkthrough or onboarding flow with tap actions written with SwiftUI We are a development agency building phen

📖   A lightweight, paging view solution for SwiftUI
📖 A lightweight, paging view solution for SwiftUI

Getting Started | Customization | Installation Getting Started Basic usage Using Pages is as easy as: import Pages struct WelcomeView: View { @S

SwiftUI view enabling navigation between pages of content, imitating the behaviour of UIPageViewController for iOS and watchOS
SwiftUI view enabling navigation between pages of content, imitating the behaviour of UIPageViewController for iOS and watchOS

PageView SwiftUI view enabling page-based navigation, imitating the behaviour of UIPageViewController in iOS. Why SwiftUI doesn't have any kind of pag

🚀  Elegant Pager View fully written in pure SwiftUI.
🚀 Elegant Pager View fully written in pure SwiftUI.

PagerTabStripView Made with ❤️ by Xmartlabs team. XLPagerTabStrip for SwiftUI! Introduction PagerTabStripView is the first pager view built in pure Sw

 💻This is an open source project of the Windows 11 desktop client implemented using SwiftUI.
💻This is an open source project of the Windows 11 desktop client implemented using SwiftUI.

💻 💻This is an open source project of the Windows 11 desktop client implemented using SwiftUI.

Releases(0.5.0)
Owner
jasu
jasu
SwiftUI-Drawer - A bottom-up drawer in swiftUI

SwiftUI-Drawer A bottom-up drawer view. Contents Installation Examples Installat

Bruno Wide 9 Dec 29, 2022
SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view.

SwiftUI-Margin adds a margin() viewModifier to a SwiftUI view. You will be able to layout the margins in a CSS/Flutter-like.

Masaaki Kakimoto(柿本匡章) 2 Jul 14, 2022
A number of preset loading indicators created with SwiftUI

ActivityIndicatorView A number of preset loading indicators created with SwiftUI We are a development agency building phenomenal apps. Usage Create an

Exyte 956 Dec 26, 2022
A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI.

BetterSafariView A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI. Contents Motivation Requirements U

Dongkyu Kim 392 Dec 31, 2022
A SwiftUI Library for creating resizable partitions for View Content.

Partition Kit Recently Featured In Top 10 Trending Android and iOS Libraries in October and in 5 iOS libraries to enhance your app! What is PartitionK

Kieran Brown 230 Oct 27, 2022
A micro UIStackView convenience API inspired by SwiftUI

Stacks A micro UIStackView convenience API inspired by SwiftUI. let stack: UIView = .hStack(alignment: .center, margins: .all(16), [ .vStack(spaci

Alexander Grebenyuk 74 Jul 27, 2022
SwiftUI: Components Library Inspired by Twitter's Bootstrap

bootswiftui SwiftUI: Components Library Inspired by Twitter's Bootstrap Warning This is just SwiftUI exercise. Please do not consider using this repo

Robert Sandru 1 Oct 27, 2022
Zeplin component preview for your SwiftUI views

A Zeplin component preview for your SwiftUI views. You can use Zeplin components instead of real views within your app until you implement them.

Danis Tazetdinov 4 Sep 1, 2022
A SwiftUI Views for wrapping HStack elements into multiple lines

SwiftUI WrappingStack A SwiftUI Views for wrapping HStack elements into multiple lines. List of supported views WrappingHStack - provides HStack that

Denis 50 Jan 6, 2023
Blobmorphism is a brand new design language I've created to break free of the material overload in iOS, built in SwiftUI. Everything feels smooth and fluid.

Blobmorphism is a brand new design language I've created to break free of the material overload in iOS, built in SwiftUI. Everything feels smooth and fluid.

Ethan Lipnik 89 Nov 29, 2022