CompactSlider

screenshot of CompactSlider

CompactSlider is a SwiftUI control for macOS, iOS, watchOS and visionOS.

Overview:

CompactSlider is a custom control designed for SwiftUI that allows users to select a value from a linear range of values. It aims to replace the built-in slider in SwiftUI, offering better performance and a more modern design. The inspiration for this component came from Apple's Photos app, which features a slider extensively. CompactSlider requires Swift 5.5+, Xcode 13+, SwiftUI 2+, and is compatible with macOS 11+, iOS 14+, and watchOS 7+.

Features:

  • Single Value: Select a single value from a linear range of values.
  • Range Values: Choose a range of values within a linear range.
  • Styling: Customize the appearance of the slider.
  • Configuration: Fine-tune the behavior and appearance of the slider.
  • Secondary Appearance: Add a secondary appearance to the slider for enhanced visual feedback.
  • Prominent Style: Apply a unique style to the slider to make it stand out.
  • Advanced Layout: Create complex layouts using CompactSlider.
  • CompactSliderState: Access and modify the state of the slider programmatically.

Summary:

CompactSlider is a custom control designed for SwiftUI, offering an improved performance compared to the built-in slider. It is inspired by Apple's Photos app and allows users to select a value or a range of values from a linear range. The slider offers various customization options for styling and configuration, including secondary appearances and a prominent style. It also supports advanced layout options and can be accessed programmatically using CompactSliderState. CompactSlider is available under the MIT license.

ui-kit
UI Kits & Components

A UI kit provides developers with a set of reusable components that can be easily integrated into a website or application. These components are pre-designed with consistent styling and functionality, allowing developers to save time and effort in the design and development process. UI kits can be either custom-built or third-party, and often include components for buttons, forms, typography, icons, and more.