How do i style the password/repeat password with attribute? - tailwind-css

So my problem is i can't style the same way as other form rows/attributes with tailwindcss on symfony
enter image description here
<section class="bg-gray-50 grey:bg-gray-900">
<div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
<a href="#" class="flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white">
<img class="w-8 h-8 mr-2" src="https://flowbite.s3.amazonaws.com/blocks/marketing-ui/logo.svg" alt="logo">
Flowbite
</a>
{{ form_start(registrationForm, {
attr: {'class': 'w-full bg-white rounded-lg shadow grey:border md:mt-0 sm:max-w-md xl:p-0 grey:bg-gray-900 grey:border-gray-700'}
}) }}
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
<h1 class="text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark:text-black">
Create and account
</h1>
<form class="space-y-4 md:space-y-6" action="#">
<div>
{{ form_row(registrationForm.email, {
label: 'Email',
attr: {'class': 'bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="name#company.com" required=""'}
}) }}
</div>
<div>
{{ form_row(registrationForm.plainPassword, {
label: 'Passwords',
attr: {'class': 'bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="name#company.com" required=""'}
}) }}
</div>
<div>
{{ form_row(registrationForm.telegram, {
label: 'telegram',
attr: {'class': 'bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="name#company.com" required=""'}
}) }}
</div>
<div>
{{ form_row(registrationForm.username, {
label: 'Gebruikersnaam',
attr: {'class': 'bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="name#company.com" required=""'}
}) }}
</div>
<div class="flex items-start">
<div class="flex items-center h-5">
<input id="terms" aria-describedby="terms" type="checkbox" class="w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-primary-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-primary-600 dark:ring-offset-gray-800" required="">
</div>
<div class="ml-3 text-sm">
<label for="terms" class="font-bold text-gray-900 dark:text-gray-900">I accept the <a class="font-medium text-primary-600 hover:underline dark:text-primary-900" href="{{ path('app_faq') }}">Terms and Conditions</a></label>
</div>
</div>
<button type="submit" class="group relative flex w-full justify-center rounded-md border border-transparent bg-indigo-600 py-2 px-4 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2">
Create an account</button>
<p class="text-sm font-light text-gray-500 dark:text-black-400">
Already have an account? Login here
</p>
</form>
</div>
</div>
</div>
</section>
I've tried to every way i could to get it right but it's shows not the way i want i've tried to find information on symfony website too.

Related

darken background image (Opacity?)

So, I am using tailwind and I am trying to darken the background image that loads for this header. The purpose of this is I want to make sure the text is readable regardless of what someone picks for a background image.
<div :style="{ backgroundImage: `url(${profile.cover_photo_path})` }" class="bg-center bg-cover h-48 w-full grid grid-cols-9 text-white shadow-2xl rounded-xl p-2">
<div class="col-span-2 mx-auto my-auto">
<img :src="profile.profile_photo_path" class="rounded-full h-36 w-36 border-4 border-red-700" />
</div>
<div class="pl-4 md:pl-0 col-span-2 grid content-center">
<div class="text-lg font-logo uppercase">
{{profile.name}}
</div>
<div class="text-sm font-light">
{{profile.user_city}}, {{profile.user_region}}, {{profile.user_country}}
</div>
<div class="text-sm font-light">
{{calculateAge}} years old
</div>
</div>
<div class="col-span-3 grid content-end">
</div>
<div class="text-lg uppercase col-span-1 grid content-end justify-end">
<div class="mx-auto">
<button type="button" class="inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 font-medium rounded-md text-white bg-red-700 hover:bg-red-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-600">
<PlusIcon class="-ml-0.5 mr-2 h-4 w-4" aria-hidden="true" />
Follow
</button>
</div>
</div>
<div class="text-lg uppercase col-span-1 grid content-end justify-center">
<div class="mx-auto">
<button type="button" class="inline-flex items-center px-3 py-2 border border-transparent shadow-sm text-sm leading-4 font-medium rounded-md text-white bg-red-700 hover:bg-red-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-600">
<MailIcon class="-ml-0.5 mr-2 h-4 w-4" aria-hidden="true" />
Message
</button>
</div>
</div>
</div>
```
I am open to other ideas but in my head it would be an opacity that would fix this. If you have another idea that would be more effective for this header/cover please let me know.
The best way to do this is to take an absolute image and control it as you want.
Like this: Tailwind Play Link
I had masked a div of the same dimensions but of black color behind your header and made the opacity of the header to 0.7.
I had added div by this
<div class="h-48 w-full bg-black absolute"></div>
And added class absolute z-10 opacity-70 to put the header div in front of black div.
Also instead of using :style="{ backgroundImage: url(path-name) }" you can use bg-[url(path-name)] like I had used.
You can see the complete code here
<script src="https://cdn.tailwindcss.com"></script>
<div class="absolute z-10 grid h-48 w-full grid-cols-9 rounded-xl bg-[url(http://codeskulptor-demos.commondatastorage.googleapis.com/GalaxyInvaders/back05.jpg)] bg-cover bg-center p-2 text-white opacity-60 shadow-2xl">
<div class="col-span-2 mx-auto my-auto">
<img src="http://codeskulptor-demos.commondatastorage.googleapis.com/pang/IHXoEES.png" class="h-36 w-36 rounded-full border-4 border-pink-200" />
</div>
<div class="col-span-2 grid content-center pl-4 md:pl-0">
<div class="font-logo text-lg uppercase">{{profile.name}}</div>
<div class="text-sm font-light">{{profile.user_city}}, {{profile.user_region}}, {{profile.user_country}}</div>
<div class="text-sm font-light">{{calculateAge}} years old</div>
</div>
<div class="col-span-3 grid content-end"></div>
<div class="col-span-1 grid content-end justify-end text-lg uppercase">
<div class="mx-auto">
<button type="button" class="inline-flex items-center rounded-md border border-transparent bg-red-700 px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-red-800 focus:outline-none focus:ring-2 focus:ring-red-600 focus:ring-offset-2">
<PlusIcon class="-ml-0.5 mr-2 h-4 w-4" aria-hidden="true" />
Follow
</button>
</div>
</div>
<div class="col-span-1 grid content-end justify-center text-lg uppercase">
<div class="mx-auto">
<button type="button" class="inline-flex items-center rounded-md border border-transparent bg-red-700 px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-red-800 focus:outline-none focus:ring-2 focus:ring-red-600 focus:ring-offset-2">
<MailIcon class="-ml-0.5 mr-2 h-4 w-4" aria-hidden="true" />
Message
</button>
</div>
</div>
</div>
<div class="absolute h-48 w-full bg-black"></div>
Ignore the warning and see in full view

Styling with Tailwind CSS

I'm using Tailwindcss to style my forms but when I try to submit and catch errors for required fields, the size on input fields increases.
Form code
<Formik
initialValues={userData.signup}
onSubmit={submitData}
validationSchema={signupSchema}
>
{({ values, errors, touched, handleChange, handleSubmit }) => {
return (
<>
<Form className="grid grid-cols-2 gap-3" onSubmit={handleSubmit} id="form">
<div className="relative flex w-full flex-wrap items-stretch mb-3">
<span className="z-10 leading-snug font-normal absolute text-center text-gray-400 bg-transparent rounded text-base items-center justify-center w-8 pl-3 py-3">
<i className="fas fa-user-circle"></i>
</span>
<input
className={
`${touched.name && errors.name ?
"form-input border py-3 border-red-400 placeholder-gray-400 text-gray-700 relative rounded text-sm w-full pl-10" :
"form-input border py-3 border-gray-400 placeholder-gray-400 text-gray-700 relative rounded text-sm focus:border-green-200 w-full pl-10"}`
}
type="text"
name="name"
placeholder="Name"
value={values.name}
onChange={handleChange}
/>
<span className="text-red-400 self-center">{touched.name && errors.name}</span>
</div>
<div className="relative flex w-full flex-wrap items-stretch mb-3">
<span className="z-10 leading-snug font-normal absolute text-center text-gray-400 bg-transparent rounded text-base items-center justify-center w-8 pl-3 py-3">
<i className="fas fa-envelope"></i>
</span>
<input
className={
`${touched.email && errors.email ?
"form-input border py-3 border-red-400 placeholder-gray-400 text-gray-700 relative rounded text-sm w-full pl-10" :
"form-input border py-3 border-gray-400 placeholder-gray-400 text-gray-700 relative rounded text-sm focus:border-green-200 w-full pl-10"}`
}
type="email"
name="email"
placeholder="Email"
value={values.email}
onChange={handleChange}
/>
<span className="text-red-400 self-center">{touched.email && errors.email}</span>
</div>
<div className="relative flex w-full flex-wrap items-stretch mb-3">
<span className="z-10 leading-snug font-normal absolute text-center text-gray-400 bg-transparent rounded text-base items-center justify-center w-8 pl-3 py-3">
<i className="fas fa-phone"></i>
</span>
<input
className={
`${touched.phoneNumber && errors.phoneNumber ?
"form-input border py-3 border-red-400 placeholder-gray-400 text-gray-700 relative rounded text-sm w-full pl-10" :
"form-input border py-3 border-gray-400 placeholder-gray-400 text-gray-700 relative rounded text-sm focus:border-green-200 w-full pl-10"}`
}
type="text"
name="phoneNumber"
placeholder="Phone number"
value={values.phoneNumber}
onChange={handleChange}
/>
<span className="text-red-400 self-center">{touched.phoneNumber && errors.phoneNumber}</span>
</div>
<div className="relative flex w-full flex-wrap items-stretch mb-3">
<span className="z-10 leading-snug font-normal absolute text-center text-gray-400 bg-transparent rounded text-base items-center justify-center w-8 pl-3 py-3">
<i className="fas fa-lock"></i>
</span>
<input
className={
`${touched.password && errors.password ?
"form-input border py-3 border-red-400 placeholder-gray-400 text-gray-700 relative rounded text-sm w-full pl-10" :
"form-input border py-3 border-gray-400 placeholder-gray-400 text-gray-700 relative rounded text-sm focus:border-green-200 w-full pl-10"}`
}
type="password"
name="password"
placeholder="Password"
value={values.password}
onChange={handleChange}
/>
<span className="text-red-400 self-center">{touched.password && errors.password}</span>
</div>
{/* <div className="relative flex w-full flex-wrap items-stretch mb-3">
<span className="z-10 leading-snug font-normal absolute text-center text-gray-400 bg-transparent rounded text-base items-center justify-center w-8 pl-3 py-3">
<i className="fas fa-lock"></i>
</span>
<input
className={
`${touched.confirmPassword && errors.confirmPassword ?
"form-input border py-3 border-red-400 placeholder-gray-400 text-gray-700 relative rounded text-sm w-full pl-10" :
"form-input border py-3 border-gray-400 placeholder-gray-400 text-gray-700 relative rounded text-sm focus:border-green-200 w-full pl-10"}`
}
type="password"
name="confirmPassword"
placeholder="Confirm Password"
value={values.confirmPassword}
onChange={handleChange}
/>
<span className="text-red-400 self-center">{touched.confirmPassword && errors.confirmPassword}</span>
</div> */}
</Form>
<SignupBtn type="submit" form="form"> Sign Up </SignupBtn>
<SocialBtns />
</>
)
}}
</Formik>
Form before error highlighting using Formik
Form after error highlighting using Formik
This is the code I used to style the forms.
Am I missing anything here? Thanks
Remove flex from the button container...
<div class="relative w-full flex-wrap mb-3">
<button class="py-2 px-4 bg-green-500 text-white font-semibold rounded-lg hover:bg-green-700 w-full">
Sign Up
</button>
</div>
Codeply

Tailwind show placeholder on border of input when focused

I am trying to create a form using Tailwind for a project. For this project I need to create a certain type of input field. When this field is being focused the placeholder of that field should change position on top of the border of the input. Is this possible using Tailwind?
This is my code for the input I am using:
<input
type="text"
name="email"
id="email"
v-model="email"
placeholder="Email address"
class="my-2 px-4 py-2 border rounded-lg text-gray-700 focus:outline-none text-sm"
/>
This is an example of how to input should be displayed when it is being focused:
You can use :
<div class="relative z-0 px-2 w-full group">
<label for="first_name" class="font-mono uppercase font-bold text-[11px] text-gray-900 dark:text-gray-300
bg-white relative px-1 top-2 left-3 w-auto group-focus-within:text-red-600 ">
Email Address
</label>
<input type="email" name="first_name" id="first_name" class="h-8 text-10 bg-gray-50 border py-55-rem border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
required="" placeholder="contact#gmail.com" />
Or
<div class="relative z-0 px-2 w-full group">
<label for="first_name" class="font-mono uppercase font-bold text-11 text-gray-900 dark:text-gray-300
bg-white relative px-1 group-focus-within:top-2 top-7 left-3 w-auto group-focus-within:text-red-600 ">
Email Address
</label>
<input type="email" name="first_name" id="first_name" class="h-8 text-[11px]text-10 bg-gray-50 border py-55-rem border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
required="" placeholder="contact#gmail.com" />
#tailwind base;
#tailwind components;
#tailwind utilities;
<link href="https://unpkg.com/tailwindcss#^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.tailwindcss.com/3.0.23"></script>
<div class="relative z-0 px-2 w-full group">
<label for="first_name" class="font-mono uppercase font-bold text-11 text-gray-900 dark:text-gray-300 bg-white relative px-1 group-focus-within:top-2 top-7 left-3 w-auto group-focus-within:text-red-600"> Email Address </label>
<input type="email" name="first_name" id="first_name" class="h-8 text-[11px]text-10 bg-gray-50 border py-55-rem border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
required="" placeholder="contact#gmail.com" />
</div>
<div class="relative z-0 px-2 w-full group">
<label for="first_name" class="font-mono uppercase font-bold text-[11px] text-gray-900 dark:text-gray-300 bg-white relative px-1 top-2 left-3 w-auto group-focus-within:text-red-600"> Email Address </label>
<input type="email" name="first_name" id="first_name" class="h-8 text-10 bg-gray-50 border py-55-rem border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
required="" placeholder="contact#gmail.com" />
</div>

Dropdown menu causes scrolling

I have a dropdown menu inside one of the columns in a table. When it is exposed, it is either cut off (overflow-hidden) or created a scroll bar (overflow-visible).
How would I get this to just appear over top of the table (or "extend" a parent div so it's all visible) so that the only scroll bar is the usual one in the browser, not this table-specific scroll bar. Code provided below.
<div class="flex flex-col">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div class="shadow border-b border-gray-200 sm:rounded-lg overflow-auto">
<div class="flex flex-wrap m-4 justify-between">
<div class="flex items-center">
<div class="beep-label">
#lang('livewire.per_page'):
</div>
<select wire:model="perPage" class="beep-input align-middle w-auto inline-block">
<option>10</option>
<option>15</option>
<option>25</option>
</select>
</div>
<div class="flex">
<div class="beep-label pr-2 flex justify-center items-center h-full text-center">
#lang('one-word.filter'):
</div>
<input wire:model="search" class="beep-input" type="text" placeholder="#lang('livewire.search_users')...">
</div>
</div>
<table class="divide-y divide-gray-200 w-full">
<thead>
<tr>
<th class="beep-table-header h-full align-middle flex">
<div class="align-middle justify-items-auto">
<a wire:click.prevent="sortBy('name')" role="button" href="#" class="">
#include('livewire.includes._sort-icon', ['field' => 'name'])
<div class="inline-block">#lang('one-word.name')</div>
</a>
</div>
</th>
<th class="beep-table-header">
<a wire:click.prevent="sortBy('users.email')" role="button" href="#" class="">
#include('livewire.includes._sort-icon', ['field' => 'users.email'])
#lang('users.beep_email')
</a>
</th>
<th class="beep-table-header">
<a wire:click.prevent="sortBy('beep_extension')" role="button" href="#" class="">
#include('livewire.includes._sort-icon', ['field' => 'beep_extension'])
#lang('livewire.beep_ext')
</a>
</th>
<th class="beep-table-header text-center">
#lang('one-word.action')
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
#foreach ($contacts as $contact)
<tr #if ($contact->is_active !== true) class="table-danger" #endif>
<td class="px-6 py-4 whitespace-no-wrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
#if ($contact->contactable->thumbnail)
<img class="h-10 w-10 rounded-full"
src="{{ $contact->contactable->thumbnail }}"
alt="">
#else
<x-nav.svg-icons icon="user-circle" class="w-3 h-3" />
#endif
</div>
<div class="ml-4">
<div class="text-sm leading-5 font-medium text-gray-900">
{{ $contact->name }}
</div>
<div class="text-sm leading-5 text-gray-500">{{ $contact->contactable->email }}</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-no-wrap">
<div class="text-sm leading-5 text-gray-900">{{ $contact->beep_mail }}</div>
</td>
<td class="px-6 py-4 whitespace-no-wrap">
<div class="text-sm leading-5 text-gray-900">{{ $contact->beep_extension }}</div>
</td>
<td class="px-6 py-4 whitespace-no-wrap text-center text-sm leading-5 font-medium">
<div x-data="{ open: false }" #keydown.window.escape="open = false" #click.away="open = false" class="relative inline-block text-left">
<div>
<span class="rounded-md shadow-sm">
<button #click="open = !open" type="button" class="inline-flex justify-center w-full rounded-md border border-gray-300 px-4 py-2 bg-white text-sm leading-5 font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:shadow-outline-blue active:bg-gray-50 active:text-gray-800 transition ease-in-out duration-150" id="options-menu" aria-haspopup="true" aria-expanded="true">
#lang('one-word.action')
<!-- Heroicon name: chevron-down -->
<svg class="-mr-1 ml-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
</span>
</div>
<div x-show="open" x-description="Dropdown panel, show/hide based on dropdown state." x-transition:enter="transition ease-out duration-100" x-transition:enter-start="transform opacity-0 scale-95" x-transition:enter-end="transform opacity-100 scale-100" x-transition:leave="transition ease-in duration-75" x-transition:leave-start="transform opacity-100 scale-100" x-transition:leave-end="transform opacity-0 scale-95" class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg z-10">
<div class="rounded-md bg-white shadow-xs">
<div class="py-1" role="menu" aria-orientation="vertical" aria-labelledby="options-menu">
#can ('view', $contact->contactable)
#lang('users.view_profile')
#endcan
#can ('update', $contact->contactable)
#lang('one-word.edit')
#lang('livewire.edit_contact_methods')
{{ $contact->is_active ? __('one-word.deactivate') : __('one-word.activate') }}
#endcan
</div>
</div>
</div>
</div>
</td>
</tr>
#endforeach
</tbody>
</table>
<div class="p-2 uppercase text-sm bg-gray-200">
{{ $contacts->links() }}
</div>
</div>
</div>
</div>
</div>
And the extracted css components in case they are helpful:
.beep-label {
#apply block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2;
}
.beep-input {
#apply appearance-none block w-full text-gray-700 border border-gray-500 rounded py-1 px-2 mb-3;
}
.beep-table-header {
#apply px-6 py-3 bg-gray-100 text-left text-xs leading-4 font-medium text-gray-500 uppercase tracking-wider;
}

Tailwind issue - some items are slightly off

Not sure how to debug this, but inspecting some items that are supposedly inside a flex, they are still off by a few fractions of a pixel.
On the screenshot below, notice the slight variation between the Id / Due Date and the Project input fields. https://imgur.com/a/je3Sgiu
What could be the issue here? I tried it in Firefox, Safari, and Chrome, all facing the issue.
Edit:
Added the html snippet below
<div class="lg:w-4/5 mr-auto ml-auto mt-16 sm:px-6 lg:px-8">
<div class="">
<form method="GET" autocomplete="off">
<div class="md:flex">
<div class="mx-2">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold my-5" for="grid-state">
Id
</label>
{% render_field invoice_filter.form.id class="w-full lg:w-40 block appearance-none bg-white border border-gray-500 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" %}
</div>
<div class="mx-2">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold my-5" for="grid-state">
Project
</label>
{% render_field invoice_filter.form.project class="w-full lg:w-40 block appearance-none bg-white border border-gray-500 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" %}
</div>
<div class="mx-2">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold my-5" for="grid-state">
Due Date
</label>
{% render_field invoice_filter.form.due_date class="w-full lg:w-40 block appearance-none bg-white border border-gray-500 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500" %}
</div>
</div>
<button class="whitespace-no-wrap mr-5 bg-green-600 hover:bg-green-700 text-white py-2 my-2 mx-2 px-6 rounded-lg" type="submit">Apply filter</button>
</form>
</div>
</div>
The {% render_field ... %} tags are just a Django specific way of adding classes to the form fields,
It essentially says
`<input class="...." />`

Resources