You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
You have a couple options for how you can use the UI components' CSS, depending on you and your project's needs:
79
79
80
80
### Using Laravel Mix or Webpack with CSS-Loader
81
+
81
82
You can import the built CSS in your own CSS files using `@import '../../vendor/rawilk/laravel-form-components/resources/js/laravel-form-components-styles/dist/styles.css';`.
82
83
This is assuming your stylesheet is located in the `./resources/css/` directory of your project.
83
84
84
85
### Directly in Blade/HTML
86
+
85
87
You could copy the built CSS from `vendor/rawilk/laravel-components/resources/js/laravel-form-components-styles/dist/styles.css` into your public folder, and then use a `link` tag in your blade/html to get it: `<link rel="stylesheet" href="{{ asset('css/laravel-form-components.css') }}">`.
86
88
87
89
If you would like to customize the CSS we provide, head over to [the section on Customizing CSS](/docs/laravel-form-components/v4/advanced-usage/customizing-css).
In your JavaScript, add the following lines to pull each of the external dependencies you previously installed in:
121
123
122
124
```js
123
-
import'alpinejs';
124
-
importflatpickrfrom'flatpickr';
125
-
import*asFilePondfrom'filepond';
126
-
import { createPopper } from'@popperjs/core';
125
+
import"alpinejs";
126
+
importflatpickrfrom"flatpickr";
127
+
import*asFilePondfrom"filepond";
128
+
import { createPopper } from"@popperjs/core";
127
129
128
130
window.flatpickr= flatpickr;
129
131
window.FilePond= FilePond;
@@ -136,8 +138,8 @@ Some of the dependencies this package has also have their own styling they provi
136
138
137
139
```css
138
140
/* app.css */
139
-
@import'filepond/dist/filepond.min.css';
140
-
@import'flatpickr/dist/flatpickr.min.css';
141
+
@import"filepond/dist/filepond.min.css";
142
+
@import"flatpickr/dist/flatpickr.min.css";
141
143
```
142
144
143
145
> {note} Be sure to include these styles **above** the styles for this package so any overrides this package uses for the dependencies gets applied correctly.
Copy file name to clipboardExpand all lines: docs/upgrade.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Version 4 introduced some breaking changes, which are outlined below:
9
9
10
10
### Styling
11
11
12
-
In v4, laravel-form-components is now inlining a lot of the class names for form components instead of using `@apply` in a stylesheet with a custom class name. For backwards compatibility, the custom class names are still included with each component to prevent breaking any style overrides you may have written.
12
+
In v4, laravel-form-components is now inlining a lot of the class names for form components instead of using `@apply` in a stylesheet with a custom class name. For backwards compatibility, the custom class names are still included with each component to prevent breaking any style overrides you may have written.
13
13
14
14
Another major change with the styling is laravel-form-components now uses a single `.css` stylesheet for any complex styles required instead of using `.sass` stylesheets. This will allow the usage of postcss and/or tailwind's JIT compiler in your projects with these styles. If you're still using SASS, you should still be able to pull the styles in as you were before; you'll just need to update the path to the stylesheet.
15
15
@@ -18,6 +18,7 @@ In addition, we have stopped using the `primary` and `danger` variant names in f
18
18
For more info on styling, please see [the Customizing CSS section](/docs/laravel-form-components/advanced-usage/customizing-css).
19
19
20
20
### Added Dependencies
21
+
21
22
Some components, such as the `custom-select` component, have a dependency on `Popper.js` now for positioning the menu. This will require you to ensure that dependency is installed in your project. If you customized the package's configuration file, you should make sure you pull in any updates to the configuration as well.
22
23
23
24
See [the custom select docs](/docs/laravel-form-components/v4/selects/custom-select#installation) for more information.
0 commit comments