celerik / ui
Open-source, Bootstrap-based UI component suite for PHP, with optional Laravel and Symfony adapters.
Requires
- php: >=8.2
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- doctrine/orm: ^3.3
- illuminate/database: ^11.0 || ^12.0 || ^13.0
- phpunit/phpunit: ^11.5
- squizlabs/php_codesniffer: ^3.11 || ^4.0
- studio-42/elfinder: ^2.1.70
- symfony/cache: ^7.2
- symfony/html-sanitizer: ^7.2
- twig/twig: ^3.14
Suggests
- ext-fileinfo: Required by UploadHandler to detect the real MIME type of uploads
- doctrine/orm: Required by the Doctrine data and event sources
- laravel/framework: Laravel 11+ for the Blade components and Eloquent data source
- studio-42/elfinder: Required by the File Manager (connector, JS and CSS)
- symfony/framework-bundle: Symfony 7 for the bundle and Twig extension
- symfony/html-sanitizer: Required by EditorHtml::sanitize() to clean rich text editor output
- twig/twig: Required by the Symfony Twig extension
Provides
None
Conflicts
None
Replaces
None
README
Formerly Celerik UI. From 0.7.0 the project is Caelrik UI:
caelrik/uion Packagist,@caelrik/uion npm, theCaelrik\Uinamespace and thecaelrik-prefix. The changelog lists every name to change.
An open-source, Bootstrap-based UI component suite for PHP, inspired by Telerik UI. It works with plain PHP and has optional adapters for Laravel 11+ and Symfony 7.
Components are written in PHP and render accessible, escaped HTML. A small JS bundle then enhances them with proven open-source libraries: DataTables, Chart.js, Parsley.js, Inputmask, FullCalendar, Quill, FilePond, Notyf and elFinder. Each library (and its stylesheet) is loaded only on pages that use it.
Status: Phase 5 (data) in progress. Grid, Chart, Form (with uploads, a rich text editor, selects, tags, dates, ratings, one-time codes, key-value lists, signatures, Markdown, code, an image editor for uploads, repeaters and wizards), Scheduler, Modal, Tabs, Notification, File Manager and ThemeBuilder are available, accessible to WCAG 2.2 AA and documented. The roadmap lists the components still to come, toward Telerik UI's breadth.
Documentation: https://kivudesign.github.io/caelrik/, with getting started guides for plain PHP, Laravel and Symfony, every component with a live demo, the theming and security guides, and the API reference.
Quick look
use Caelrik\Ui\Components\Grid; use Caelrik\Ui\Adapters\Laravel\EloquentDataSource; $grid = Grid::make('users') ->caption('Registered users') ->url('/users/data') // server-side paging, sorting, search ->column('name') ->column('email', 'E-mail') ->export('copy', 'csv', 'print'); // In the /users/data controller, using the same Grid definition: return response()->json($grid->respond(new EloquentDataSource(User::query()), $request->query()));
<x-caelrik-assets /> <x-caelrik :component="$grid" />
Installation
composer require caelrik/ui
Load Bootstrap 5.3 (CSS, and bootstrap.bundle.js for Modal and Tabs) and jQuery 3.7 or 4, then the Caelrik bundle:
| Setup | Publish assets | Assets tag | Render |
|---|---|---|---|
| Laravel | php artisan vendor:publish --tag=caelrik-assets |
<x-caelrik-assets /> |
<x-caelrik :component="$grid" /> |
| Symfony | add CaelrikUiBundle to config/bundles.php, then php bin/console assets:install |
{{ caelrik_assets() }} |
{{ caelrik(grid) }} |
| Plain PHP | serve the package's public/ folder |
<?= Assets::tags('/assets') ?> |
<?= $grid ?> |
Releases include the built bundle (public/), so no Node.js is needed to install. To skip publishing the assets, load them from the jsDelivr CDN instead: Assets::tags(Assets::cdnUrl()) (or <x-caelrik-assets :base-url="Caelrik\Ui\Assets::cdnUrl()" />). Projects with a JavaScript bundler can also install the bundle from npm: npm install @caelrik/ui, then import '@caelrik/ui' and import '@caelrik/ui/caelrik.css'.
Components
| Component | PHP class | Library | Highlights |
|---|---|---|---|
| Grid | Components\Grid |
DataTables 3 | Client- or server-side, column filters, totals and groups, inline editing, columns to show or hide, row actions, selection and bulk actions, export, caption, column whitelisting |
| ListView | Components\ListView |
– | Items with a title, link, description, meta texts, picture and actions; pager, search and sort, client- or server-side; list or cards |
| TreeView | Components\TreeView |
– | WAI-ARIA tree: links, single selection or checkboxes (with mixed parents) posted with forms, children loaded on demand, from nested arrays or flat rows |
| TreeList | Components\TreeList |
– | WAI-ARIA treegrid: nested rows from flat or nested data, open and close, keyboard between rows and cells, expand and collapse all, row actions |
| TaskBoard | Components\TaskBoard |
SortableJS 1 | Kanban columns with limits; cards dragged, moved from the keyboard (announced), or with a Move form that works without JavaScript (WCAG 2.5.7) |
| AdminLayout, Navigation, Breadcrumb, UserMenu | Components\AdminLayout, ... |
Bootstrap 5 | App bar, sidebar navigation (offcanvas on small screens, shown without JavaScript), breadcrumb, user menu, skip link; current page marked |
| MenuButton, SplitButton, Toolbar, ContextMenu | Components\MenuButton, ... |
– | WAI-ARIA menu buttons with links and actions, a split button, a one-tab-stop toolbar, a context menu (right click, Shift+F10) filled from the target's data |
| Accordion, Card, Splitter | Components\Accordion, ... |
Bootstrap 5 | WAI-ARIA accordion (one or several open), cards with a covering title link and actions, resizable panes (window splitter: keys, drag, remembered sizes, CSP-safe) |
| Tile layout | Components\TileLayout |
Bootstrap 5 | Dashboard tiles on a grid of columns, moved and resized with one-click tools, arrow keys or a drag, announced, remembered, CSP-safe |
| Stats | Components\Stat, Components\Stats |
– | Stat tiles with a trend said in words and an SVG sparkline named by its values; rows of stats; dashboard widgets in a tile layout |
| Display elements | Components\Badge, Avatar, Chip, Tooltip, Popover, Progress, Loader, Skeleton |
Bootstrap 5 | Badges with hidden text; avatars named with a status shaped as well as colored; removable and filter chips; WCAG 1.4.13 tooltips; native-disclosure popovers; native progress bars and SVG circles; loaders and skeletons as status regions |
| Timeline, Carousel | Components\Timeline, Components\Carousel |
– | A named ordered list of events with dates, markers and a current step, on one or both sides of the line; a WAI-ARIA carousel with pictures or HTML slides, a button per slide, swipe, and automatic rotation that pauses, stops and respects reduced motion |
| Gauges, Sparklines | Components\Gauge, Components\Sparkline |
– | Semicircle or bar meters with named bands and a target, the value text saying it all; line, area and bar sparklines the size of a word, named by their range; SVG drawn by PHP |
| Gantt | Components\Gantt |
– | A table of tasks (dates, progress, dependencies) whose last column is the timeline: bars and milestones drawn by PHP, a day, week or month scale, today's line, dependency arrows; scrolls sideways with the task names kept in view |
| Map | Components\Map |
Leaflet 1.9 | Markers with popups, and the same places written as a list (the text alternative) with "Show on map" buttons; a named, keyboard-driven map region, named marker buttons, no wheel trap, reduced motion, dark tiles; OpenStreetMap or your own tiles |
| Org chart | Components\OrgChart |
– | People in nested lists drawn as a tree by CSS (an indented list in narrow containers), from nodes or database rows; collapsible teams with named buttons; no JavaScript needed |
| QR code | Components\QrCode |
– | A QR code drawn by PHP as an SVG (any text, levels L to H, versions 1 to 40), with its value written under it, as a link for a web address |
| Barcode | Components\Barcode |
– | A Code 128 or EAN-13 barcode drawn by PHP as an SVG, with its value written under it (the EAN-13 check digit added or checked) |
| Media player | Components\MediaPlayer |
Plyr | Video or audio with the same accessible controls in every browser, captions, subtitles and descriptions, and a transcript that plays from any line |
| PDF viewer | Components\PdfViewer |
PDF.js | A PDF's pages with a text layer (read by screen readers, found by the browser's search), previous and next, a page number, zoom, and a download link always there |
| Diagram | Components\Diagram |
– | Flowcharts drawn by PHP as an SVG (boxes, terminals, decisions, labelled arrows, loops, lanes for long arrows), downwards or to the right, with every step and arrow also written as linked text |
| Record view | Components\RecordView |
– | A read-only record by sections (Filament's infolists): text, links, dates, numbers, yes/no, badges, lists, pictures; placeholders for empty values; 1 to 4 columns |
| Chart | Components\Chart |
Chart.js 4 | Embedded or remote data, fromRows(), hidden data table as text alternative |
| Form | Components\Form |
Parsley.js, Inputmask | HTML5 rules, masks, CSRF, method spoofing, server errors and old input |
| File upload | Field::file() + Upload\UploadHandler |
FilePond 4 | Async or classic uploads; real MIME detection, extension whitelist, random names; falls back to a plain file input |
| Rich text editor | Field::editor() + Support\EditorHtml |
Quill 2 | Toolbar presets, accessible labelling, server-side sanitizing (symfony/html-sanitizer) |
| Modal | Components\Modal |
Bootstrap 5 | Labelled dialog, footer buttons that submit a form inside, opens on load after server errors |
| Tabs | Components\Tabs |
Bootstrap 5 | WAI-ARIA tabs with arrow keys, tabs/pills/underline styles, selected tab kept in the URL hash |
| Notification | Components\Notification |
Notyf 3 | Toasts from flash messages (fromFlash()) or Caelrik.notify(); messages are always text; errors stay until dismissed |
| Scheduler | Components\Scheduler |
FullCalendar 6 (MIT plugins) | Month, week, day and list views; create, move, resize and delete through your endpoints (also from the keyboard), rolled back if the server refuses |
| Theme builder | Components\ThemeBuilder + Theme\Theme |
– | Edit theme tokens with a live preview of your components and a contrast report; export CSS or JSON; see THEMING.md |
| File manager | Components\FileManager + FileManager\FileManagerConnector |
elFinder 2.1 | Locked-down local volume, mandatory authorization, content-checked uploads, elFinder CSRF plus the framework's; see SECURITY.md |
Content passed to Modal and Tabs follows one rule: a string is escaped text, and a Stringable (another component, or Html::raw() for markup you trust) is inserted as HTML.
The full Telerik → open-source mapping is in Components.md.
Themes
Caelrik UI is Bootstrap 5.3, in light and dark mode (<html data-bs-theme="dark">): load caelrik.css after Bootstrap with <x-caelrik-assets />, {{ caelrik_assets() }} or Assets::tags($url). Every component is checked for WCAG 2.2 AA contrast in both modes, automatically and in a browser with axe-core. (The Material and Tailwind looks of 0.1.x were removed in 0.2.0; see THEMING.md.)
To make your own, start from a look and change its design tokens (ten colors per mode, radius, font, shadow):
- the ThemeBuilder component edits them with a live preview of your components and a WCAG contrast report, and exports the stylesheet or the theme JSON;
Theme::preset('bootstrap')->color('light', 'primary', '#0b5394')->toCss()does the same in PHP;vendor/bin/caelrik-theme build theme.json public/css/acme.cssbuilds it in CI, and refuses a theme that fails a contrast check.
Load the result with customTheme (<x-caelrik-assets custom-theme="/css/acme.css" />). See THEMING.md; for changes tokens cannot make, override the CSS custom properties or the SCSS variables.
Examples
examples/plain: no framework, with light and dark mode (?mode=dark) and the ThemeBuilder. Runphp -S localhost:8000 examples/plain/index.php.examples/laravel: Eloquent grid, chart, validated form, scheduler, an article form with rich text and uploads, a tabs/modal/notifications page, and a file manager.examples/symfony: Doctrine grid, chart, validated form, scheduler, an article form with rich text and uploads, a tabs/modal/notifications page, and a file manager.
Development
composer install && npm install npm run build # public/: the bundle is built, not committed (releases add it to their tag) composer test # PHPUnit npm test # Jest + axe-core (renders PHP fixtures first) npm run test:a11y # Playwright + axe-core in a real browser, light and dark (after npm run build) composer lint # PSR-12 npm run lint # ESLint
The documentation site is built from site/ (npm run docs:dev, npm run docs:build); its demos are rendered by PHP and its API reference is generated from the code.
See CONTRIBUTING.md and TESTING.md.
Content Security Policy
Components emit no inline scripts, so a strict policy works. Pass a nonce to the assets tag (<x-caelrik-assets nonce="..." />, caelrik_assets(null, nonce) or Assets::tags($url, $nonce)). It is also printed as <meta name="csp-nonce">, which FullCalendar uses for the styles it injects.
Tested policy:
default-src 'self'; script-src 'self' 'nonce-…'; style-src 'self' 'nonce-…';
img-src 'self' data:; font-src 'self' data:; connect-src 'self'
font-src data: is needed for the Scheduler's toolbar icons. Add your CDN to script-src and style-src if Bootstrap and jQuery come from one.
The File Manager also needs style-src-attr 'unsafe-inline': elFinder builds its interface with inline style attributes. That directive allows style attributes only (they cannot run code); scripts and <style> elements still require the nonce.
Accessibility
Components target WCAG 2.2 AA in light and dark mode, and respect reduced motion and Windows High Contrast. Every pull request runs axe-core in a real browser, plus keyboard, forced-colors and target-size tests. See ACCESSIBILITY.md for the status of each component, the known limits of the bundled libraries and the manual test plan.
Documentation Pack
| Document | Purpose |
|---|---|
| Documentation site | Guides, components with live demos, API reference (source in site/) |
| ROADMAP.md | Phased delivery plan |
| Components.md | Telerik → open-source component mapping, licenses, phases |
| CONTRIBUTING.md | How to contribute, project rules, adding a component |
| TESTING.md | Test suites and how to run them |
| ACCESSIBILITY.md | Conformance target, per-component status, manual test plan |
| THEMING.md | Theme tokens, ThemeBuilder, Theme in PHP, the caelrik-theme command |
| SECURITY.md | Reporting vulnerabilities |
| THIRD_PARTY_NOTICES.md | Licenses of bundled libraries |
| AI.md | Notes for AI-assisted development |
| structure.md | Repository layout |
License
- Core: MIT.
- Bundled libraries keep their own licenses: see THIRD_PARTY_NOTICES.md.
- Caelrik UI is, and will stay, free and open source: there are no paid or premium editions.
Telerik is a trademark of Progress Software Corporation. Caelrik UI is an independent project, not affiliated with or endorsed by Progress.