사용자가 선택하거나 실행할 수 있는 짧은 값을 표시하는 컴포넌트입니다.
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button >
< Chip.Label >Button Chip</ Chip.Label >
</ Chip.Button >
< Chip.Toggle >
< Chip.Label >Toggle Chip</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" >
< Chip.Label >Radio Chip 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" >
< Chip.Label >Radio Chip 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
npm install @seed-design/lynx-react @seed-design/lynx-css pnpm add @seed-design/lynx-react @seed-design/lynx-css yarn add @seed-design/lynx-react @seed-design/lynx-css bun add @seed-design/lynx-react @seed-design/lynx-css
disabled?boolean | undefined
variant?"outlineStrong" | "outlineWeak" | "solid" | undefined
Type
"outlineStrong" | "outlineWeak" | "solid" | undefined
Default
"solid"
size?"large" | "medium" | "small" | undefined
Type
"large" | "medium" | "small" | undefined
Default
"medium"
layout?"iconOnly" | "withText" | undefined
Type
"iconOnly" | "withText" | undefined
Default
"withText"
glassEffect?boolean | SeedGlassEffect | undefined Draws the component with Liquid Glass. Only iOS draws it today, and only when SeedProvider has
supportsLiquidGlass. true equals {}, false turns off the effect from SeedProvider, and omitting it
inherits that effect.
Type
boolean | SeedGlassEffect | undefined
variant?"outlineStrong" | "outlineWeak" | "solid" | undefined
Type
"outlineStrong" | "outlineWeak" | "solid" | undefined
Default
"solid"
size?"large" | "medium" | "small" | undefined
Type
"large" | "medium" | "small" | undefined
Default
"medium"
layout?"iconOnly" | "withText" | undefined
Type
"iconOnly" | "withText" | undefined
Default
"withText"
checked?boolean | undefined controlled 선택 상태입니다. 지정하면 press는 onCheckedChange만 호출합니다.
Type
boolean | undefined
defaultChecked?boolean | undefined uncontrolled 초기 선택 상태입니다.
Type
boolean | undefined
Default
false
onCheckedChange?(( checked : boolean ) => void ) | undefined
glassEffect?boolean | SeedGlassEffect | undefined Draws the component with Liquid Glass. Only iOS draws it today, and only when SeedProvider has
supportsLiquidGlass. true equals {}, false turns off the effect from SeedProvider, and omitting it
inherits that effect.
Type
boolean | SeedGlassEffect | undefined
disabled?boolean | undefined
value?string | undefined controlled 선택 값입니다. 지정하면 Item 선택은 onValueChange만 호출합니다.
Type
string | undefined
defaultValue?string | undefined onValueChange?(( value : string ) => void ) | undefined
disabled?boolean | undefined true이면 모든 Item의 press·사용자 tap handler·선택 변경이 막히고
Root accessibility-traits 기본값이 "disabled"가 됩니다.
Type
boolean | undefined
Default
false
valuestring
variant?"outlineStrong" | "outlineWeak" | "solid" | undefined
Type
"outlineStrong" | "outlineWeak" | "solid" | undefined
Default
"solid"
size?"large" | "medium" | "small" | undefined
Type
"large" | "medium" | "small" | undefined
Default
"medium"
layout?"iconOnly" | "withText" | undefined
Type
"iconOnly" | "withText" | undefined
Default
"withText"
glassEffect?boolean | SeedGlassEffect | undefined Draws the component with Liquid Glass. Only iOS draws it today, and only when SeedProvider has
supportsLiquidGlass. true equals {}, false turns off the effect from SeedProvider, and omitting it
inherits that effect.
Type
boolean | SeedGlassEffect | undefined
disabled?boolean | undefined
슬롯은 고유 prop이 없습니다. className, style, children을 받습니다.
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button size = "small" >
< Chip.Label >Small Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle size = "small" >
< Chip.Label >Small Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" size = "small" >
< Chip.Label >Small Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" size = "small" >
< Chip.Label >Small Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button size = "medium" >
< Chip.Label >Medium Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle size = "medium" >
< Chip.Label >Medium Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" size = "medium" >
< Chip.Label >Medium Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" size = "medium" >
< Chip.Label >Medium Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button size = "large" >
< Chip.Label >Large Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle size = "large" >
< Chip.Label >Large Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" size = "large" >
< Chip.Label >Large Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" size = "large" >
< Chip.Label >Large Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button variant = "solid" >
< Chip.Label >Solid Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle variant = "solid" >
< Chip.Label >Solid Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" variant = "solid" >
< Chip.Label >Solid Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" variant = "solid" >
< Chip.Label >Solid Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button variant = "outlineStrong" >
< Chip.Label >Outline Strong Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle variant = "outlineStrong" >
< Chip.Label >Outline Strong Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" variant = "outlineStrong" >
< Chip.Label >Outline Strong Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" variant = "outlineStrong" >
< Chip.Label >Outline Strong Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button variant = "outlineWeak" >
< Chip.Label >Outline Weak Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle variant = "outlineWeak" >
< Chip.Label >Outline Weak Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" variant = "outlineWeak" >
< Chip.Label >Outline Weak Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" variant = "outlineWeak" >
< Chip.Label >Outline Weak Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
import "./styles" ;
import IconHeartFill from "@karrotmarket/lynx-monochrome-icon/IconHeartFill" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button >
< Chip.PrefixIcon icon = {< IconHeartFill />} />
< Chip.Label >With Icon Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle >
< Chip.PrefixIcon icon = {< IconHeartFill />} />
< Chip.Label >With Icon Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" >
< Chip.PrefixIcon icon = {< IconHeartFill />} />
< Chip.Label >With Icon Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" >
< Chip.PrefixIcon icon = {< IconHeartFill />} />
< Chip.Label >With Icon Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
import "./styles" ;
import IconChevronDownLine from "@karrotmarket/lynx-monochrome-icon/IconChevronDownLine" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button >
< Chip.Label >Button with Suffix</ Chip.Label >
< Chip.SuffixIcon icon = {< IconChevronDownLine />} />
</ Chip.Button >
< Chip.Toggle >
< Chip.Label >Toggle with Suffix</ Chip.Label >
< Chip.SuffixIcon icon = {< IconChevronDownLine />} />
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" >
< Chip.Label >Radio with Suffix 1</ Chip.Label >
< Chip.SuffixIcon icon = {< IconChevronDownLine />} />
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" >
< Chip.Label >Radio with Suffix 2</ Chip.Label >
< Chip.SuffixIcon icon = {< IconChevronDownLine />} />
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
layout="iconOnly"에서는 Icon 자식과 accessibility-label을 함께 전달합니다.
import "./styles" ;
import IconArrowClockwiseCircularLine from "@karrotmarket/lynx-monochrome-icon/IconArrowClockwiseCircularLine" ;
import IconBellLine from "@karrotmarket/lynx-monochrome-icon/IconBellLine" ;
import IconBellSlashLine from "@karrotmarket/lynx-monochrome-icon/IconBellSlashLine" ;
import IconTimer_10Line from "@karrotmarket/lynx-monochrome-icon/IconTimer_10Line" ;
import IconTimer_3Line from "@karrotmarket/lynx-monochrome-icon/IconTimer_3Line" ;
import { useState } from "@lynx-js/react" ;
import { Chip, Icon } from "@seed-design/lynx-react" ;
export default function Example () {
const [ checked , setChecked ] = useState ( false );
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button layout = "iconOnly" accessibility-label = "Refresh" >
< Icon icon = {< IconArrowClockwiseCircularLine />} />
</ Chip.Button >
< Chip.Toggle
layout = "iconOnly"
checked = {checked}
onCheckedChange = {setChecked}
accessibility-label = "Receive notifications"
>
< Icon icon = {checked ? < IconBellLine /> : < IconBellSlashLine />} />
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "3" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "3" layout = "iconOnly" accessibility-label = "3 seconds" >
< Icon icon = {< IconTimer_3Line />} />
</ Chip.RadioItem >
< Chip.RadioItem value = "10" layout = "iconOnly" accessibility-label = "10 seconds" >
< Icon icon = {< IconTimer_10Line />} />
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
Avatar 와 함께 사용할 수 있습니다.
import "./styles" ;
import { Chip } from "@seed-design/lynx-react" ;
import { Avatar } from "@/components/ui/avatar" ;
import { IdentityPlaceholder } from "@/components/ui/identity-placeholder" ;
function PrefixAvatar () {
return (
< Avatar
size = "24"
src = "https://avatars.githubusercontent.com/u/54893898?v=4"
fallback = {< IdentityPlaceholder />}
/>
);
}
export default function Example () {
return (
< view className = "chip-preview" >
< view className = "chip-preview__row" >
< Chip.Button >
< Chip.PrefixAvatar >
< PrefixAvatar />
</ Chip.PrefixAvatar >
< Chip.Label >With Avatar Button</ Chip.Label >
</ Chip.Button >
< Chip.Toggle >
< Chip.PrefixAvatar >
< PrefixAvatar />
</ Chip.PrefixAvatar >
< Chip.Label >With Avatar Toggle</ Chip.Label >
</ Chip.Toggle >
</ view >
< Chip.RadioRoot defaultValue = "option1" >
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" >
< Chip.PrefixAvatar >
< PrefixAvatar />
</ Chip.PrefixAvatar >
< Chip.Label >With Avatar Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" >
< Chip.PrefixAvatar >
< PrefixAvatar />
</ Chip.PrefixAvatar >
< Chip.Label >With Avatar Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
</ view >
);
}
Chip.Toggle은 onCheckedChange, Chip.RadioRoot는 onValueChange로 선택 값 변경을 알립니다.
import "./styles" ;
import { useState } from "@lynx-js/react" ;
import { Chip } from "@seed-design/lynx-react" ;
export default function Example () {
const [ toggleCount , setToggleCount ] = useState ( 0 );
const [ toggleLastValue , setToggleLastValue ] = useState < boolean | null >( null );
const [ radioCount , setRadioCount ] = useState ( 0 );
const [ radioLastValue , setRadioLastValue ] = useState < string | null >( null );
return (
< view className = "chip-preview" >
< view className = "chip-preview__group" >
< Chip.Toggle
onCheckedChange = {( checked ) => {
setToggleCount (( previous ) => previous + 1 );
setToggleLastValue (checked);
}}
>
< Chip.Label >Toggle Chip</ Chip.Label >
</ Chip.Toggle >
< text className = "chip-preview__status" >
onCheckedChange called: {toggleCount} times, last value:{ " " }
{toggleLastValue === null ? "-" : JSON . stringify (toggleLastValue)}
</ text >
</ view >
< view className = "chip-preview__group" >
< Chip.RadioRoot
defaultValue = "option1"
onValueChange = {( value ) => {
setRadioCount (( previous ) => previous + 1 );
setRadioLastValue (value);
}}
>
< view className = "chip-preview__row" >
< Chip.RadioItem value = "option1" >
< Chip.Label >Radio 1</ Chip.Label >
</ Chip.RadioItem >
< Chip.RadioItem value = "option2" >
< Chip.Label >Radio 2</ Chip.Label >
</ Chip.RadioItem >
</ view >
</ Chip.RadioRoot >
< text className = "chip-preview__status" >
onValueChange called: {radioCount} times, last value: {radioLastValue ?? "-" }
</ text >
</ view >
</ view >
);
}
glassEffect로 iOS Liquid Glass를 적용합니다. style은 glass 재질("regular"·"clear")을, interactive는 glass가 터치에 직접 반응할지를 정합니다. glass일 때는 현재 상태의 배경색이 glass tint가 되고, 테두리를 그리지 않습니다.
import "./styles" ;
import { useState } from "@lynx-js/react" ;
import { Chip, SeedProvider, VStack } from "@seed-design/lynx-react" ;
import { Switch } from "@/components/ui/switch" ;
// 이 예제만 호스트 지원 여부를 직접 판단합니다. 앱에서는 root `SeedProvider`에 호스트가 준 값을 넘기세요.
const supportsLiquidGlass =
typeof SystemInfo !== "undefined" &&
SystemInfo.platform === "iOS" &&
Number. parseInt (SystemInfo.osVersion, 10 ) >= 26 ;
export default function Example () {
const [ clear , setClear ] = useState ( false );
const [ interactive , setInteractive ] = useState ( true );
function handleClearChange ( checked : boolean ) {
"background only" ;
setClear (checked);
}
function handleInteractiveChange ( checked : boolean ) {
"background only" ;
setInteractive (checked);
}
const glassEffect = { style: clear ? "clear" : "regular" , interactive } as const ;
return (
< SeedProvider supportsLiquidGlass = {supportsLiquidGlass}>
< VStack align = "center" gap = "x6" >
< view className = "chip-preview__row" >
< Chip.Toggle glassEffect = {glassEffect} defaultChecked >
< Chip.Label >Toggle 1</ Chip.Label >
</ Chip.Toggle >
< Chip.Toggle glassEffect = {glassEffect}>
< Chip.Label >Toggle 2</ Chip.Label >
</ Chip.Toggle >
< Chip.Button glassEffect = {glassEffect}>
< Chip.Label >Button</ Chip.Label >
</ Chip.Button >
</ view >
< VStack gap = "x3" >
< Switch
size = "16"
tone = "neutral"
label = "Clear style"
checked = {clear}
onCheckedChange = {handleClearChange}
/>
< Switch
size = "16"
tone = "neutral"
label = "Interactive"
checked = {interactive}
onCheckedChange = {handleInteractiveChange}
/>
</ VStack >
</ VStack >
</ SeedProvider >
);
}
Liquid Glass는 실험적인 구현입니다. 앱 root SeedProvider에 supportsLiquidGlass를 넘겨야 활성화되며, 지금은 iOS 26 이상에서만 그립니다. 활성화 방법과 제약은 Host Integration 을 참고하세요. 이 예제는 미리보기를 위해 예제 안에서만 supportsLiquidGlass를 켭니다.
Chip.Root·ChipRoot(Props 타입 포함)를 제거했습니다. React와 같이 Chip.Button·ChipButton을 사용하세요. 동작과 스타일은 같습니다.
Chip.Toggle의 기본 accessibility-role-description이 "toggle"에서 "checkbox"로 바뀌었습니다. 이전 값이 필요하면 accessibility-role-description을 직접 전달하세요.
Chip.RadioRoot는 radiogroup 역할을 전달하지만 기본적으로 접근성 요소가 아닌 컨테이너입니다. 각 Chip.RadioItem이 독립된 접근성 요소로 노출됩니다. disabled이면 accessibility-traits 기본값은 "disabled"입니다.
Chip.Toggle과 Chip.RadioItem의 bindtap이 선택 상태를 바꾸기 전에 호출됩니다. tap handler에서 바뀐 선택 값을 읽던 코드는 onCheckedChange나 Chip.RadioRoot의 onValueChange로 옮기세요.
탭 이벤트는 onClick 대신 bindtap으로 받습니다. 선택 변경은 onCheckedChange 또는 onValueChange로 확인합니다.
접근성 역할과 상태는 Lynx의 accessibility-role-description, accessibility-value, accessibility-traits로 전달합니다.
문자열 label을 파악할 수 없는 구성에는 accessibility-label을 지정하세요.
Lynx Chip은 별도 Registry snippet 없이 @seed-design/lynx-react에서 제공합니다.
HiddenInput과 HTML form 속성
Chip.Toggle의 indeterminate
Chip.RadioRoot의 invalid
키보드 focus와 focusVisible
asChild