Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

feat(ui): add Text Size typography scale setting and upgrade internal micro-animations to Apple fluid spring physics

Deepender25a645343ae739
diff --git a/shared/types.ts b/shared/types.ts
index 2749a39..53e414f 100644
--- a/shared/types.ts
+++ b/shared/types.ts
@@ -162,6 +162,8 @@ export interface Settings {
lastSeenChangelogVersion?: string
/** When true, hovering cursor near edge activates the panel. When false, panel opens exclusively via Alt + C. Default: true. */
hoverActivation?: boolean
+ /** Font size scale multiplier (0.85 = Small, 1.00 = Normal, 1.15 = Large, 1.30 = XL). Default: 1.0. */
+ fontSizeScale?: number
}
export const DEFAULT_SETTINGS: Settings = {
@@ -189,7 +191,8 @@ export const DEFAULT_SETTINGS: Settings = {
showEdgeLocationHint: true,
soundEffects: true,
lastSeenChangelogVersion: undefined,
- hoverActivation: true
+ hoverActivation: true,
+ fontSizeScale: 1.0
}
diff --git a/src/App.tsx b/src/App.tsx
index 98c1d15..06d18ca 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -95,7 +95,9 @@ export default function App() {
// Apply theme whenever settings change.
useEffect(() => {
applyReduceMotion(settings.reduceMotion)
- }, [settings.reduceMotion])
+ const scale = settings.fontSizeScale ?? 1.0
+ document.documentElement.style.setProperty('--font-scale', String(scale))
+ }, [settings.reduceMotion, settings.fontSizeScale])
return <Panel />
}
diff --git a/src/components/ClipboardItem.tsx b/src/components/ClipboardItem.tsx
index da502d9..ae4ae60 100644
--- a/src/components/ClipboardItem.tsx
+++ b/src/components/ClipboardItem.tsx
@@ -108,20 +108,20 @@ function ClipboardItemBase({ item }: Props) {
return (
<motion.div
- layout
- layoutId={`card-${item.id}`}
- initial={open ? { opacity: 0, y: 6, scale: 0.97 } : false}
- animate={{ opacity: 1, y: 0, scale: 1 }}
- exit={{ opacity: 0, scale: 0.96, transition: { duration: 0.1, ease: 'easeIn' } }}
+ layout="position"
+ initial={open ? { opacity: 0, scale: 0.96, y: 6 } : false}
+ animate={{ opacity: 1, scale: 1, y: 0 }}
+ exit={{ opacity: 0, scale: 0.95, y: -4, transition: { duration: 0.12, ease: [0.32, 0, 0.67, 0] } }}
transition={{
- layout: { type: 'spring', stiffness: 500, damping: 32 },
+ layout: { type: 'spring', stiffness: 280, damping: 28, mass: 0.8 },
type: 'spring',
- stiffness: 500,
- damping: 38,
- mass: 0.6,
+ stiffness: 300,
+ damping: 30,
+ mass: 0.8,
restDelta: 0.001,
restSpeed: 0.001
}}
+ style={{ willChange: 'transform, opacity' }}
className={`item${item.pinned ? ' pinned' : ''}${isBundle ? ' bundle' : ''}`}
>
{copied && (
diff --git a/src/components/ItemList.tsx b/src/components/ItemList.tsx
index 6b46fc5..0a2e7be 100644
--- a/src/components/ItemList.tsx
+++ b/src/components/ItemList.tsx
@@ -187,7 +187,6 @@ export function ItemList() {
<motion.div
className="list"
ref={listRef}
- layoutScroll
onDragOver={handleDragOver}
onDragLeave={handleDragLeaveOrDrop}
onDrop={handleDragLeaveOrDrop}
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index 3d4854d..4ad73d5 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -242,10 +242,10 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
{activeTab === 'behaviour' && (
<motion.div
key="tab-behaviour"
- initial={{ opacity: 0, y: 6 }}
- animate={{ opacity: 1, y: 0 }}
- exit={{ opacity: 0, y: -6 }}
- transition={{ duration: 0.16, ease: 'easeOut' }}
+ initial={{ opacity: 0, scale: 0.98, y: 4 }}
+ animate={{ opacity: 1, scale: 1, y: 0 }}
+ exit={{ opacity: 0, scale: 0.98, y: -4 }}
+ transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
>
{/* ── GROUP: Behaviour ─────────────────────────────────── */}
<div className="setting-group-label">Behaviour</div>
@@ -412,10 +412,10 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
{activeTab === 'position' && (
<motion.div
key="tab-position"
- initial={{ opacity: 0, y: 6 }}
- animate={{ opacity: 1, y: 0 }}
- exit={{ opacity: 0, y: -6 }}
- transition={{ duration: 0.16, ease: 'easeOut' }}
+ initial={{ opacity: 0, scale: 0.98, y: 4 }}
+ animate={{ opacity: 1, scale: 1, y: 0 }}
+ exit={{ opacity: 0, scale: 0.98, y: -4 }}
+ transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
>
{/* ── GROUP: Position ──────────────────────────────────── */}
<div className="setting-group-label">Position</div>
@@ -697,10 +697,10 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
{activeTab === 'appearance' && (
<motion.div
key="tab-appearance"
- initial={{ opacity: 0, y: 6 }}
- animate={{ opacity: 1, y: 0 }}
- exit={{ opacity: 0, y: -6 }}
- transition={{ duration: 0.16, ease: 'easeOut' }}
+ initial={{ opacity: 0, scale: 0.98, y: 4 }}
+ animate={{ opacity: 1, scale: 1, y: 0 }}
+ exit={{ opacity: 0, scale: 0.98, y: -4 }}
+ transition={{ duration: 0.2, ease: [0.16, 1, 0.3, 1] }}
>
{/* ── GROUP: Copy Indicator ────────────────────────────── */}
<div className="setting-group-label">Copy Indicator</div>
@@ -873,6 +873,36 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
</>
)}
+ {/* ── GROUP: Typography ────────────────────────────────── */}
+ <div className="setting-group-label" style={{ marginTop: 20 }}>Typography</div>
+
+ <div className="setting-row vertical">
+ <div className="setting-info">
+ <div className="setting-title">Text size</div>
+ <div className="setting-desc">Adjust UI typography scale across Edge-Drop</div>
+ </div>
+ <div className="setting-pills">
+ {[
+ { label: 'Small', val: 0.85 },
+ { label: 'Normal', val: 1.0 },
+ { label: 'Large', val: 1.15 }
+ ].map((opt) => (
+ <button
+ key={opt.label}
+ className={`pill ${Math.abs((settings.fontSizeScale ?? 1.0) - opt.val) < 0.05 ? 'active' : ''}`}
+ onClick={() => {
+ playButtonClickSound()
+ patch({ fontSizeScale: opt.val })
+ }}
+ >
+ {opt.label}
+ </button>
+ ))}
+ </div>
+ </div>
+
+ <div className="setting-divider" />
+
{/* ── GROUP: Audio & Feedback ──────────────────────────── */}
<div className="setting-group-label" style={{ marginTop: 20 }}>Audio & Feedback</div>
diff --git a/src/hooks/useAdaptiveSpring.ts b/src/hooks/useAdaptiveSpring.ts
index 9c54eac..5b08409 100644
--- a/src/hooks/useAdaptiveSpring.ts
+++ b/src/hooks/useAdaptiveSpring.ts
@@ -20,23 +20,23 @@ export function useAdaptiveSpring() {
}
if (dpr >= 1.75) {
- // Hi-DPI (2×+): critically damped, settles in ≈8 frames at 120Hz.
+ // Hi-DPI (2×+): Apple fluid spring curve
return {
type: 'spring',
- stiffness: 480,
- damping: 42,
- mass: 0.7,
+ stiffness: 320,
+ damping: 30,
+ mass: 0.8,
restDelta: 0.001,
restSpeed: 0.001
} as const
}
- // Standard DPI: slightly springy but no overshoot.
+ // Standard DPI: smooth fluid spring curve
return {
type: 'spring',
- stiffness: 420,
- damping: 38,
- mass: 0.7,
+ stiffness: 300,
+ damping: 28,
+ mass: 0.8,
restDelta: 0.001,
restSpeed: 0.001
} as const
diff --git a/src/styles/global.css b/src/styles/global.css
index 4ae7ff9..976638f 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -29,7 +29,7 @@ html {
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
- font-size: 13px;
+ font-size: calc(13px * var(--font-scale, 1));
line-height: 1.48;
color: var(--text-primary);
background: transparent;
diff --git a/src/styles/item.css b/src/styles/item.css
index 57eb39c..38b1790 100644
--- a/src/styles/item.css
+++ b/src/styles/item.css
@@ -46,7 +46,7 @@
gap: 10px;
}
.list.compact .preview {
- font-size: 12px;
+ font-size: calc(12px * var(--font-scale, 1));
line-height: 1.35;
}
@@ -81,7 +81,7 @@
.preview {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
- font-size: 13.5px;
+ font-size: calc(13.5px * var(--font-scale, 1));
line-height: 1.45;
color: rgba(255, 255, 255, 0.92);
font-weight: 450;
@@ -105,7 +105,7 @@
flex-wrap: wrap;
gap: 8px;
font-family: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, monospace;
- font-size: 10px;
+ font-size: calc(10px * var(--font-scale, 1));
color: rgba(255, 255, 255, 0.45);
font-weight: 400;
letter-spacing: 0.03em;
@@ -387,7 +387,7 @@
padding: 8px 12px;
background: rgba(40, 40, 40, 0.6);
border-radius: 6px;
- font-size: 13px;
+ font-size: calc(13px * var(--font-scale, 1));
color: rgba(255, 255, 255, 0.85);
cursor: grab;
border: 1px solid rgba(255, 255, 255, 0.05);
@@ -429,20 +429,20 @@
gap: 2px;
}
.fluid-list-text {
- font-size: 13px;
+ font-size: calc(13px * var(--font-scale, 1));
color: rgba(255, 255, 255, 0.9);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.fluid-list-sub {
- font-size: 11px;
+ font-size: calc(11px * var(--font-scale, 1));
color: rgba(255, 255, 255, 0.4);
}
/* "N / 10" capacity readout next to the bundle actions pill */
.bundle-capacity {
- font-size: 11px;
+ font-size: calc(11px * var(--font-scale, 1));
font-weight: 600;
letter-spacing: 0.02em;
color: rgba(255, 255, 255, 0.45);
@@ -474,14 +474,14 @@
gap: 2px;
}
.single-file-sub {
- font-size: 11px;
+ font-size: calc(11px * var(--font-scale, 1));
color: rgba(255, 255, 255, 0.4);
text-transform: lowercase;
}
.bundle-more-label {
color: var(--text-tertiary);
- font-size: 12px;
+ font-size: calc(12px * var(--font-scale, 1));
padding-left: 4px;
margin-top: 8px;
}
@@ -553,7 +553,7 @@
}
.tutorial-title {
- font-size: 10px;
+ font-size: calc(10px * var(--font-scale, 1));
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.05em;
@@ -561,7 +561,7 @@
}
.tutorial-instruction {
- font-size: 13px;
+ font-size: calc(13px * var(--font-scale, 1));
line-height: 1.45;
color: rgba(255, 255, 255, 0.95);
font-weight: 500;
diff --git a/src/styles/panel.css b/src/styles/panel.css
index 7495f61..6a11248 100644
--- a/src/styles/panel.css
+++ b/src/styles/panel.css
@@ -126,7 +126,7 @@
}
.header .title {
- font-size: 13px;
+ font-size: calc(13px * var(--font-scale, 1));
font-weight: 600;
letter-spacing: 0.02em;
color: var(--text-secondary);
@@ -196,13 +196,16 @@
position: relative;
z-index: 1;
scrollbar-width: none; /* Firefox */
+ scroll-behavior: smooth;
+ -webkit-overflow-scrolling: touch;
+ overscroll-behavior-y: contain;
}
.list::-webkit-scrollbar {
display: none; /* Chrome/Safari */
}
.section-label {
- font-size: 12px;
+ font-size: calc(12px * var(--font-scale, 1));
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
@@ -243,7 +246,7 @@
display: flex;
align-items: center;
gap: 6px;
- font-size: 11.5px;
+ font-size: calc(11.5px * var(--font-scale, 1));
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
@@ -252,7 +255,7 @@
.pinned-count-badge {
background: transparent;
color: rgba(255, 255, 255, 0.55);
- font-size: 11.5px;
+ font-size: calc(11.5px * var(--font-scale, 1));
font-weight: 600;
padding: 0;
border-radius: 0;
@@ -265,7 +268,7 @@
gap: 6px;
}
.pinned-toggle-hint {
- font-size: 10.5px;
+ font-size: calc(10.5px * var(--font-scale, 1));
font-weight: 500;
color: rgba(255, 255, 255, 0.6);
text-transform: none;
@@ -308,13 +311,13 @@
max-width: 220px;
}
.empty .title {
- font-size: 15px;
+ font-size: calc(15px * var(--font-scale, 1));
font-weight: 600;
color: #ffffff;
letter-spacing: 0.01em;
}
.empty .hint {
- font-size: 13px;
+ font-size: calc(13px * var(--font-scale, 1));
line-height: 1.45;
color: #a1a1aa;
}
@@ -332,23 +335,29 @@
-webkit-font-smoothing: antialiased;
}
.footer .count {
- font-size: 13px;
+ font-size: calc(12.5px * var(--font-scale, 1));
font-weight: 500;
color: #e4e4e7;
letter-spacing: 0.01em;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ min-width: 0;
}
.footer .spacer {
flex: 1;
}
.footer .text-btn {
- font-size: 13px;
+ font-size: calc(12.5px * var(--font-scale, 1));
font-weight: 500;
color: #f4f4f5;
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.15);
- padding: 6px 14px;
+ padding: 5px 12px;
border-radius: var(--radius-pill);
cursor: pointer;
+ white-space: nowrap;
+ flex-shrink: 0;
transition: all var(--dur-fast) var(--ease-out);
}
.footer .text-btn:hover:not(:disabled) {
@@ -396,7 +405,7 @@
gap: 8px;
max-width: 100%;
padding: 9px 16px;
- font-size: 12.5px;
+ font-size: calc(12.5px * var(--font-scale, 1));
font-weight: 500;
color: rgba(255, 255, 255, 0.92);
border-radius: 999px;
diff --git a/src/styles/settings.css b/src/styles/settings.css
index ce35b32..75ac8ce 100644
--- a/src/styles/settings.css
+++ b/src/styles/settings.css
@@ -37,12 +37,13 @@
.settings-tab-btn {
position: relative;
flex: 1;
+ min-width: 0;
display: flex;
align-items: center;
justify-content: center;
- padding: 7px 4px;
+ padding: 6px 2px;
border-radius: 7px;
- font-size: 12px;
+ font-size: calc(11.5px * var(--font-scale, 1));
font-weight: 500;
color: rgba(255, 255, 255, 0.65);
background: transparent;
@@ -53,6 +54,8 @@
-webkit-font-smoothing: antialiased;
letter-spacing: 0.01em;
white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.settings-tab-btn:hover:not(.active) {
@@ -104,14 +107,14 @@
}
.setting-title {
- font-size: 14px;
+ font-size: calc(14px * var(--font-scale, 1));
font-weight: 600;
color: #ffffff;
letter-spacing: 0.01em;
}
.setting-desc {
- font-size: 12.5px;
+ font-size: calc(12.5px * var(--font-scale, 1));
font-weight: 400;
color: rgba(255, 255, 255, 0.78);
line-height: 1.48;
@@ -125,7 +128,7 @@
}
.setting-group-label {
- font-size: 11px;
+ font-size: calc(11px * var(--font-scale, 1));
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
@@ -143,7 +146,7 @@
align-items: center;
margin-top: 4px;
padding: 2px 7px;
- font-size: 10px;
+ font-size: calc(10px * var(--font-scale, 1));
font-weight: 500;
color: rgba(255, 255, 255, 0.55);
background: rgba(255, 255, 255, 0.04);
@@ -181,7 +184,7 @@
}
.setting-slider-val {
- font-size: 11px;
+ font-size: calc(11px * var(--font-scale, 1));
font-weight: 600;
font-family: 'JetBrains Mono', -apple-system, BlinkMacSystemFont, monospace;
color: #ffffff;
@@ -298,9 +301,10 @@
.pill {
flex: 1;
- padding: 7px 0;
+ min-width: 0;
+ padding: 6px 2px;
border-radius: 6px;
- font-size: 12.5px;
+ font-size: calc(11.5px * var(--font-scale, 1));
font-weight: 500;
color: #a1a1aa;
background: transparent;
@@ -308,6 +312,10 @@
cursor: pointer;
transition: all 0.15s ease;
-webkit-font-smoothing: antialiased;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ text-align: center;
}
.pill:hover:not(.active) {
@@ -331,11 +339,11 @@
line-height: 1.2;
}
.display-pill .pill-name {
- font-size: 12px;
+ font-size: calc(12px * var(--font-scale, 1));
font-weight: 600;
}
.display-pill .pill-res {
- font-size: 10px;
+ font-size: calc(10px * var(--font-scale, 1));
opacity: 0.7;
}
diff --git a/src/styles/tokens.css b/src/styles/tokens.css
index b5f3673..c491710 100644
--- a/src/styles/tokens.css
+++ b/src/styles/tokens.css
@@ -42,6 +42,9 @@
--dur-fast: 140ms;
--dur-base: 240ms;
+ /* Typography scale */
+ --font-scale: 1;
+
/* Layout */
--panel-width: 270px;
--gap: 12px;