Astryx

Astryx Carousel

Navigation

About

An Astryx horizontal carousel for browsing overflowing card grids, image galleries, product lists, and related items.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Carousel to your project and fits it to your theme.

Code

How Astryx Carousel is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

'use client';

import {Carousel} from '@/components/ui/astryx-carousel';
import {Avatar} from '@astryxdesign/core/Avatar';
import {Badge} from '@astryxdesign/core/Badge';
import {Card} from '@astryxdesign/core/Card';
import {Stack} from '@astryxdesign/core/Layout';
import {Text} from '@astryxdesign/core/Text';

const TEAM = [
  {name: 'Alice Chen', role: 'Engineering Lead', color: 'blue' as const},
  {name: 'Bob Smith', role: 'Product Designer', color: 'purple' as const},
  {name: 'Carol Davis', role: 'Product Manager', color: 'green' as const},
  {name: 'Andrew Thomas', role: 'Design Manager', color: 'red' as const},
  {name: 'Gina Wilson', role: 'Software Engineer', color: 'orange' as const},
];

function CarouselSnap() {
  return (
    <Stack direction="vertical" gap={3} style={{maxWidth: 520, padding: 8}}>
      <Text type="body" weight="bold">
        Team members
      </Text>
      <Carousel gap={2} hasSnap hasButtons aria-label="Team members">
        {TEAM.map(person => (
          <Card key={person.name} width={180} minHeight={140}>
            <Stack direction="vertical" gap={3} hAlign="center">
              <Avatar name={person.name} size="lg" />
              <Stack direction="vertical" gap={1} hAlign="center">
                <Text type="body" weight="bold">
                  {person.name}
                </Text>
                <Badge variant={person.color} label={person.role} />
              </Stack>
            </Stack>
          </Card>
        ))}
      </Carousel>
    </Stack>
  );
}

export default function CarouselSnapDemo() {
  return (
    <div
      data-astryx-theme="neutral"
      data-theme="light"
      style={{colorScheme: 'light', display: 'contents'}}>
      <CarouselSnap />
    </div>
  );
}

Dependencies

More by Astryx

View all
  • Astryx Banner

    Astryx Banner

    61
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    32
  • Astryx Avatar

    Astryx Avatar

    31
  • Astryx Badge

    Astryx Badge

    29
  • Astryx Button Group

    Astryx Button Group

    28
  • Astryx Chat Composer Drawer

    Astryx Chat Composer Drawer

    23
  • Astryx Toggle Button

    Astryx Toggle Button

    17
  • Astryx Avatar Group

    Astryx Avatar Group

    9

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    67
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    193
  • Sidebar

    Sidebar

    408
  • Button Breadcrumb

    Button Breadcrumb

    34
  • Menu

    Menu

    26
  • Breadcrumb

    Breadcrumb

    7
  • Pagination with Ellipsis

    Pagination with Ellipsis

    25
  • Pagination with Icon and Label

    Pagination with Icon and Label

    24