This bundle requires PHP 8.2+, Symfony 6.4+ and Flowbite 1.6+.
First, you need to install Flowbite in your Symfony project.
Then, add tales-from-a-dev/flowbite-bundle
to your composer.json
file:
composer require tales-from-a-dev/flowbite-bundle
If you are using Symfony Flex, the following steps should be done automatically. Otherwise, follow the instructions.
Inside config/bundles.php
, add the following line:
// config/bundles.php
return [
// ...
TalesFromADev\FlowbiteBundle\TalesFromADevFlowbiteBundle::class => ['all' => true],
];
Update your Tailwind configuration file to include the templates
folder of the bundle:
// tailwind.config.js
module.exports = {
content: [
//...
"./vendor/tales-from-a-dev/flowbite-bundle/templates/**/*.html.twig"
],
}
Update your Twig configuration located in config/packages/twig.yaml
to use the form theme:
# config/packages/twig.yaml
twig:
# ...
form_themes:
- '@TalesFromADevFlowbite/form/default.html.twig'
Finally, run the following command to compile the front-end assets via Webpack:
# With npm
npm run watch
# With yarn
yarn watch