krystal-sf / ux-extras
Extra UX Components for Krystal Symfony Projects
1.0.x-dev
2026-08-05 09:30 UTC
Requires
- php: ^8.1
- krystal-sf/ux-common: ^1.0
- krystal-sf/ux-menus: ^1.0
- webmozart/assert: ^1.0
Requires (Dev)
- badpixxel/php-sdk: ^3.0
- krystal-sf/ux-bootstrap-5: ^1.0
- krystal-sf/ux-datatables: ^1.0
- krystal-sf/ux-prism: ^1.0
- phpunit/phpunit: ^10.0|^11.0
- symfony/debug-bundle: ^6.4|^7.4|^8.0
- symfony/monolog-bundle: ^3.0|^4.0
- symfony/stopwatch: ^6.4|^7.4|^8.0
- symfony/web-profiler-bundle: ^6.4|^7.4|^8.0
Suggests
- krystal-sf/ux-datatables: Datatables column with copy to clipboard button
This package is auto-updated.
Last update: 2026-08-05 09:30:14 UTC
README
Extra UX components for Krystal Symfony Projects: copy-to-clipboard components & datatables column.
Installation
composer require krystal-sf/ux-extras
Enable the bundle in config/bundles.php:
return [
// ...
Ksf\Plugins\Extras\KsfExtrasBundle::class => ['all' => true],
];
Copy to Clipboard
Two Twig Components, both powered by the KsfUxJsCopy Stimulus controller
(vanilla JS, Bootstrap 5 tooltip feedback):
{# Copy the wrapped text on click #}
<twig:Ksf:Copy :text="apiKey" />
{# Standalone copy button #}
<twig:Ksf:CopyButton :text="apiKey" />
Datatables Column
When krystal-sf/ux-datatables is installed (suggested dependency), the
StringWithCopyColumn renders a value with its copy button:
$datatable->add('token', StringWithCopyColumn::class, array(
'copy_title' => 'Copy token',
));
The column services load only if the Datatables bundle is present.
Testing
make up # boot the docker stack
make phpunit # run the test suite
make quality # lint + style + phpstan
License
MIT — see LICENSE.