An extension of Spec 2 in Pharo that provides additional UI components and styling tools.
# Spec Components Library for Pharo [](https://github.com/pharo-project/pharo) [](./LICENSE) [](https://pharo.org/) [](https://github.com/pharo-spec/Spec) > A modern UI component library for building reusable, styled, and interactive components in [Pharo](https://pharo.org/) using [Spec 2](https://github.com/pharo-spec/Spec). --- ## About the Library The **Spec Components Library** is an extension to the Spec 2 framework in Pharo, providing a comprehensive set of reusable and stylable user interface components. It addresses several common limitations of the standard Spec 2 toolkit, such as the lack of multi-select dropdowns, inline validation, or paginated tables, and introduces higher-level abstractions that simplify UI construction. This library was designed with the following objectives: - Provide a **broader range of UI components** that are frequently needed in real-world desktop applications, such as enhanced dropdowns, form builders, notification overlays, and time pickers. - Enable **component-level visual styling** via a Smalltalk API, eliminating the need for manual STON-based style configuration. - Maintain **full compatibility with Spec 2**, conforming to its architecture and lifecycle model. - Support **declarative and flexible form composition**, allowing developers to define layouts and behavior with minimal boilerplate code. - Ensure that all components are **modular, composable, and testable**, making them suitable for both prototyping and production environments. The library integrates seamlessly into the Pharo environment. It can be used alongside standard Spec 2 components or as a foundation for more advanced UI development. Its unified approach to layout, interaction, and styling helps streamline interface creation while promoting code reuse and consistency. The components are particularly well-suited for building: - configuration dialogs and wizards, - multi-step user workflows, - search and filter panels with pagination, - stylized input forms with validation and feedback, - administrative interfaces and internal tools. --- ## 🧩 Component Overview | Component | Type | Description | |-------------------------------|------------------|-------------------------------------------------------------------| | `TextInputPresenter` | Input | Text field with validation and error display | | `ComboBoxPresenter` | Input | Single-select dropdown with real-time filtering | | `MultiSelectComboBoxPresenter`| Input | Dropdown with checkbox selection for multiple values | | `TimePickerPresenter` | Input | Clock-style time selection with hours and minutes | | `CheckboxGroupPresenter` | Selection Group | Vertical or grid layout for checkbox groups | | `RadioGroupPresenter` | Selection Group | Radio button group with single choice | | `DynamicFormBuilder` | Form Builder | Declarative form composition with key-value mapping | | `WizardPresenter` | Process/Workflow | Multi-step presenter for collecting data in stages | | `SearchableTablePresenter` | Data Display | Table with a search field and optional column filtering | | `PaginatedTablePresenter` | Data Display | Table view with pagination controls | | `NotificationPresenter` | Feedback | Overlay-style notifications with styling and timeout | | `PresenterDecorator` | Utility | Wrapper that adds styling support to standard Spec presenters (e.g., buttons, labels, lists). | | `FormStyle` | Utility | Declarative configuration object for form layout and appearance | | `StyleManager` | Utility | Generates and installs STON-based styles from dictionaries | --- ## 📖 Documentation Documentation of all components, their public API and usage examples is available in a separate file: - 📘 [**Documentation.md**](./Documentation.md) --- ## 📦 Installation > Requires: **Pharo 13** To load the latest version of the library into your image: ```smalltalk Metacello new baseline: 'SpecComponentsLibrary'; repository: 'github://Olesia32/pharo-spec-components/src'; load.