Foundations

Feedback

Feedback is an immediate response to user input. It communicates that an element is interactive and that the input has been received.

Feedback cover image

Color is the most basic way to signal a press. By simply changing the surface color, users can immediately know where they pressed and whether their input reached the element.

Comparison of button in default and pressed states — the pressed one has a darker surface color revealing where it was pressed

Color fulfills this role because it works in any environment. Scale doesn't work with OS motion reduction settings, and Haptic isn't delivered depending on the device, but color transitions aren't affected by settings. That's why Crispy applies color to all pressable elements and adds other feedback elements on top.

Pressed color is defined as a token

Comparison of button in default and pressed states — surface color changes from bg.brand-solid to bg.brand-solid-pressed while label color remains the same

Crispy defines the pressed state color as a token. Within the role-based color system, tokens with -pressed are placed, and each component specifies which token to use when pressed. Action Button's brandSolid uses $color.bg.brand-solid in the default state and $color.bg.brand-solid-pressed when pressed.

Color changes only on the surface

Do — When a menu item is pressed, only the surface color darkens while text and icon colors remain unchanged

Don't — When a menu item is pressed, text and icon colors also dim together

Color transition occurs on the element's surface. For elements with a surface, the colors of text and icons placed on top don't respond to the press. If both surface and text color change, it reads as if the entire element has been replaced with a different element. We don't provide pressed tokens for foreground.

When applying to custom-built elements

When defining pressed color for components not provided by Crispy, check three things in order.

1. Find the pressed token corresponding to the base color

Don't create a new pressed color; choose from already-defined tokens. The token with -pressed appended to the base token name is its pair. If the background is $color.bg.neutral-weak, use $color.bg.neutral-weak-pressed when pressed.

2. When the default state has no background color

Comparison of ghost button in default and pressed states — normally has no background token, but bg.transparent-pressed surface appears when pressed

Elements without background color in the default state also gain a surface when pressed. In Crispy, Action Button's ghost button falls into this category. Normally only text is visible, but a background appears when pressed, revealing the pressed area.

Use $color.bg.transparent-pressed for the surface color. Since it's an alpha value, it blends with any background color beneath it. However, for components placed on floating layers like FAB or Action Sheet, use $color.bg.layer-floating-pressed.

Corner radius is not provided as a common value; each component defines it directly.

3. Check if color should not be used

Pressing a Switch — only scale reduction occurs while colors indicating on/off remain unchanged

Pressing an individual tab — only scale reduction occurs while color indicating selection changes after release

If color already represents the element's state, don't use color for press feedback. Switch uses color to distinguish on/off, and individual tabs distinguish selected/unselected. If color changes while pressing these elements, the state appears to change before releasing the finger. So keep the color unchanged and convey the press using scale alone.

Pressed Tokens

NameValue
브랜드와 관련된 요소들이 즉각적으로 인식될 수 있도록 돕습니다. 화면에서 가장 중요한 액션을 강조하는데 사용할 수 있습니다. (solid-pressed)
브랜드와 관련된 요소들이 즉각적으로 인식될 수 있도록 돕습니다. 화면에서 가장 중요한 액션을 강조하는데 사용할 수 있습니다. (weak-pressed)
오류, 경고 또는 중요한 문제를 나타내는 데 사용됩니다. (solid-pressed)
오류, 경고 또는 중요한 문제를 나타내는 데 사용됩니다. (weak-pressed)
사용자에게 유용한 정보를 제공하거나 상태를 설명할 때 사용됩니다. (solid-pressed)
사용자에게 유용한 정보를 제공하거나 상태를 설명할 때 사용됩니다. (weak-pressed)
basement 바로 위에 놓이는 기본 표면입니다. 대부분의 스크린 콘텐츠(List, TextField 등)가 이 레이어 위에서 표현됩니다. (pressed)
화면의 모든 콘텐츠 위를 덮으며(floating) 나타나는 임시 레이어입니다. 사용자의 상호작용을 필요로 하는 모달(Modal)성 요소들이 여기에 속합니다. (pressed)
일반적인 콘텐츠에 사용되는 기본 색상입니다. (inverted-pressed)
일반적인 콘텐츠에 사용되는 기본 색상입니다. (solid-muted-pressed)
일반적인 콘텐츠에 사용되는 기본 색상입니다. (weak-alpha-pressed) `$color.layer.basement` 위에서 컴포넌트의 가시성을 보장하기 위해 사용됩니다.
일반적인 콘텐츠에 사용되는 기본 색상입니다. (weak-pressed)
성공적인 작업, 확인, 또는 긍정적인 상태를 나타내는 데 사용됩니다. (solid-pressed)
성공적인 작업, 확인, 또는 긍정적인 상태를 나타내는 데 사용됩니다. (weak-pressed)
사용자의 주의가 필요한 경고 메시지나 안내 사항을 전달하는 데 사용됩니다. (solid-pressed)
사용자의 주의가 필요한 경고 메시지나 안내 사항을 전달하는 데 사용됩니다. (weak-pressed)

Table of contents