Download the PHP package muradcade/php-ui without Composer
On this page you can find all versions of the php package muradcade/php-ui. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download muradcade/php-ui
More information about muradcade/php-ui
Files in muradcade/php-ui
Package php-ui
Short Description A clean, HTML-first UI library for PHP applications
License MIT
Informations about the package php-ui
PHP UI
A clean, lightweight, HTML-first UI library for PHP applications.
PHP UI provides reusable UI components using standard HTML, CSS, and vanilla JavaScript.
Features
- HTML-first
- Framework independent
- Accessible
- Responsive
- Lightweight
- Vanilla JavaScript
- Reusable components
- CSS design tokens
- No JavaScript framework required
- Laravel support planned
Installation
Install PHP UI using Composer:
Include the main stylesheet:
Include the main JavaScript file:
The ui.css file loads all PHP UI component styles.
The ui.js file loads all PHP UI JavaScript components.
You only need to include these two files.
Usage
PHP UI uses simple HTML classes, so you can use it with vanilla PHP or any PHP framework.
Example:
The library does not require a PHP rendering API.
You write normal HTML and apply PHP UI classes.
Components
Click a component below to jump directly to its usage example.
Quick Navigation
| Category | Components |
|---|---|
| Actions | Button |
| Forms | Form |
| Feedback | Empty State |
| Navigation | Pagination |
| Layout & Content | Modal |
Actions
Button
Block Button
Disabled Button
Forms
Input
Error State
Help Text
Textarea
Error State
Select
Checkbox
Selected
Disabled
Radio
Switch
Checked
Form
Feedback
Alert
Badge
Toast
The JavaScript is already loaded through ui.js.
Available types:
Spinner
Sizes
Skeleton
Skeleton components are designed to be composed from reusable primitives.
Progress
Success
Danger
Empty State
Navigation
Navbar
The JavaScript is already loaded through ui.js.
Sidebar
The sidebar is intended as a layout component.
The JavaScript is already loaded through ui.js.
The sidebar automatically switches to a mobile layout at smaller screen sizes.
Breadcrumb
Tabs
The JavaScript is already loaded through ui.js.
Dropdown
The JavaScript is already loaded through ui.js.
Accordion
PHP UI uses the native HTML <details> element for accordions.
No JavaScript is required.
Pagination
Layout & Content
Card
Table
Table Variants
Striped
Compact
Bordered
Combining Variants
Tooltip
Modal
The JavaScript is already loaded through ui.js.
JavaScript Components
The following components use JavaScript:
| Component | JavaScript File |
|---|---|
| Modal | modal.js |
| Dropdown | dropdown.js |
| Toast | toast.js |
| Tabs | tabs.js |
| Navbar | navbar.js |
| Sidebar | sidebar.js |
All JavaScript components are loaded automatically through:
You do not need to include the individual JavaScript files.
Include only:
Components that do not require JavaScript:
- Button
- Badge
- Alert
- Card
- Input
- Textarea
- Select
- Checkbox
- Radio
- Switch
- Form
- Accordion
- Tooltip
- Table
- Pagination
- Spinner
- Skeleton
- Progress
- Empty State
- Breadcrumb
Accessibility
PHP UI is designed with accessibility in mind.
Components use native HTML elements and standard accessibility attributes where appropriate.
Examples include:
- Native
<button>elements - Associated
<label>elements - Native form controls
<dialog>for modals<details>for accordionsaria-selectedfor tabsaria-expandedfor dropdowns and navigationaria-currentfor pagination and breadcrumbsrole="progressbar"for progress indicatorsrole="status"for loading indicators- Visible keyboard focus states
- Reduced-motion support
Always provide meaningful labels and accessible content when using the components in your application.
Responsive Design
PHP UI components are designed to work across different screen sizes.
Responsive behavior includes:
- Responsive forms
- Responsive tables
- Responsive modals
- Responsive toast notifications
- Responsive pagination
- Mobile navbar
- Mobile sidebar
- Reduced-motion support
For example:
CSS Architecture
PHP UI keeps component styles modular.
The main stylesheet is:
Component styles are separated into individual files:
You only need to include:
The main stylesheet loads the component styles automatically.
JavaScript Architecture
JavaScript is separated by component.
ui.js is the main JavaScript entry point.
It loads all JavaScript components:
Applications only need to include:
This provides a single JavaScript entry point for the entire library.
Framework Support
PHP UI is framework independent.
It can be used with:
- Vanilla PHP
- Laravel
- Symfony
- CodeIgniter
- Slim
- Custom PHP applications
- Other PHP frameworks
The core library does not depend on a specific PHP framework.
Laravel integration is planned as a separate package.
Browser Support
PHP UI uses standard HTML, CSS, and JavaScript APIs.
Modern versions of major browsers are supported.
Development
Clone the repository:
Enter the project directory:
Install Composer dependencies:
The example page is located at:
The example page demonstrates the available PHP UI components.
Project Structure
Contributing
Contributions, bug reports, documentation improvements, and feature requests are welcome.
Before submitting a pull request:
- Keep component naming consistent.
- Follow the existing
ui-*naming convention. - Keep components framework independent.
- Consider accessibility.
- Test responsive behavior.
- Test JavaScript interactions where applicable.
- Update the documentation when adding or changing a component.
Please open an issue or submit a pull request.
License
PHP UI is open-source software licensed under the MIT License.
See the LICENSE file for details.