Skip to content

Data display ​

Table, card, badge, carousel, empty state, và Chart (Recharts peer optional — xem Install).

Components ​

  • Table — Primitive table ngữ nghĩa.
  • Card — Container nội dung — shadow mềm, không border mặc định.
  • Carousel — Carousel slide (Embla) — Mobile-First Prev/Next + indicators trong khung.
  • Panel — Bề mặt nhóm MINAP cho form/sample.
  • Avatar — Avatar user/ảnh.
  • Badge — Chip status / meta. Mặc định pastel soft; có solid | outline | secondary.
  • Separator — Đường phân cách.
  • ScrollArea — Container cuộn có style.
  • AspectRatio — Khóa tỷ lệ khung hình của child.
  • Skeleton — Placeholder đang tải.
  • Empty — Composition empty-state.
  • Item — Primitive hàng list.
  • Kbd — Glyph phím bàn phím.
  • Chart — Chart Soft Periwinkle light (Recharts peer optional). Empty/loading/ready qua Empty + Skeleton + ChartContainer.

Examples ​

Một vài component tiêu biểu. Xem trang component để đủ Props / Behavior.

Table ​

tsx
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@minap/ui";

export function Example() {
  return (
    <>
      <Table>
        <TableHeader>
          <TableRow>
            <TableHead>Name</TableHead>
            <TableHead>Status</TableHead>
          </TableRow>
        </TableHeader>
        <TableBody>
          <TableRow>
            <TableCell>Alpha</TableCell>
            <TableCell>Ready</TableCell>
          </TableRow>
        </TableBody>
      </Table>
    </>
  );
}

Card ​

tsx
import { Card, CardContent, CardHeader, CardTitle } from "@minap/ui";

export function Example() {
  return (
    <>
      <Card className="w-full">
        <CardHeader>
          <CardTitle>Card title</CardTitle>
        </CardHeader>
        <CardContent className="text-sm text-muted-foreground">Card body</CardContent>
      </Card>
    </>
  );
}
tsx
import {
  Carousel,
  CarouselContent,
  CarouselIndicators,
  CarouselItem,
  CarouselNext,
  CarouselPrevious,
} from "@minap/ui";

const slides = [
  {
    src: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=450&fit=crop",
    alt: "Mountain lake",
    title: "Alpine lake",
  },
  {
    src: "https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=800&h=450&fit=crop",
    alt: "Forest path",
    title: "Forest trail",
  },
  {
    src: "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=800&h=450&fit=crop",
    alt: "Sunlight forest",
    title: "Morning light",
  },
];

export function Example() {
  return (
    <Carousel className="w-full" opts={{ loop: true }}>
      <CarouselContent>
        {slides.map((slide) => (
          <CarouselItem key={slide.src}>
            <div className="relative aspect-video overflow-hidden rounded-xl border shadow-sm">
              <img src={slide.src} alt={slide.alt} className="h-full w-full object-cover" />
              <div className="pointer-events-none absolute inset-x-0 top-0 bg-gradient-to-b from-black/65 to-transparent px-3 py-2.5">
                <p className="text-sm font-medium text-white drop-shadow-sm">{slide.title}</p>
              </div>
            </div>
          </CarouselItem>
        ))}
      </CarouselContent>
      <CarouselPrevious />
      <CarouselNext />
      <CarouselIndicators />
    </Carousel>
  );
}

Panel ​

tsx
import { Panel } from "@minap/ui";

export function Example() {
  return (
    <>
      <Panel className="w-full p-4 text-sm">Panel surface for grouping controls.</Panel>
    </>
  );
}

MINAP UI — Soft Periwinkle light, Mobile-First