Article List Grid
interlace-ui/article-list-gridFreeComponent
Grid of ArticleCards with an optional featured slot above. The pattern blog index pages reach for: one big featured card (overlay variant) above N tiles. Composes RelatedPosts-style streaming with proper loading + empty states.
Install it
npx shadcn@latest add https://ds.interlace.tools/r/article-list-grid.jsonSource
1import * as React from 'react';23// @interlace/article-list-grid v1.1.0 — Interlace design system.4// Docs, props and live preview: https://ds.interlace.tools/c/article-list-grid5// What changed since: https://ds.interlace.tools/c/article-list-grid#history6// Generated banner — keep it, the upgrade diff reads this version.78/**9 * @interlace/ui — ArticleListGrid10 *11 * Grid of ArticleCards with an optional featured slot above. The pattern12 * blog index pages reach for: one big featured card (overlay variant)13 * above N tiles. Composes RelatedPosts-style streaming with proper14 * loading + empty states.15 *16 * ## Anatomy17 *18 * <section data-slot="article-list-grid" data-min-viewport="320">19 * <Container>20 * {featured && <ArticleCard variant="overlay" priority />}21 * <Grid cols={3}>{posts.map(<ArticleCard />)}</Grid>22 * </Container>23 * </section>24 *25 * | Rule | Concept | Where in this file |26 * | ---- | -------------------------------- | ----------------------------------------------------------- |27 * | R4 | Extends native el | `React.ComponentProps<'section'>` + props |28 * | R6 | data-slot on root | `data-slot="article-list-grid"` |29 * | R10 | Composition seam | `featured` + `posts` arrays of ArticleCard props |30 * | R14 | Declares min viewport | `data-min-viewport={String(MIN_VIEWPORT)}` + exported const |31 * | R18 | Tailwind only | Zero inline `style` |32 * | R25 | Server component | No hooks |33 * | R26 | A11y | `<section>` landmark |34 */3536import { cn } from '@/lib/utils';37import { Container } from '@/components/ui/container';38import { Grid } from '@/components/ui/grid';39import { Skeleton } from '@/components/ui/skeleton';40import { Stack } from '@/components/ui/stack';41import { Typography } from '@/components/ui/typography';42import { ArticleCard, type ArticleCardProps } from '@/components/ui/patterns/article-card';4344export const MIN_VIEWPORT = 320 as const;4546interface ArticleListGridProps extends Omit<React.ComponentProps<'section'>, 'title'> {47 title?: React.ReactNode;48 lead?: React.ReactNode;49// … truncated
More from interlace-ui
All 140 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| A11y Startera11y-starter | interlace-ui | Components | Free | no deps | |
| Accordionaccordion | interlace-ui | Components | Free | no deps | |
| Alertalert | interlace-ui | Components | Free | no deps | |
| Alert Dialogalert-dialog | interlace-ui | Components | Free | no deps | |
| Animated Gradient Textanimated-gradient-text | interlace-ui | Components | Free | no deps | |
| Animated Grid Patternanimated-grid-pattern | interlace-ui | Components | Free | no deps | |
| Animated Listanimated-list | interlace-ui | Components | Free | no deps | |
| Article Cardarticle-card | interlace-ui | Components | Free | no deps |
