Antares

Antares

A collection of accessible, composable React components built on React Aria.

Documentation | Storybook

Quick Start

Install the package:

npm install --save @godaddy/antares

Import and use a component:

import { Button } from '@godaddy/antares';

export default function App() {
  return <Button variant="primary">Get Started</Button>;
}

Per-Component Imports

Each component is available as a standalone entry point. This lets your bundler load only the JavaScript and CSS for the components you use:

import { Button } from '@godaddy/antares/Button';
import { Flex } from '@godaddy/antares/Layout';
import { BarChart } from '@godaddy/antares/Chart';

This also works with autocomplete in IDEs and LLMs, so you can import from the root package and let your editor/agent suggest the available components.

Framework Setup

Antares ships CSS alongside its JavaScript modules. Each component chunk imports a corresponding .css file (e.g., import './src-BZhWcxqJ.css'). Most bundlers handle this automatically, but some frameworks need extra configuration to process CSS imports from node_modules.

Next.js

Add @godaddy/antares to transpilePackages so Next.js processes the package through its own CSS pipeline instead of treating it as a pre-built external:

// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  transpilePackages: ['@godaddy/antares'],
};

module.exports = nextConfig;

Without this, Next.js will throw:

Global CSS cannot be imported from within node_modules.

Remix

Remix with Vite handles CSS imports from node_modules in the client bundle automatically. However, during SSR, Vite treats node_modules as externals by default, which bypasses CSS processing. Add @godaddy/antares to ssr.noExternal to fix this:

// vite.config.ts
import { defineConfig } from 'vite';

export default defineConfig({
  ssr: {
    noExternal: ['@godaddy/antares'],
  },
});

Vite

Vite processes CSS imports from node_modules out of the box. No additional configuration is needed for client-side SPAs.

If you are using Vite with SSR (e.g., custom SSR setup, not Remix), add @godaddy/antares to ssr.noExternal as shown in the Remix section.

Other Bundlers

Any bundler that supports CSS imports will work with Antares. If your bundler does not process CSS imports from node_modules by default, ensure it is configured to do so. For example, with raw webpack you may need css-loader configured to handle .css files from node_modules.

Components

Alert

In-page alerts are non-intrusive notifications within a webpage, providing users with timely information or feedback without disrupting their experience.

Button

The Button component allows users to initiate actions or submit forms with a single click

Carousel

The Carousel component allows users to cycle through a series of content panels (typically images, cards, or text) in a horizontal or vertical layout. It is commonly used for featured content, product showcases, or testimonials.

Bar Chart

A flexible, accessible, and design-aligned data visualization solution for displaying single or multi-series bar charts.

DonutChart

Donut charts are for parts-to-whole comparison—how partial elements add up to a total—shown as a ring so a few categories are easy to compare at a glance.

Gauge Chart

A visual indicator for representing a single quantitative value within a known range, rendered as a semicircle arc in continuous or segmented mode.

LineChart

Line Chart shows how something changes over time or along a continuous scale. It connects data points with lines so people can quickly spot trends, peaks, dips, and patterns.

Checkbox

Accessible checkbox component for multi-select options with support for indeterminate states, validation, keyboard navigation, and flexible group layouts.

Drawer

An overlay panel that slides in from a screen edge, supporting sidebar navigation and bottom sheets.

DropZone

A standalone region that accepts drag-and-drop file interactions, rendering a clearly defined target area where users can drop files.

Icon

Flexible SVG icon component with on-demand loading, automatic caching, and extensive customization options

InlineDrawer

An in-flow collapsible panel that expands and collapses along one axis, supporting sidebar navigation and persistent collapsed content.

Box

Polymorphic layout component providing consistent spacing, elevation, rounding, and self-alignment

Flex

One-dimensional layout component for arranging children in rows or columns with alignment and spacing control

Grid

Two-dimensional CSS Grid layout component for complex grid-based layouts with rows and columns

Menu

Accessible dropdown menu supporting keyboard navigation, nested submenus, and flexible item rendering

MetricsLockup

The MetricsLockup component displays a single metric with an optional title, info tooltip, trend indicator, and description.

Modal

The Modal component presents a dialog window over the page that focuses the user's attention on a single task or piece of information.

NumberField

NumberField is a numeric input with optional label, description, error message, min/max/step, and increment/decrement stepper buttons. Use it in forms for quantities, amounts, or percentages.

Pagination

A pagination component with prev/next buttons and dot indicators, configurable page limits, and optional visibility of controls and dots

Popover

The Popover component is an overlay element positioned relative to a trigger element.

ProgressBar

A progress bar shows determinate progress of an operation over time

Radio

Accessible radio button component for mutually exclusive selections with keyboard navigation, validation states, and flexible layouts.

SegmentedController

A segmented controller is a linear set of two or more segments, each of which functions as a button. A segmented controller allows users to select options, switch views, or sort elements.

Select

Accessible dropdown component supporting single and multiple selection with keyboard navigation and validation

Text

Text component for displaying and formatting text content with alignment and truncation options

TextField

TextField is a single-line or multiline text input with optional label, description, and error message. Use it in forms for short answers (email, search, name) or longer content (comments). It supports optional leading and trailing text adornments (e.g. currency or units).

ToggleButton

Accessible toggle button component for grouped contextual actions with single or multiple selection, keyboard navigation, and RTL-aware layouts.

Tooltip

The Tooltip component displays a description of an element on hover or focus.

On this page