# Scale URL: /foundations/feedback/scale Source: https://github.com/daangn/seed-design/blob/dev/docs/content/foundations/feedback/scale.mdx Clickable elements become slightly smaller while pressed. Crispy defines the reduction amount as a distance rather than a ratio so the pressed feeling is consistent across all elements. Clickable elements become slightly smaller while pressed. This borrows the sensation of a physical button being pressed in, allowing users to immediately perceive that their finger input reached the element. ![Comparison of button in default and pressed states — the pressed one is smaller than the original size indicated by dotted line]() The important thing is that **the amount of pressed feeling is consistent across all elements**. To achieve this, Crispy defines the reduction amount as a distance rather than a ratio. Using a fixed ratio (e.g., 0.98) for each element has the limitation that the actual distance moved changes when the element's size changes. | Element Size (Width × Height) | Specified Ratio | Horizontal Reduction | Vertical Reduction | | ----------------------------- | --------------- | -------------------- | ------------------ | | 80 × 52 | 0.98 | 1.6px | 1.04px | | 160 × 52 | 0.98 | 3.2px | 1.04px | | 343 × 52 (full mobile width) | 0.98 | 6.9px | 1.04px | | 720 × 52 (full tablet width) | 0.98 | 14.4px | 1.04px | Vertical reduction is the same for all, but horizontal reduction varies up to 9 times. Since this value has no upper limit, it becomes increasingly unnatural on larger screens. That's why Crispy defines that **elements shrink by a set distance when pressed**. The ratio is not a predetermined value but a result calculated from the element's actual size. Since the distance moved is the same whether the element is large or small, the pressed feeling is conveyed consistently regardless of what is pressed on which screen. ## Calculation Method The reduction amount is `2px` vertically. When pressed, elements shrink by this amount vertically. The value that determines which length this distance is subtracted from is called the **basis length**. ``` basis = max(element height, element width ÷ 4, 24) ratio = (basis - 2) ÷ basis ``` ![Button with height 40px shrinks by 2px to become ratio 0.95]() ![Button with height 100px shrinks by the same 2px to become ratio 0.98]() The basis length is fundamentally **the element's height**. In left-to-right environments, most pressable elements are wider than they are tall, so height better represents an element's size than width. Two adjustments are added to this, and the largest of the three values is used as the basis length. - **`element width ÷ 4`** — Compensates for elements that are wide and short. In elements like [List Item](/components/list) where width is much greater than height, using only height as basis causes excessive horizontal movement. The wider the element, the larger the basis length, so the same 2px becomes proportionally smaller. - **Minimum `24`** — Compensates for very small elements. If the original size is small, the reduction ratio becomes excessive even with the same 2px. A minimum basis length of 24px ensures the reduction ratio doesn't exceed 8.3%. The reduction amount `2`, width adjustment `4`, and minimum basis length `24` are fixed values applied identically across all screens using Crispy. Since the goal is consistent pressed feeling everywhere, they are not changed per element or service. ## Application Results | Element | Size (Width × Height) | Applied Basis | Calculated Ratio | Actual Reduction | | ------------ | --------------------- | ------------- | ---------------- | -------------------------------- | | Icon Button | 32 × 32 | Height | 0.938 | 2px horizontal, 2px vertical | | Text Button | 120 × 48 | Height | 0.958 | 5px horizontal, 2px vertical | | Wide Button | 343 × 48 | Width ÷ 4 | 0.977 | 8px horizontal, 1.1px vertical | | List Item | 375 × 60 | Width ÷ 4 | 0.979 | 8px horizontal, 1.3px vertical | | Small Button | 22 × 22 | Minimum 24 | 0.917 | 1.8px horizontal, 1.8px vertical | In the table, vertical reduction is 2px when basis is height. When width adjustment or minimum basis length is applied, basis becomes larger, so vertical reduction becomes less than 2px. In wide elements, vertical reduction nearly disappears, and horizontal edge movement conveys the pressed feeling instead. ## Reduction Center Point Reduction always occurs with the element's center as the reference point. ![Center point and crosshair shown at the center of button, showing reduction occurs from that point]() ## Reduction Does Not Change Position Reduction does not affect the space the element occupies. Even if the pressed element becomes smaller, surrounding elements don't move, and pressing an item in a list doesn't change the position of items above or below. ## When Applying to Custom-Built Elements When applying reduction to components not provided by Crispy, check three things in order. ### 1. Check if reduction should be applied Not all pressable elements become smaller. **Does it have a single defined area?** Reduction is applied when an element's area is captured as a single surface. It's fine if the background isn't visible in the default state. [Action Button](/components/action-button)'s ghost button and individual tabs in [Tabs](/components/tabs) have no background normally but are reduced because the area is ensured by padding and minimum height. Conversely, don't apply it to elements placed within text like link text. If wrapping occurs, the area splits into multiple lines, and boundaries aren't visible within text flow. Even if reduced, it's unclear what reduced and appears as if the font size changed. ![Action Button with surface — becomes smaller than original size when pressed]() ![Text Button without surface — size stays the same when pressed, only background and color change]() **Are sub-actions equivalent to the entire element?** Even if multiple actions exist within an element, apply reduction if the sub-action is subordinate to what the element represents. The Switch in [List Item](/components/list) changes the setting that row represents, so it's subordinate to the row. The entire row can shrink unambiguously because any tap on it handles the same target. ![Sub-action subordinate to row — List Item containing Switch responds entirely when tapped anywhere]() ![Equivalent actions side-by-side — Close and Like buttons in a card each respond individually, not the entire card]() Conversely, don't apply it when equivalent actions are side-by-side like open card, like, save, or go to author. Since each targets a different action, entire shrinking becomes ambiguous. The response is not the entire element but the actual target the user pressed, and each target has its own feedback. ### 2. Decide what shrinks ![Root Scale — entire Switch becomes smaller together]() ![Content Scale — Accordion background stays, only inner content becomes smaller]() Determine by checking if alignment, padding, and corners appear misaligned when the entire element is reduced. - **No misalignment → Root Scale.** The entire element shrinks together. Elements like [Action Button](/components/action-button) where background and content are perceived as one surface go here. Internal relationships remain intact even when everything shrinks together. - **Appears misaligned → Content Scale.** Background stays and only content shrinks. Structures like [List Item](/components/list), [Accordion](/components/accordion), or Select Box Item where the background spans full screen width with multiple elements aligned inside go here. Shrinking this structure entirely causes three things to misalign simultaneously. ![One List Item among vertically stacked items fully reduced, misaligning alignment, padding, and corners]() - **Alignment** — Elements aligned to left and right edges move inward, misaligning start lines with items above and below. - **Padding** — Background touching screen edges shrinks, changing from originally designed padding. - **Corners** — Corner radius shrinks together, misaligning curvature with surrounding elements. Background rarely changes. However, for [List Item](/components/list) where background spans full screen width with items divided by dividers, the background also expresses press by reducing horizontal padding and increasing corner radius. ### 3. Check if nested If placed inside an already-reducing element, turn off the inner element's reduction. When two reductions overlap, ratios multiply, making only the inner element excessively small. This applies to Checkmark inside [List Item](/components/list). When the entire row is pressed, Checkmark shrinks as part of the content but doesn't trigger its own separate reduction. ### Applying via utility After checking three things, there's no need to implement the formula directly. Each platform provides utilities. | Platform | Usage | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | React | Wrap the element to reduce with `ScaleFeedback`. For structures difficult to wrap, receive the same value via `useScaleFeedback` hook. The calculated ratio is also exposed as `--seed-feedback-scale` CSS variable. For cases like Content Scale needing to split background and content, apply this value only to the content side. See [Scale Feedback guide](/react/components/concepts/scale-feedback). | | Lynx | `useScaleFeedback` measures elements on Main Thread and applies transform. Connecting trigger and target to the same element creates Self Scale; connecting to different elements creates Content Scale. See [Lynx Scale Feedback guide](/lynx/components/concepts/scale-feedback). | | iOS | UIKit uses `SeedPressedEffectInteraction`, SwiftUI uses `seedScaleEffect()`. | | Android | Attaching `Modifier.dynamicScale()` for Compose automatically applies ratio based on rendered actual size. For structures using `clickable`, pass `indication = DynamicScaleIndication` instead. | Just wrapping shrinks the entire element. For elements needing Content Scale, ratio should apply only to the content area, so check platform-specific application methods. ## When Combined with Other States Elements can have press and other states simultaneously. Since reduction only occurs while pressing, the original state expression is maintained and reduction is temporarily added. ![Appearance when pressed in Selected, Loading, and Disabled states]() - **Selected** — Selected elements also shrink when pressed. Color expression showing selection state is maintained. - **Loading** — Does not shrink. An action is already in progress, so additional input isn't accepted. - **Disabled** — Does not shrink. It doesn't accept interaction, so no press response occurs. See [State](/foundations/state) for state definitions. ## Accessibility When the OS Reduce Motion setting is enabled, the ratio is always calculated as `1` and no reduction occurs. In this case, other state expressions like color change convey the press. ![When Reduce Motion is off — color change and reduction occur together]() ![When Reduce Motion is on — only color change occurs without reduction]()