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.
Copy file name to clipboardExpand all lines: README.md
-3Lines changed: 0 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,6 @@
8
8
9
9
Laravel form components provides common form components to help build forms faster using Tailwind CSS. Supports validation, old form values, and wire:model.
10
10
11
-
**Notice:** Laravel Form Components v7 is currently not in a stable release and shouldn't be used in a production environment. It is not advised to upgrade to it until
Copy file name to clipboardExpand all lines: docs/advanced-usage/customizing-css.md
+6-24Lines changed: 6 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ sort: 1
6
6
If you want to change the look of the Laravel Form Components to match the style of your own app, you have multiple options.
7
7
8
8
## Option 1: Use Your Own Tailwind CSS Configuration
9
-
Instead of importing/linking the pre-built `dist/styles.css` from the package, you can import the `src/styles.css` and run every `@apply` rule through your own `tailwind.config.js`.
9
+
You can import the `index.css` and run every `@apply` rule through your own `tailwind.config.js`.
10
10
11
11
```css
12
12
/* app.css */
@@ -15,33 +15,17 @@ Instead of importing/linking the pre-built `dist/styles.css` from the package, y
> {note} If you choose this option, make sure you have the [required variants](#required-variants) included in your `tailwind.config.js` configuration.
24
24
25
-
## Option 2: Override Only Portions In Your CSS
26
-
If you only want to tinker with certain aspects of the components but like to keep the CSS in sync with future package updates, nothing stops you from overriding only certain CSS rules with your own tweaks. Most DOM elements have their own custom class names.
25
+
You may also import only the stylesheets you need instead of everything in the index.css file. Most components have their own stylesheets (i.e. `input.css` for input elements).
27
26
28
-
Let's say your inputs aren't rounded, and you want to remove the border radius from them. To do that, you can write your own CSS for this class:
If you want full-control, you can always copy the `src/styles.css` to your own project and go wild. In this example, we renamed the file to `custom/laravel-form-components.css`.
27
+
## Option 2: Copy the CSS To Your Own Project
28
+
If you want full-control, you can always copy the each of the stylesheets from `resources/css` to your own project and go wild. In this example, we renamed the file to `custom/laravel-form-components.css`.
45
29
Beware: you will have to manually keep this CSS in sync with changes in future package updates:
46
30
47
31
```css
@@ -154,8 +138,6 @@ in a `/* purgecss start ignore */`:
Copy file name to clipboardExpand all lines: docs/installation.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,12 +79,11 @@ You have a couple options for how you can use the UI components' CSS, depending
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
+
You can import the CSS files into your own stylesheets using `@import '../../vendor/rawilk/laravel-form-components/resources/css/index.css';'`.
83
83
This is assuming your stylesheet is located in the `./resources/css/` directory of your project.
84
84
85
-
### Directly in Blade/HTML
86
-
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') }}">`.
85
+
This will import all the package's styles into your project, however you are free to import only the stylesheets you need as well. They are all located
86
+
in the same directory as the `index.css` stylesheet.
88
87
89
88
If you would like to customize the CSS we provide, head over to [the section on Customizing CSS](/docs/laravel-form-components/{version}/advanced-usage/customizing-css).
0 commit comments