# Interaction States URL: /react/components/concepts/interaction-states Source: https://github.com/daangn/seed-design/blob/dev/docs/content/react/components/concepts/interaction-states.mdx 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 Environment | Trigger | Displayed Style | | ------------------ | --------------------------------- | --------------- | | Mouse | When hovering cursor over element | pressed style | | Touch | When pressing and holding element | pressed style | The hover style in a mouse environment and the active style in a touch environment are generally the same. | Token | theme-light | theme-dark | | --- | --- | --- | | $color.bg.brand-solid-pressed | $color.palette.carrot-700 | $color.palette.carrot-800 | | $color.bg.brand-weak-pressed | $color.palette.carrot-200 | $color.palette.carrot-200 | | $color.bg.critical-solid-pressed | $color.palette.red-800 | $color.palette.red-700 | | $color.bg.critical-weak-pressed | $color.palette.red-200 | $color.palette.red-200 | | $color.bg.informative-solid-pressed | $color.palette.blue-800 | $color.palette.blue-700 | | $color.bg.informative-weak-pressed | $color.palette.blue-200 | $color.palette.blue-200 | | $color.bg.layer-default-pressed | $color.palette.gray-100 | $color.palette.gray-300 | | $color.bg.layer-floating-pressed | $color.palette.gray-100 | $color.palette.gray-300 | | $color.bg.neutral-inverted-pressed | $color.palette.gray-800 | $color.palette.gray-800 | | $color.bg.neutral-weak-alpha-pressed | $color.palette.static-black-alpha-300 | $color.palette.static-white-alpha-300 | | $color.bg.neutral-weak-pressed | $color.palette.gray-300 | $color.palette.gray-400 | | $color.bg.positive-solid-pressed | $color.palette.green-800 | $color.palette.green-600 | | $color.bg.positive-weak-pressed | $color.palette.green-200 | $color.palette.green-200 | | $color.bg.transparent-pressed | $color.palette.static-black-alpha-100 | $color.palette.static-white-alpha-50 | | $color.bg.transparent-selected-pressed | $color.palette.static-black-alpha-300 | $color.palette.static-white-alpha-200 | | $color.bg.warning-solid-pressed | $color.palette.yellow-400 | $color.palette.yellow-900 | | $color.bg.warning-weak-pressed | $color.palette.yellow-200 | $color.palette.yellow-200 | ### CSS Crispy CSS distinguishes devices by combining `@media (hover)` and `@media (pointer)` media queries. ```css /* 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. ## Preview ```tsx import { ActionButton } from "seed-design/ui/action-button"; export default function ActionButtonPreview() { return Label; } ```