Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Jquery Ui Bundle Laravel Package

zikula/jquery-ui-bundle

A Symfony/Zikula bundle that packages jQuery UI JavaScript and CSS assets for easy integration into your application, letting you load the library and themes through the framework's asset system instead of managing vendor files manually.

View on GitHub
Deep Wiki
Context7

Getting Started

The bundle is a thin Symfony wrapper that ships jQuery UI 1.x assets and exposes Twig helpers to render the required <script> and <link> tags. There is no runtime logic beyond asset resolution, so "getting started" is almost entirely wiring.

  1. Install: composer require zikula/jquery-ui-bundle (pin a version — the latest tagged release is from mid-2017).
  2. Register in app/AppKernel.php (Symfony 2/3 style): new Zikula\Bundle\JQueryUIBundle\ZikulaJQueryUIBundle(), and add optional config under zikula_jquery_ui: in config.yml.
  3. Look first at Resources/views/, Twig/ (or Templating/) for the helper implementations, and Resources/public/ for the shipped jQuery UI JS/CSS/theme folders. The bundle's DependencyInjection/Configuration.php is the authoritative list of config keys (theme name, locale, whether to use CDN vs. local files).
  4. First use case: in app/Resources/views/base.html.twig, drop {{ jqueryui_css() }} into the <head> and {{ jqueryui_js() }} just before </body> (after jQuery itself). Then initialize a widget in a page template:
{% block javascripts %}
  {{ parent() }}
  {{ jqueryui_js() }}
  <script>
    $(function () { $('#tabs').tabs(); });
  </script>
{% endblock %}

If your first render throws "unknown function", the Twig extension isn't registered — check that the bundle was actually added to the kernel and that cache was cleared.

Implementation Patterns

Centralize the helpers in the layout, not in every page. Put jqueryui_css() / jqueryui_js() once in base.html.twig and let page templates only add init code. Since the bundle has no per-page dependency tracking, you own the ordering.

Theme selection is config-driven. The theme name (e.g. smoothness, base, redmond) maps to the CSS subfolder shipped in Resources/public/themes/. Swapping themes means changing one config.yml value, not editing templates — use this to keep environment-specific themes (e.g. a high-contrast theme for staging).

Locale switching. If the bundle exposes a locale setting, set it per-request from $request->getLocale() via a small kernel.request listener or a bundle config parameter rather than hard-coding it. jQuery UI's datepicker locale files live alongside the core JS.

CDN vs. local: Most Zikula-era bundles support a use_cdn style toggle. For local development prefer local assets so the bundle's shipped version is the source of truth; for production either is fine, but keep the jQuery UI version pinned to match the widget init code.

Integration with forms. If you use jQuery UI datepicker on Symfony form fields, add a small form theme in app/Resources/views/Form/ that adds a data-jqueryui-datepicker attribute, then initialize globally:

$(document).on('focus', '[data-jqueryui-datepicker]', function () {
  if (!$(this).data('datepicker')) { $(this).datepicker(); }
});

This avoids per-field Twig boilerplate and survives re-rendered form collections.

Assetic/Encore coexistence. Do not double-register the same JS. If you're on Assetic, let the bundle render its tags and don't also include jquery-ui in your javascripts block. If you're on Webpack Encore (Symfony 4+), you almost certainly want to bypass the bundle entirely and npm i jquery-ui — the bundle predates and doesn't understand Encore's entrypoint manifests.

Gotchas and Tips

  • The package is archived and unreleased since 2017. Treat it as a historical artifact. It was designed for Symfony 2/3 with Assetic; do not assume it works on Symfony 4+ without patching. Check that the bundle class and service definitions use the legacy Bundle base and YAML/XML service configs before committing to it.
  • jQuery load order is the #1 failure mode. The bundle renders jQuery UI tags but does not (on most versions) ship jQuery itself. If your <script> for jQuery UI appears before jQuery, every widget silently no-ops with $ is not defined or $(...).tabs is not a function. Verify order in view-source, not in the Twig file.
  • Cache after config changes. Changing the theme or locale in config.yml requires php bin/console cache:clear (or removing app/cache/*); the asset URL is cached.
  • Theme CSS is global. jQuery UI's theme CSS restyles generic classes (.ui-state-default, .ui-widget, etc.) and can clash with Bootstrap or your own UI kit. Either scope it or accept the visual conflict — there is no isolation in a 2017-era bundle.
  • Asset publishing in Symfony 3+/4+. The bundle relies on Resources/public being symlinked/copied to web/bundles/zikulajqueryui/. If you get 404s on the theme CSS, run php bin/console assets:install --symlink (or --relative).
  • Version pinning. Because there's no maintained release line, pin the exact version in composer.json and record the jQuery UI version in a README note. Future-you will need to know which widget APIs are available (e.g. controlgroup only appeared in 1.10+).
  • Debugging tips. If widgets don't initialize: (1) confirm the JS tags exist in the rendered HTML, (2) confirm the URL returns 200 (not 404), (3) confirm jQuery is defined before the widget call, (4) open the console — a single TypeError from a missing widget file will abort the rest of the script block.
  • Extension points are minimal. Realistically the only extension hooks are (a) overriding the bundle's Twig templates under app/Resources/ZikulaJQueryUIBundle/views/, (b) replacing the Twig extension service via a compiler pass if you need custom asset URLs, and (c) overriding the config. There is no plugin system — don't look for one.
  • Migration path. For anything new, drop this bundle and use jquery-ui from npm via Encore (or migrate to a modern widget library). The archive status, zero stars, and 2017 last release mean you will be the sole maintainer of any forks. If you must stay on it for a legacy app, isolate the helpers behind your own Twig functions so you can swap the implementation later without touching every template.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings