Skip to content

Commit ea59e2f

Browse files
committed
Improve login form UI
1 parent 35b9954 commit ea59e2f

File tree

4 files changed

+31
-23
lines changed

4 files changed

+31
-23
lines changed

resources/css/forms.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919

2020
.label {
21-
@apply pb-3 block text-base font-medium;
21+
@apply pb-3 block text-sm sm:text-base font-medium;
2222
}
2323

2424
.small-label {

resources/js/Pages/Login/Show.vue

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<Head :title="title" />
44

55
<div class="mx-auto max-w-2xl">
6-
<PageTitle class="mb-4 xl:mb-8" :text="title" />
6+
<PageTitle
7+
class="mb-4 xl:mb-8"
8+
:text="title"
9+
/>
710

811
<div class="bg-white rounded-2xl xl:p-10 p-6 border border-brand-200">
912
<form @submit.prevent="submitForm">
@@ -26,10 +29,15 @@
2629

2730
<div class="form-col">
2831
<label
29-
class="label"
32+
class="label flex justify-between"
3033
for="password"
3134
>
3235
Password
36+
<Link
37+
class="underline hover:decoration-transparent transition-colors ease-in-out duration-200"
38+
:href="route('password')"
39+
text="Forgot password?"
40+
/>
3341
</label>
3442
<input
3543
id="password"
@@ -41,20 +49,19 @@
4149
</div>
4250

4351
<div class="form-col">
44-
<div class="inline-label">
52+
<label class="inline-flex items-center gap-3 cursor-pointer">
4553
<input
46-
id="remember"
47-
class="checkbox"
54+
class="sr-only peer"
4855
type="checkbox"
4956
v-model="loginForm.remember"
5057
/>
51-
<label
52-
class="small-label"
53-
for="remember"
54-
>
55-
Remember
56-
</label>
57-
</div>
58+
<div
59+
class="relative w-9 h-5 bg-neutral-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-neutral-300 after:border after:rounded-full after:size-4 after:transition-all peer-checked:bg-brand-600">
60+
</div>
61+
<span class="text-sm font-medium">
62+
Remember me
63+
</span>
64+
</label>
5865
</div>
5966

6067
<div class="form-col">
@@ -69,15 +76,8 @@
6976
</form>
7077

7178
<div class="mt-6 xl:mt-10">
72-
<p class="text-center">
73-
<Link
74-
class="underline hover:decoration-transparent transition-colors ease-in-out duration-200"
75-
:href="route('password')"
76-
text="Forgot your password?"
77-
/>
78-
</p>
79-
8079
<p class="text-center mt-3">
80+
Don't have an account?
8181
<Link
8282
class="underline hover:decoration-transparent transition-colors ease-in-out duration-200"
8383
:href="route('register')"

resources/js/Pages/Register/Show.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<Head :title="title" />
44

55
<div class="mx-auto max-w-2xl">
6-
<PageTitle class="mb-4 xl:mb-8" :text="title" />
6+
<PageTitle
7+
class="mb-4 xl:mb-8"
8+
:text="title"
9+
/>
710

811
<div class="bg-white rounded-2xl xl:p-10 p-6 border border-brand-200">
912
<form @submit.prevent="submitForm">
@@ -85,6 +88,7 @@
8588

8689
<div class="mt-6 xl:mt-10">
8790
<p class="text-center">
91+
Already have an account?
8892
<Link
8993
class="underline hover:decoration-transparent transition-colors ease-in-out duration-200"
9094
:href="route('login')"

resources/js/Pages/ResetPassword/Show.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<Head :title="title" />
44

55
<div class="mx-auto max-w-2xl">
6-
<PageTitle class="mb-4 xl:mb-8" :text="title" />
6+
<PageTitle
7+
class="mb-4 xl:mb-8"
8+
:text="title"
9+
/>
710

811
<div class="bg-white rounded-2xl xl:p-10 p-6 border border-brand-200">
912
<form @submit.prevent="submitForm">
@@ -37,6 +40,7 @@
3740

3841
<div class="mt-6 xl:mt-10">
3942
<p class="text-center">
43+
Remembered your password?
4044
<Link
4145
class="underline hover:decoration-transparent transition-colors ease-in-out duration-200"
4246
:href="route('login')"

0 commit comments

Comments
 (0)