React

Interaction States

Explains how Crispy React components apply interaction styles according to device environment.

Crispy React components provide appropriate interaction feedback in both mobile touch and desktop mouse environments. No additional configuration is required; it is included in the Crispy React component.

Device-Adaptive Styles

In Crispy, component specs and color tokens only define the pressed state. Crispy React displays this pressed style at different times depending on the device environment.

Device EnvironmentTriggerDisplayed Style
MouseWhen hovering cursor over elementpressed style
TouchWhen pressing and holding elementpressed style

The hover style in a mouse environment and the active style in a touch environment are generally the same.

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)

CSS

Crispy CSS distinguishes devices by combining @media (hover) and @media (pointer) media queries.

/* Mouse environment: pressed color applied on hover */
@media (hover: hover) and (pointer: fine) {
  .seed-action-button--variant_brandSolid:is(:hover, [data-hover]) {
    background: var(--seed-color-bg-brand-solid-pressed);
  }
}

/* Touch environment: pressed color applied on active */
@media not all and (hover: hover) and (pointer: fine) {
  .seed-action-button--variant_brandSolid:is(:active, [data-active]) {
    background: var(--seed-color-bg-brand-solid-pressed);
  }
}

Keyboard Focus Styles

When navigating a web page with the keyboard, a focus ring is displayed so users can visually recognize the currently focused element. Crispy React components include keyboard-specific styles by default.

Keyboard focus styles are always displayed when navigating with a keyboard, regardless of device environment.

Table of contents