Design System — v 1.0
Layout
6 komponentów wymuszających strukturę wizualną. Odpowiadają wyłącznie za przestrzeń — nie za wygląd.
Sekcja IV
6 Prymitywów Architektury
Zdefiniowane w components/layout/. Każdy prymityw ma ściśle określoną odpowiedzialność.
<Section>Semantyczna sekcja strony z kontrolą odstępów pionowych.
| prop | wartości | domyślnie |
|---|---|---|
as | section | article | main | header | footer | section |
size | compact | default | relaxed | hero | default |
Warianty CSS
compact
py-6 md:py-8default
py-10 md:py-16relaxed
py-16 md:py-24hero
py-20 md:py-32Przykład użycia
<Section as="section" size="relaxed"> <Container>...</Container> </Section>
<Container>Centruje i ogranicza szerokość treści z responsywnym paddingiem.
| prop | wartości | domyślnie |
|---|---|---|
size | narrow | default | wide | default |
Warianty CSS
narrow
max-w-3xldefault
max-w-7xlwide
max-w-screen-2xlPrzykład użycia
<Container size="narrow"> <Heading as="h1">...</Heading> </Container>
<Stack>Flex kolumna lub wiersz z responsywnymi odstępami.
| prop | wartości | domyślnie |
|---|---|---|
direction | col | row | col |
gap | xs | sm | md | lg | xl | md |
align | start | center | end | stretch | stretch |
Warianty CSS
xs
gap-2 md:gap-3sm
gap-3 md:gap-4 lg:gap-6md
gap-4 md:gap-6 lg:gap-8lg
gap-6 md:gap-8 lg:gap-10xl
gap-8 md:gap-12 lg:gap-16Przykład użycia
<Stack direction="row" gap="sm" align="center"> <Badge>Tag</Badge> <Text variant="muted">Opis</Text> </Stack>
<Grid>Responsywna siatka z predefiniowanymi kolumnami.
| prop | wartości | domyślnie |
|---|---|---|
cols | 2 | 3 | 4 | 3 |
gap | sm | md | lg | md |
Warianty CSS
2 cols
grid-cols-1 md:grid-cols-23 cols
grid-cols-1 md:grid-cols-2 lg:grid-cols-34 cols
grid-cols-1 md:grid-cols-2 lg:grid-cols-4Przykład użycia
<Grid cols="3" gap="md"> <Card>...</Card> <Card>...</Card> <Card>...</Card> </Grid>
<Heading>Nagłówek z rozdziałem tagu SEO od rozmiaru wizualnego.
| prop | wartości | domyślnie |
|---|---|---|
as | h1 | h2 | h3 | h4 | h5 | h6 | h1 |
size | h1 | h2 | h3 | h4 | h5 | = as |
Warianty CSS
h1
text-4xl md:text-5xl lg:text-6xl font-extrabold tracking-tight leading-tight text-balanceh2
text-3xl md:text-4xl font-semibold tracking-tight leading-tight text-balanceh3
text-2xl md:text-3xl font-semibold tracking-tight leading-tighth4
text-xl font-medium leading-tighth5
text-lg font-medium leading-tightPrzykład użycia
<Heading as="h2" size="h1"> Duży nagłówek, tag h2 dla SEO </Heading>
<Text>Paragraf tekstowy z semantycznymi wariantami.
| prop | wartości | domyślnie |
|---|---|---|
variant | lead | body | small | muted | mono | body |
Warianty CSS
lead
text-lg md:text-xl text-muted-foreground leading-relaxed text-balancebody
text-base text-foreground leading-relaxed text-prettysmall
text-sm font-medium leading-nonemuted
text-sm text-muted-foregroundmono
text-sm font-mono text-foregroundPrzykład użycia
<Text variant="lead"> Wiodący akapit — większy, muted, relaxed </Text>