Meta

Astryx Banner

Component 8

About

Banner communicates system-wide announcements, statuses, and alerts, from Meta's Astryx design system. Supports info, success, warning, and error statuses, dismissable and collapsible content, action buttons via endContent, and a section container variant for in-page placement.

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

Code

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

Usage.tsx

'use client';

import Banner from '@/components/ui/astryx-banner';
import {Theme} from '@astryxdesign/core/theme';
import {neutralTheme} from '@astryxdesign/theme-neutral/built';
import {Button} from '@astryxdesign/core/Button';
import {Stack} from '@astryxdesign/core/Layout';

export default function BannerSectionVariant() {
  return (
    <Theme theme={neutralTheme}>
      <div
        style={{
          minHeight: '100dvh',
          display: 'grid',
          placeItems: 'center',
          padding: 24,
        }}>
        <Stack direction="vertical" gap={3}>
          <Banner
            status="warning"
            title="Scheduled downtime"
            description="All services will be unavailable on Sunday from 2:00–4:00 AM."
            container="section"
            isDismissable
          />
          <Banner
            status="info"
            title="Welcome to the new dashboard"
            description="We have redesigned the layout based on your feedback."
            container="section"
            endContent={
              <Button label="Take a tour" variant="secondary" size="sm" />
            }
          />
        </Stack>
      </div>
    </Theme>
  );
}

Dependencies

More by Meta

View all
  • Astryx Avatar

    Astryx Avatar

    26
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    26
  • Astryx Button Group

    Astryx Button Group

    22
  • Astryx Badge

    Astryx Badge

    22
  • Astryx Toggle Button

    Astryx Toggle Button

    15
  • Astryx Avatar Group

    Astryx Avatar Group

    7
  • Astryx Button

    Astryx Button

    4
  • Astryx Blockquote

    Astryx Blockquote

    3