GitHub

Collection of Components

A complete set of ready-to-use UI components built for SXO . Every piece works perfectly with Tailwind CSS and meets accessibility standards.

What You'll Find

  • Complete component implementations
  • Interactive examples and demos
  • Accessibility-focused design patterns
  • Copy-paste ready code snippets and installation

Installation

Dependencies

Install the core dependencies for SXO and Reactive Component. SXO provides the JSX transformation and server-side rendering capabilities, while Reactive Component enables client-side interactivity through the islands architecture pattern.

pnpm add sxo @qery/reactive-component

DevDependencies

Install Tailwind CSS and its CLI as development dependencies. The CLI is used to process your stylesheets and generate the final CSS output with all the utility classes used in your components.

pnpm add -D tailwindcss @tailwindcss/cli basecoat-css@0.3.3

After installing the dependencies, import Tailwind and Basecoat CSS into your main stylesheet:

@import "tailwindcss";
@import "basecoat-css";

Components

Run the following command from your project root to install a component and its associated assets (styles, JSX components, and the client script).

pnpx sxo add <component>

Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

Is it accessible?

Yes. It adheres to the WAI-ARIA design pattern.

Is it styled?

Yes. It comes styled to match the rest of the components.

Is it animated?

Yes. It's animated by default.

Usage

Use the following primitives to build an accordion:

  • <Accordion>: Root container that configures behavior via the type prop ( single or multiple).
  • <AccordionItem>: Wrap each item. Renders a native details element. Add the open attribute to default an item as expanded.
  • <AccordionHeader>: Clickable header. Renders a summary with a heading and optional chevron icon; hide the icon with hideIcon.
  • <AccordionContent>: Panel content. Renders a section by default; override the element with the as prop.

Installation

pnpx sxo add accordion

Alert

Displays a callout for user attention.

Usage

Use the following primitives to build an alert:

  • Alert: The main container for the alert message, supporting optional className for styling.
  • AlertTitle: Displays the title of the alert, with a level prop for semantic heading.
  • AlertDescription: Contains the description text, which can include paragraphs, lists, etc.
  • Icon components: Optional icons like IconCircleCheck, IconCircleExclamation, etc., placed before the title or description for visual emphasis.

Installation

pnpx sxo add alert

Alert Dialog

A modal dialog that interrupts the user with important content and expects a response.

Are you sure?

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

Usage

Use the following primitives to build an alert dialog:

  • <AlertDialog>: The root container for the alert dialog.
  • <AlertDialogTrigger>: A button that opens the dialog.
  • <AlertDialogWindow>: The modal window containing the dialog content.
  • <AlertDialogTitle>: The title of the dialog.
  • <AlertDialogDescription>: The description text explaining the action.
  • <AlertDialogFooter>: The footer with action buttons.

Installation

pnpx sxo add alert-dialog

Avatar

An image element with a fallback for representing the user.

C NewtonALCN
ABCXY

Usage

Use the following primitives to build an example:

  • <Avatar>: Displays a user image or fallback initials/name. Supports src, name, initials, size, and shape props.
  • <AvatarGroup>: Groups multiple avatars with optional hover spread using hoverSpread prop.

Installation

pnpx sxo add avatar

Badge

Displays a badge or a component that looks like a badge.

PrimarySecondaryOutlineDestructive899+

Usage

Use the following primitive to build badges:

  • <Badge>: Displays status indicators, labels, or counts with variants (primary, secondary, outline, destructive) and a pill variant for numeric indicators.

Installation

pnpx sxo add badge

Button

Displays a button or a component that looks like a button.

Large

Default

With Icons (Default)

With Icons (Small)

Small

Icon Only

Usage

Use the following primitives to build buttons:

  • <Button>: The button component with variants (primary, outline, ghost, destructive, secondary, link), sizes (lg, default, sm), and support for icons and loading states.

Installation

pnpx sxo add button

Card

Displays a card with header, content, and footer.

Login to your account

Enter your details below to login to your account

Forgot your password?

Is this an image?

This is a card with an image.

A modern house with large windows and contemporary architecture
Live

Built with SXO and Tailwind CSS

Usage

Use the following primitives to build cards:

  • <Card>: The root card component.
  • <CardHeader>: The header section of the card.
  • <CardHeaderTitle>: The title in the header.
  • <CardHeaderDescription>: The description in the header.
  • <CardSection>: The main content section.
  • <CardFooter>: The footer section.

Installation

pnpx sxo add card

Checkbox

A control that allows the user to toggle between checked and not checked.

Usage

Use the following primitives to build checkboxes:

  • <Checkbox>: The checkbox input component.

Installation

pnpx sxo add checkbox

Dialog

A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.

Edit profile

Make changes to your profile here. Click save when you're done.

Scrollable Content

This is a dialog with scrollable content.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.

Usage

Use the following primitives to build dialogs:

  • <Dialog>: The root container that manages dialog state and provides context for other dialog components.
  • <DialogTrigger>: The button that opens the dialog, can be any interactive element.
  • <DialogContent>: The modal content container that renders the dialog overlay and content.
  • <DialogHeader>: The header section containing title and description.
  • <DialogTitle>: The title text within the dialog header.
  • <DialogDescription>: The description text within the dialog header.
  • <DialogFooter>: The footer section for action buttons.
  • <DialogClose>: A button that closes the dialog, typically used for close icons or cancel buttons.

Installation

pnpx sxo add dialog

Form

Building forms with React Hook Form and Zod.

This is your public display name.

You can manage email addresses in your email settings.

You can @mention other users and organizations.

Your date of birth is used to calculate your age.

Notify me about...

Email Notifications

Receive emails about new products, features, and more.

