ui-awesome/html-core-component

UI Awesome HTML Core Component for PHP.

0.1.0 2024-03-31 13:16 UTC

This package is auto-updated.

Last update: 2024-05-01 00:13:26 UTC


README

121752654?s=200&v=4

UI Awesome HTML Core Component for PHP.


PHPUnit Codecov Infection Psalm Psalm Coverage Style ci

These abstract classes serve as foundational building blocks for creating diverse UI components in HTML applications.

They provide a structured approach to developing reusable components with customizable configurations and default settings.

By extending these classes, you can quickly implement and customize various UI elements, such as breadcrumbs, dropdowns, navigation bars, and toggles, to enhance your application's user interface.

  • AbstractBreadcrumb: Extend this class to implement breadcrumb navigation components. It simplifies the management of breadcrumb items and offers customizable configurations for rendering breadcrumb elements.

  • AbstractDropdown: Extend this class to effortlessly implement dropdown components. It simplifies the management of menu items and offers customizable configurations for rendering dropdown elements.

  • AbstractNavBar: Use this class as a basis for crafting navigation bar components. It provides flexibility in rendering brand elements, menus, and additional content, with customizable attributes and default configurations.

  • AbstractToggle: Extend this class to create toggle components with ease. It supports various types (e.g., button, link) and offers functionality for rendering toggle elements using customizable templates, attributes, and content.

  • Item: This class represents individual items within a menu or breadcrumb. It allows for easy management of item attributes and content.

  • Menu: This class represents a collection of menu items. It facilitates the organization and rendering of menu items within dropdowns, navigation bars, or other menu-based components.

Simply extend these abstract classes and apply their default configurations to swiftly integrate and customize UI components tailored to your application's requirements.

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist ui-awesome/html-core-component:^0.1

or add

"ui-awesome/html-core-component": "^0.1"

to the require-dev section of your composer.json file.

Usage

To use the classes in your project, you need to extend them in your custom components.

For example, to create a custom breadcrumb component, you can extend the AbstractBreadcrumb class:

use UIAwesome\Html\Core\Component\AbstractBreadcrumb;

class CustomBreadcrumb extends AbstractBreadcrumb
{
    // Custom implementation
}

Testing

Check the documentation testing to learn about testing.

Support versions

PHP81

License

The MIT License (MIT). Please see License File for more information.

Our social networks

Twitter