improve: tab component with gradient border like design
This commit is contained in:
+39
-2
@@ -27,6 +27,7 @@ input[type="number"]::-webkit-inner-spin-button {
|
|||||||
/* Firefox */
|
/* Firefox */
|
||||||
input[type="number"] {
|
input[type="number"] {
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
|
appearance: textfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="password"]:not(:placeholder-shown) {
|
input[type="password"]:not(:placeholder-shown) {
|
||||||
@@ -62,8 +63,10 @@ input[type="password"]:not(:placeholder-shown) {
|
|||||||
|
|
||||||
/* Hide scrollbar for IE, Edge and Firefox */
|
/* Hide scrollbar for IE, Edge and Firefox */
|
||||||
.noscrollbar {
|
.noscrollbar {
|
||||||
-ms-overflow-style: none; /* IE and Edge */
|
-ms-overflow-style: none;
|
||||||
scrollbar-width: none; /* Firefox */
|
/* IE and Edge */
|
||||||
|
scrollbar-width: none;
|
||||||
|
/* Firefox */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* width */
|
/* width */
|
||||||
@@ -109,6 +112,39 @@ input:autofill {
|
|||||||
box-shadow: 0px 2px 16px 0px #00000014;
|
box-shadow: 0px 2px 16px 0px #00000014;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gradient-border {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gradient-border::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
padding: 2px;
|
||||||
|
/* border thickness */
|
||||||
|
border-radius: inherit;
|
||||||
|
/* inherit border-radius from parent */
|
||||||
|
background: linear-gradient(to bottom right,
|
||||||
|
#FFFFFF 6.25%,
|
||||||
|
rgba(255, 253, 253, 0) 52.01%,
|
||||||
|
#FFFFFF 96.87%);
|
||||||
|
mask:
|
||||||
|
linear-gradient(#fff 0 0) content-box,
|
||||||
|
linear-gradient(#fff 0 0);
|
||||||
|
-webkit-mask:
|
||||||
|
linear-gradient(#fff 0 0) content-box,
|
||||||
|
linear-gradient(#fff 0 0);
|
||||||
|
-webkit-mask-composite: xor;
|
||||||
|
mask-composite: exclude;
|
||||||
|
pointer-events: none;
|
||||||
|
/* so it doesn't block interactions */
|
||||||
|
z-index: -1;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@theme inline {
|
@theme inline {
|
||||||
--color-background: var(--background);
|
--color-background: var(--background);
|
||||||
--color-foreground: var(--foreground);
|
--color-foreground: var(--foreground);
|
||||||
@@ -216,6 +252,7 @@ input:autofill {
|
|||||||
* {
|
* {
|
||||||
@apply border-border outline-ring/50;
|
@apply border-border outline-ring/50;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export type TabContainerClassName = {
|
|||||||
|
|
||||||
export const TabContainerClassNames: TabContainerClassName = {
|
export const TabContainerClassNames: TabContainerClassName = {
|
||||||
wrapper: 'h-full',
|
wrapper: 'h-full',
|
||||||
scrollView: 'h-[72px] !pt-3 !pb-2 w-full overflow-y-hidden bg-[#FFFFFF70] justify-center border border-2 border-solid border-white rounded-[32px] inline-flex items-center gap-10',
|
scrollView: 'h-[72px] gradient-border !pt-3 !pb-2 w-full overflow-y-hidden bg-[#FFFFFF70] justify-center rounded-[32px] inline-flex items-center gap-10',
|
||||||
header: '',
|
header: '',
|
||||||
headerDeactive: '',
|
headerDeactive: '',
|
||||||
headerActive: '',
|
headerActive: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user