Implements Figma designs 1:1 using OneKey component library (还原设计稿).
56
65%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.skillshare/skills/1k-implementing-figma-designs/SKILL.mdThis skill helps you implement Figma designs 1:1 using the OneKey component library.
When implementing Figma designs, prioritize pixel-perfect UI over data integration:
intl.formatMessageWhen you need to use a component, look up its source and demo:
packages/components/src/{category}/{ComponentName}/Categories:
primitives/ - Button, Icon, Image, Skeleton, Spinner, Stack, Heading, SizeableTextforms/ - Input, TextArea, Select, Checkbox, Radio, Switch, Slider, Form, OTPInputactions/ - IconButton, ActionList, Alert, Toast, Popover, SegmentControl, Pagination, Tooltipcomposite/ - Dialog, Tabs, Banner, Carousel, Table, Steppercontent/ - Badge, Progress, Empty, Divider, QRCode, Markdown, LottieView, LinearGradient, BlurViewlayouts/ - Page, ScrollView, ListView, SectionList, Accordion, Swiper, SearchBarpackages/kit/src/views/Developer/pages/Gallery/Components/stories/{ComponentName}.tsxNote: Some demos have different names (e.g., AccordionGallery.tsx, NewTabsGallery.tsx)
Read the source to understand props and structure:
Read: packages/components/src/{category}/{ComponentName}/index.tsxRead the demo for usage examples:
Glob: packages/kit/src/views/Developer/pages/Gallery/Components/stories/*{ComponentName}*.tsx@onekeyhq/componentsimport { Button, Stack, XStack, YStack, Icon, ... } from '@onekeyhq/components';$1 = 4px, $2 = 8px, $3 = 12px, $4 = 16px$5 = 20px, $6 = 24px, $8 = 32px, $10 = 40px$text, $textSubdued, $textDisabled$bg, $bgSubdued, $bgHover, $bgActive$border, $borderSubdued, $borderActive$icon, $iconSubdued, $iconDisabledHeadings (large to small):
$headingXxl, $headingXl, $headingLg, $headingMd, $headingSm, $headingXsBody text (large to small):
$bodyLg, $bodyMd, $bodySm, $bodyXsWith medium weight (append Medium):
$bodyLgMedium, $bodyMdMedium, $bodySmMedium, $bodyXsMediumUsage with SizableText:
<SizableText size="$bodyMd">Regular text</SizableText>
<SizableText size="$bodyMdMedium">Medium weight text</SizableText>
<SizableText size="$headingSm">Small heading</SizableText>Layout with Stack:
<YStack gap="$4"> {/* Vertical */}
<XStack gap="$4"> {/* Horizontal */}
<Stack gap="$4"> {/* Default vertical */}Mock Data:
const mockItems = [
{ name: 'Bitcoin', symbol: 'BTC', value: '$21,432.50' },
{ name: 'Ethereum', symbol: 'ETH', value: '$5,892.30' },
];Button Actions:
<Button onPress={() => console.log('clicked')}>Action</Button>d71e6b7
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.