# Result Section URL: /lynx/components/result-section Source: https://github.com/daangn/seed-design/blob/dev/docs/content/lynx/components/result-section.mdx A template that provides results of user actions, such as data loading results or whether a user action was completed. It typically occupies the full screen or a specific area to guide the next action or inform the current situation. Lynx Engine 최소 버전: 3.6 사용 가능 버전: @seed-design/lynx-react@0.6.0, @seed-design/lynx-css@0.10.0 ## Preview ```tsx import "./styles"; import IconDiamond from "@karrotmarket/lynx-multicolor-icon/IconDiamond"; import { useState } from "@lynx-js/react"; import { Box, Icon, VStack, useSeedClassName } from "@seed-design/lynx-react"; import { ResultSection } from "@/components/ui/result-section"; export default function Example() { const seedClassName = useSeedClassName({ colorMode: "system" }); const [actionResult, setActionResult] = useState(null); function handlePrimaryAction() { "background only"; setActionResult("Primary Action Clicked"); } function handleSecondaryAction() { "background only"; setActionResult("Secondary Action Clicked"); } return ( } size="x10" multicolor /> } title="결과 타이틀" description={actionResult ?? "부가 설명을 적어주세요"} primaryActionProps={{ children: "Primary Action", bindtap: handlePrimaryAction }} secondaryActionProps={{ children: "Secondary Action", bindtap: handleSecondaryAction, }} /> ); } ``` ## Installation - npm: npx @seed-design/cli@latest add ui:result-section - pnpm: pnpm dlx @seed-design/cli@latest add ui:result-section - yarn: yarn dlx @seed-design/cli@latest add ui:result-section - bun: bun x @seed-design/cli@latest add ui:result-section ## Props ## Examples ### Sizes #### Large Used when expressing a state that occupies the full screen. ```tsx import "./styles"; import { VStack, useSeedClassName } from "@seed-design/lynx-react"; import { ResultSection } from "@/components/ui/result-section"; export default function Example() { const seedClassName = useSeedClassName({ colorMode: "system" }); return ( ); } ``` #### Medium Used when expressing a state in a portion of the screen, like a card or section. ```tsx import "./styles"; import { VStack, useSeedClassName } from "@seed-design/lynx-react"; import { ResultSection } from "@/components/ui/result-section"; export default function Example() { const seedClassName = useSeedClassName({ colorMode: "system" }); return ( ); } ``` ### With CTA & Progress Circle When providing the main action on the screen as a bottom CTA, you can place a separate Action Button instead of a button inside Result Section. ```tsx import "./styles"; import IconExclamationmarkCircleFill from "@karrotmarket/lynx-monochrome-icon/IconExclamationmarkCircleFill"; import { useEffect, useState } from "@lynx-js/react"; import { ActionButton, AppBar, Box, Icon, ProgressCircle, VStack, useSeedClassName, } from "@seed-design/lynx-react"; import { ResultSection } from "@/components/ui/result-section"; export default function Example() { const seedClassName = useSeedClassName({ colorMode: "system" }); const [loading, setLoading] = useState(true); useEffect(() => { const timer = setTimeout(() => setLoading(false), 3000); return () => clearTimeout(timer); }, []); function handleRetry() { "background only"; setLoading(true); setTimeout(() => setLoading(false), 3000); } return ( 환불 요청 {loading ? ( ) : ( } size="x10" color="fg.critical" /> )} } /> 다시 시도 ); } ``` ### Success Example The current Lynx Registry and `@seed-design/lynx-react` do not provide a Lottie implementation, so Success Example is not provided as a working example. If you need the same screen, use a Lottie implementation for Lynx that has been validated in your app. Your app can select an asset that matches the current color mode and pass a 70×70 node to `asset` with autoplay, play-once, and last-frame-hold behavior configured. Connect the confirmation action via `primaryActionProps`. ## Web Version Differences | Area | React Web | Lynx | | ------------------------- | ------------------------------------------------- | ------------------------------------------------ | | Native element | `div`, `span`, `button` | `view`, `text` | | Event | `onClick` | `bindtap`, `main-thread:bindtap` | | Root props | HTML attribute | Lynx native element prop and `accessibility-*` | | Secondary action override | `color`, `fontWeight`, `bleedX`, `bleedY` applied | Use Lynx Action Button's `ghost`, `small` styles | The size, center alignment, and asset/text/button composition of Result Section are the same on both platforms. The button's accessible name and tap event are passed as Lynx Action Button props to `primaryActionProps` and `secondaryActionProps`.