Customization
While being effortless to use, QuickForm is flexible enough to support a wide variety of customization.
There are a few ways to customize QuickForm:
- Using attributes: To decorate the individual fields and their looks.
- Customizing the whole layout: To create a custom QuickForm component with a custom layout and custom styles + any additional parameters you may need
Custom layout
This is a step-by-step guide to creating a custom form styled with TailwindCSS.
Please note, that this process may seem a little complex for users who are not familiar with Blazor.
Define the directives
AppForm.razor - declaring directives | |
---|---|
Create the layouts
@context
See IQuickFormField interface for more information on the @context
object and what fields are available to you.
Important! add the base component's markup
Important
This is necessary to render the form and its fields. Without this line your form will not be rendered.
Congratulations!
You can now use your component all around your application!
Here is what the output should look like:
As an exercise to get better with using the library, try creating a component for a different CSS framework, or even a custom one!