Skip to content

Commit a88c92c

Browse files
committed
feat(ui): increase default button and input height by 2px
1 parent 8842511 commit a88c92c

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

.changeset/tall-buttons-inputs.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/ui': patch
3+
---
4+
5+
Increase the default height of buttons and inputs by 2px for larger, easier-to-tap touch targets, especially on mobile.

packages/ui/src/foundations/sizes.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const spacingScale = Object.freeze({
1818
'0x5': { rem: '0.125rem', multiplier: 0.5 },
1919
'1': { rem: '0.25rem', multiplier: 1 },
2020
'1x5': { rem: '0.375rem', multiplier: 1.5 },
21+
'1x75': { rem: '0.4375rem', multiplier: 1.75 },
2122
'2': { rem: '0.5rem', multiplier: 2 },
2223
'2x5': { rem: '0.625rem', multiplier: 2.5 },
2324
'3': { rem: '0.75rem', multiplier: 3 },
@@ -96,6 +97,7 @@ const spaceUnits = Object.freeze({
9697
'0x5': spacingScale['0x5'].rem,
9798
'1': spacingScale['1'].rem,
9899
'1x5': spacingScale['1x5'].rem,
100+
'1x75': spacingScale['1x75'].rem,
99101
'2': spacingScale['2'].rem,
100102
'2x5': spacingScale['2x5'].rem,
101103
'3': spacingScale['3'].rem,

packages/ui/src/primitives/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const { applyVariants, filterProps } = createVariants(
4040
padding: `${theme.space.$1} ${theme.space.$3}`,
4141
},
4242
sm: {
43-
padding: `${theme.space.$1x5} ${theme.space.$3}`,
43+
padding: `${theme.space.$1x75} ${theme.space.$3}`,
4444
},
4545
md: {
4646
padding: `${theme.space.$2x5} ${theme.space.$5}`,

packages/ui/src/primitives/Input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const { applyVariants, filterProps } = createVariants((theme, props) => ({
1010
base: {
1111
boxSizing: 'border-box',
1212
margin: 0,
13-
padding: `${theme.space.$1x5} ${theme.space.$3}`,
13+
padding: `${theme.space.$1x75} ${theme.space.$3}`,
1414
backgroundColor: theme.colors.$colorInput,
1515
color: theme.colors.$colorInputForeground,
1616
// outline support for Windows contrast themes

0 commit comments

Comments
 (0)