09ジューシーボタン・入力欄
ボタンは押すと体が少し沈みオレンジの影も一緒に浅くなり、入力欄はフォーカスでライムの太い ring がふわっと広がります。シトラスキットの手触りを一つにまとめた項目です。
使いどころフォーム送信ボタン・ニュースレター入力欄
눌림·그림자 동시 감소focus 링 확산radius 12

<main class="stage">
<div class="ctrlcitrus">
<button class="ctrlcitrus__btn" type="button">保存する</button>
<label class="ctrlcitrus__field">
<span class="ctrlcitrus__label">メール</span>
<input class="ctrlcitrus__input" type="email" placeholder="メールアドレスを入力">
</label>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-loop; // 버튼이 눌렸다 돌아오는 주기
$easing: $ease-spring;
$color: $stage-ink;
$citrus-cream: #fffaf0;
$citrus-orange-deep: #bd967a;
$citrus-lime: #c4ce9c;
$citrus-lime-deep: #98af5c;
$citrus-ink: #204a17;
// 무대 — 라임 물색
@include stage(mix($citrus-lime, $stage-paper, 26%));
.ctrlcitrus {
box-sizing: border-box;
width: clamp(260px, 84vw, 340px);
display: flex;
flex-direction: column;
gap: $sp-4;
}
.ctrlcitrus__btn {
align-self: flex-start;
border: 0;
border-radius: $r-control;
background: $citrus-orange-deep;
color: $subject-ink;
padding: $sp-3 $sp-6;
font-weight: 700; font-size: clamp(12px, 3vw, 14px); line-height: 1;
font-family: inherit;
box-shadow: 0 8px 18px rgba($citrus-orange-deep, .5);
// 데모에서는 눌림을 보여주기 위해 자동 루프를 건다
animation: citrusPress $duration $easing infinite;
}
.ctrlcitrus__btn:focus-visible {
outline: 3px solid $citrus-ink;
outline-offset: 2px;
}
.ctrlcitrus__field {
display: flex;
flex-direction: column;
gap: $sp-1;
}
.ctrlcitrus__label {
color: rgba($citrus-ink, .78);
font-weight: 600; font-size: clamp(10px, 2.6vw, 12px); line-height: 1;
font-family: inherit;
}
.ctrlcitrus__input {
box-sizing: border-box;
width: 100%;
border: 0;
border-radius: $r-control;
background: $stage-paper;
color: $citrus-ink;
padding: $sp-3 $sp-4;
font-weight: 500; font-size: clamp(12px, 3vw, 14px); line-height: 1;
font-family: inherit;
box-shadow: 0 6px 14px rgba($citrus-lime-deep, .5);
// 데모: 포커스를 받은 것처럼 라임 링이 부드럽게 퍼졌다 줄어들기를 반복
animation: ringPulse $duration $easing infinite;
}
.ctrlcitrus__input::placeholder {
color: rgba($citrus-ink, .45);
}
// 데모: 버튼은 몸과 그림자가 함께 눌렸다 튕기고, 입력창은 라임 링이 숨쉰다
@keyframes citrusPress {
0%, 55%, 100% { transform: translateY(0) scaleY(1); box-shadow: 0 8px 18px rgba($citrus-orange-deep, .5); }
65% { transform: translateY(4px) scaleY(.95); box-shadow: 0 2px 6px rgba($citrus-orange-deep, .35); }
82% { transform: translateY(-3px); box-shadow: 0 12px 24px rgba($citrus-orange-deep, .55); }
}
@keyframes ringPulse {
0%, 100% { box-shadow: 0 6px 14px rgba($citrus-lime-deep, .5); }
50% { box-shadow: 0 6px 14px rgba($citrus-lime-deep, .5), 0 0 0 5px rgba($citrus-lime-deep, .4); }
}
@media (prefers-reduced-motion: reduce) {
.ctrlcitrus__btn, .ctrlcitrus__input { animation: none !important; transform: none; }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: rgb(93.9843137255%, 95.0039215686%, 89.9058823529%);
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.ctrlcitrus {
box-sizing: border-box;
width: clamp(260px, 84vw, 340px);
display: flex;
flex-direction: column;
gap: 16px;
}
.ctrlcitrus__btn {
align-self: flex-start;
border: 0;
border-radius: 12px;
background: #bd967a;
color: #17141a;
padding: 12px 24px;
font-weight: 700;
font-size: clamp(12px, 3vw, 14px);
line-height: 1;
font-family: inherit;
box-shadow: 0 8px 18px rgba(189, 150, 122, 0.5);
animation: citrusPress 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.ctrlcitrus__btn:focus-visible {
outline: 3px solid #204a17;
outline-offset: 2px;
}
.ctrlcitrus__field {
display: flex;
flex-direction: column;
gap: 4px;
}
.ctrlcitrus__label {
color: rgba(32, 74, 23, 0.78);
font-weight: 600;
font-size: clamp(10px, 2.6vw, 12px);
line-height: 1;
font-family: inherit;
}
.ctrlcitrus__input {
box-sizing: border-box;
width: 100%;
border: 0;
border-radius: 12px;
background: #ffffff;
color: #204a17;
padding: 12px 16px;
font-weight: 500;
font-size: clamp(12px, 3vw, 14px);
line-height: 1;
font-family: inherit;
box-shadow: 0 6px 14px rgba(152, 175, 92, 0.5);
animation: ringPulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.ctrlcitrus__input::placeholder {
color: rgba(32, 74, 23, 0.45);
}
@keyframes citrusPress {
0%, 55%, 100% {
transform: translateY(0) scaleY(1);
box-shadow: 0 8px 18px rgba(189, 150, 122, 0.5);
}
65% {
transform: translateY(4px) scaleY(0.95);
box-shadow: 0 2px 6px rgba(189, 150, 122, 0.35);
}
82% {
transform: translateY(-3px);
box-shadow: 0 12px 24px rgba(189, 150, 122, 0.55);
}
}
@keyframes ringPulse {
0%, 100% {
box-shadow: 0 6px 14px rgba(152, 175, 92, 0.5);
}
50% {
box-shadow: 0 6px 14px rgba(152, 175, 92, 0.5), 0 0 0 5px rgba(152, 175, 92, 0.4);
}
}
@media (prefers-reduced-motion: reduce) {
.ctrlcitrus__btn, .ctrlcitrus__input {
animation: none !important;
transform: none;
}
}import type { CSSProperties } from "react";
import styles from "./ButtonsInputsCitrus.module.scss";
export type ButtonsInputsCitrusProps = {
buttonLabel?: string;
fieldLabel?: string;
placeholder?: string;
duration?: number;
easing?: string;
color?: string;
};
type Vars = CSSProperties & { "--duration"?: string; "--easing"?: string; "--color"?: string };
export default function ButtonsInputsCitrus({
buttonLabel = "저장하기",
fieldLabel = "이메일",
placeholder = "이메일을 적어보세요",
duration = 2000,
easing = "cubic-bezier(.2,.8,.2,1)",
color = "#ff6a00",
}: ButtonsInputsCitrusProps) {
const vars: Vars = { "--duration": `${duration}ms`, "--easing": easing, "--color": color };
return (
<div className={styles.ctrlcitrus} style={vars}>
<button type="button" className={styles.btn}>{buttonLabel}</button>
<label className={styles.field}>
<span className={styles.label}>{fieldLabel}</span>
<input className={styles.input} type="email" placeholder={placeholder} />
</label>
</div>
);
}09 ジューシーボタン・入力欄 — 計測 累積面積 4.938% · 動いたフレーム 15/23GODRICH オリジナル · SCSS と React は zip に同梱 · ビタミンカラー デザイン LPキット、シトラスカラーのセクション9選
このデモが属する記事
ビタミンカラー デザイン LPキット、シトラスカラーのセクション9選ビタミンカラー デザインは、オレンジ・ライム・グレープフルーツ・レモンのように彩度の高いフルーツカラーをクリームの地に重ね、カードごとに同系色の影を落として、パステルより一段強く、夏のドリンクブランドのようにみずみずしく見せるスタイルです。 この記事のデモをすべて見る