Receive emails about your account security.

Usage

Use the following primitives to build forms:

  • <Form>: The root form component.
  • <FormLabel>: Labels for form inputs.
  • <FormInput>: Input fields (text, date, radio, checkbox).
  • <FormDescription>: Descriptive text for form fields.
  • <FormFieldset>: Groups related form fields.
  • <FormLegend>: Legend for fieldsets.
  • <FormSubmit>: Submit button.
  • <FormReset>: Reset button.

Installation

pnpx sxo add form

Input

Displays a form input field or a component that looks like an input field.

Usage

Use the following primitive to build form inputs:

  • <Input>: A form input field that supports various HTML input types (text, email, password, search, number, date) with proper styling and accessibility.

Installation

pnpx sxo add input

Label

Renders an accessible label associated with controls.

Usage

Use the following primitive to build form labels:

  • <Label>: A form label component that properly associates with form controls and supports variants (inline, stacked, align-top) for different layouts.

Installation

pnpx sxo add label

Pagination

Pagination with page navigation, next and previous links.

Usage

Use the following primitives to build pagination:

  • <Pagination>: Displays page navigation with customizable props like totalPages, currentPage, and visibility options for prev/next/first/last buttons.

Installation

pnpx sxo add pagination

Popover

Displays rich content in a portal, triggered by a button.

Usage

Use the following primitives to build a popover:

  • <Popover>: The root component for a popover.
  • <PopoverTrigger>: The button that opens the popover.
  • <PopoverContent>: The content displayed in the popover.

Installation

pnpx sxo add popover

Radio Group

A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.

Usage

Use the following primitives to build radio groups:

  • <RadioGroup>: The container component that manages the radio group state and provides proper form integration.
  • <RadioGroupItem>: Individual radio button inputs that work together within a RadioGroup.

Installation

pnpx sxo add radio-group

Select

Displays a list of options for the user to pick from—triggered by a button.

Usage

Use the following primitives to build a select:

  • <Select>: The root component for a select dropdown.
  • <SelectPlaceholder>: Placeholder text shown when no option is selected.
  • <SelectOption>: Individual selectable options.
  • <SelectGroup>: Groups options with a label.

Installation

pnpx sxo add select

Select Menu

Displays a list of options for the user to pick from—triggered by a button.

Usage

Use the following primitives to build a select menu:

  • <SelectMenu>: The root component that manages selection state and accessibility.
  • <SelectMenuTrigger>: The button that opens the menu.
  • <SelectMenuPopover>: The container for the menu options.
  • <SelectMenuList>: The list of options.
  • <SelectMenuGroup>: Groups options with a label.
  • <SelectMenuOption>: Individual selectable options.
  • <SelectMenuSearch>: Search input within the menu.

Installation

pnpx sxo add select-menu

Skeleton

Use to show a placeholder while content is loading.

Usage

Use the following primitives to build skeletons:

  • <Skeleton>: A placeholder component for loading states, with customizable width, height, and shape.

Installation

pnpx sxo add skeleton

Slider

An input where the user selects a value from within a given range.

Usage

Use the following primitives to build a slider:

  • <Slider>: An input component for selecting a value within a range, with props like min, max, step, and value.

Installation

pnpx sxo add slider

Switch

A control that allows the user to toggle between checked and not checked.

Usage

Use the following primitives to build a switch:

  • <Switch>: A toggle control for on/off states.

Installation

pnpx sxo add switch

Table

A responsive table component.

A list of your recent invoices.
InvoiceStatusMethodAmount
INV001PaidCredit Card$250.00
INV002PendingPayPal$150.00
INV003UnpaidBank Transfer$350.00
INV004PaidPayPal$450.00
Total$1,200.00

Usage

Use the following primitives to build data tables:

  • <Table>: The root container for the table structure.
  • <TableCaption>: An accessible caption for the table.
  • <TableHeader>: Contains the table header rows with column headings.
  • <TableBody>: Contains the main table data rows.
  • <TableFooter>: Contains footer rows, typically for totals or summaries.
  • <TableRow>: Represents a single row in the table.
  • <TableHead>: Header cell for column headings.
  • <TableCell>: Standard data cell for table content.

Installation

pnpx sxo add table

Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

Usage

Use the following primitives to build tabbed interfaces:

  • <Tabs>: The root container that manages tab state and provides context for other tab components.
  • <TabsList>: Contains the tab trigger buttons and provides navigation between tab panels.
  • <TabsTrigger>: Individual tab buttons that activate their corresponding content panels.
  • <TabsContent>: The content panels that are shown/hidden based on the active tab.

Installation

pnpx sxo add tabs

Textarea

Displays a form textarea or a component that looks like a textarea.

Type your message and press enter to send.

Usage

Use the following primitive to build multi-line text inputs:

  • <Textarea>: A multi-line text input component with auto-resize capability, validation support, and accessibility features.

Installation

pnpx sxo add textarea

Toast

A succinct message that is displayed temporarily.

Usage

Use the following primitives to build toast notifications:

  • <Toaster>: The container that manages toast positioning and stacking with alignment options (start, center, end).
  • <Toast>: Individual toast notification with category variants (success, info, warning, destructive) and auto-dismiss functionality.
  • <ToastTitle>: The title text within a toast notification.
  • <ToastDescription>: The description text within a toast notification.

Installation

pnpx sxo add toast

Tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

LeftTopBottomRight

Usage

Use the following primitives to build tooltips:

  • <Tooltip>: The root component that manages tooltip state and positioning.
  • <TooltipTrigger>: The element that triggers the tooltip (usually a button).
  • <TooltipContent>: The content displayed in the tooltip.

Installation

pnpx sxo add tooltip