core-components▌
sickn33/antigravity-awesome-skills · updated Apr 8, 2026
Use components from your core library instead of raw platform components. This ensures consistent styling and behavior.
Core Components
Design System Overview
Use components from your core library instead of raw platform components. This ensures consistent styling and behavior.
Design Tokens
NEVER hard-code values. Always use design tokens.
Spacing Tokens
// CORRECT - Use tokens
<Box padding="$4" marginBottom="$2" />
// WRONG - Hard-coded values
<Box padding={16} marginBottom={8} />
| Token | Value |
|---|---|
$1 |
4px |
$2 |
8px |
$3 |
12px |
$4 |
16px |
$6 |
24px |
$8 |
32px |
Color Tokens
// CORRECT - Semantic tokens
<Text color="$textPrimary" />
<Box backgroundColor="$backgroundSecondary" />
// WRONG - Hard-coded colors
<Text color="#333333" />
<Box backgroundColor="rgb(245, 245, 245)" />
| Semantic Token | Use For |
|---|---|
$textPrimary |
Main text |
$textSecondary |
Supporting text |
$textTertiary |
Disabled/hint text |
$primary500 |
Brand/accent color |
$statusError |
Error states |
$statusSuccess |
Success states |
Typography Tokens
<Text fontSize="$lg" fontWeight="$semibold" />
| Token | Size |
|---|---|
$xs |
12px |
$sm |
14px |
$md |
16px |
$lg |
18px |
$xl |
20px |
$2xl |
24px |
Core Components
Box
Base layout component with token support:
<Box
padding="$4"
backgroundColor="$backgroundPrimary"
borderRadius="$lg"
>
{children}
</Box>
HStack / VStack
Horizontal and vertical flex layouts:
<HStack gap="$3" alignItems="center">
<Icon name="user" />
<Text>Username</Text>
</HStack>
<VStack gap="$4" padding="$4">
<Heading>Title</Heading>
<Text>Content</Text>
</VStack>
Text
Typography with token support:
<Text
fontSize="$lg"
fontWeight="$semibold"
color="$textPrimary"
>
Hello World
</Text>
Button
Interactive button with variants:
<Button
onPress={handlePress}
variant="solid"
size="md"
isLoading={loading}
isDisabled={disabled}
>
Click Me
</Button>
| Variant | Use For |
|---|---|
solid |
Primary actions |
outline |
Secondary actions |
ghost |
Tertiary/subtle actions |
link |
Inline actions |
Input
Form input with validation:
<Input
value={value}
onChangeText={setValue}
placeholder="Enter text"
error={touched ? errors.field : undefined}
label="Field Name"
/>
Card
Content container:
<Card padding="$4" gap="$3">
<CardHeader>
<Heading size="sm">Card Title</Heading>
</CardHeader>
<CardBody>
<Text>Card content</Text>
</CardBody>
</Card>
Layout Patterns
Screen Layout
const MyScreen = () => (
<Screen>
<ScreenHeader title="Page Title" />
<ScreenContent padding="$4">
{/* Content */}
</ScreenContent>
</Screen>
);
Form Layout
<VStack gap="$4" padding="$4">
<Input label="Name" {...nameProps} />
<Input label="Email" {...emailProps} />
<Button isLoading={loading}>Submit</Button>
</VStack>
List Item Layout
<HStack
padding="$4"
gap="$3"
alignItems="center"
borderBottomWidth={1}
borderColor="$borderLight"
>
<Avatar source={{ uri: imageUrl }} size="md" />
<VStack flex={1}>
<Text fontWeight="$semibold">{title}</Text>
<Text color="$textSecondary" fontSize="$sm">{subtitle}</Text>
</VStack>
<Icon name="chevron-right" color="$textTertiary" />
</HStack>
Anti-Patterns
// WRONG - Hard-coded values
<View style={{ padding: 16, backgroundColor: '#fff' }}>
// CORRECT - Design tokens
<Box padding="$4" backgroundColor="$backgroundPrimary">
// WRONG - Raw platform components
import { View, Text } from 'react-native';
// CORRECT - Core components
import { Box, Text } from 'components/core';
// WRONG - Inline styles
<Text style={{ fontSize: 18, fontWeight: '600' }}>
// CORRECT - Token props
<Text fontSize="$lg" fontWeight="$semibold">
Component Props Pattern
When creating components, use token-based props:
interface CardProps {
padding?: '$2' | '$4' | '$6';
variant?: 'elevated' | 'outlined' | 'filled';
children: React.ReactNode;
}
const Card = ({ padding = '$4', variant = 'elevated', children }: CardProps) => (
<Box
padding={padding}
backgroundColor="$backgroundPrimary"
borderRadius="$lg"
{...variantStyles[variant]}
>
{children}
</Box>
);
Integration with Other Skills
- react-ui-patterns: Use core components for UI states
- testing-patterns: Mock core components in tests
- storybook: Document component variants
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★64 reviews- ★★★★★Olivia Abbas· Dec 28, 2024
core-components has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Isabella Chawla· Dec 28, 2024
Registry listing for core-components matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Chaitanya Patil· Dec 4, 2024
We added core-components from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Dev Chawla· Dec 4, 2024
core-components reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Piyush G· Nov 23, 2024
Useful defaults in core-components — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kofi Zhang· Nov 23, 2024
Registry listing for core-components matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Noah Flores· Nov 19, 2024
Solid pick for teams standardizing on skills: core-components is focused, and the summary matches what you get after install.
- ★★★★★Isabella Harris· Nov 19, 2024
Keeps context tight: core-components is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Arjun Diallo· Nov 19, 2024
core-components reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Shikha Mishra· Oct 14, 2024
Registry listing for core-components matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 64