Skip to content

acronis/shadcn-uikit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

444 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Shadcn UIKit

A monorepo containing 40+ custom UI components built on shadcn/ui principles, with multiple themes, pre-built CSS, and interactive demos.

Architecture in brief: Components are built on Base UI (and partially Radix UI) unstyled primitives. Tailwind CSS is used internally to compile styles β€” consumers receive fully pre-built CSS and can use any styling solution in their own project (CSS Modules, SCSS, a design system token layer, plain CSS, etc.). No Tailwind installation required.

πŸ“¦ Packages

The core UI component library. Ships pre-built CSS β€” consumers do not need Tailwind CSS installed.

Peer dependencies:

  • react ^18.2.0 || ^19.0.0
  • react-dom ^18.2.0 || ^19.0.0
  • tw-animate-css ^1.4.0

Interactive demo application showcasing all components with multiple themes.

Features:

  • Component playground
  • Live theme switching
  • Responsive design

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • pnpm 10+

Installation (development)

# Clone the repository
git clone https://github.com/acronis/shadcn-uikit.git
cd shadcn-uikit

# Install dependencies
pnpm install

# Build all packages
pnpm run build

Running the Demo

# Start the demo application
cd packages/demo
pnpm run dev

The demo will be available at http://localhost:3000.

πŸ“– Usage

Installation

npm install @acronis-platform/shadcn-uikit tw-animate-css
# or
pnpm add @acronis-platform/shadcn-uikit tw-animate-css
# or
yarn add @acronis-platform/shadcn-uikit tw-animate-css

Note: tw-animate-css is a required peer dependency. It replaces the older tailwindcss-animate package.

Import Styles

Import the main stylesheet in your application entry point. This includes the default theme, base styles, components, and utilities β€” all pre-built:

// main.tsx or App.tsx
import '@acronis-platform/shadcn-uikit/styles';

No Tailwind CSS installation is needed. The package ships fully compiled CSS.

Initialize Theme System (Optional)

For theme switching, dark mode support, and persistence:

import { initializeThemeSystem } from '@acronis-platform/shadcn-uikit';

// Initialize on app startup
initializeThemeSystem();

Using Components

All components are exported from the main package:

import {
  Button,
  Card,
  CardHeader,
  CardTitle,
  CardContent,
  CardFooter,
  Input,
  Label,
  Badge,
  Alert,
  AlertTitle,
  AlertDescription,
} from '@acronis-platform/shadcn-uikit';

function MyComponent() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Welcome</CardTitle>
      </CardHeader>
      <CardContent className="space-y-4">
        <div>
          <Label htmlFor="email">Email</Label>
          <Input id="email" type="email" placeholder="Enter your email" />
        </div>
        <Alert>
          <AlertTitle>Info</AlertTitle>
          <AlertDescription>This is an informational message.</AlertDescription>
        </Alert>
      </CardContent>
      <CardFooter>
        <Button>Submit</Button>
        <Badge variant="secondary">New</Badge>
      </CardFooter>
    </Card>
  );
}

Available Components

The library includes 40+ components:

  • Layout: Card, Separator, Sidebar, ScrollArea, ResizablePanel
  • Forms: Input, Textarea, Select, Checkbox, RadioGroup, Switch, Label, Form, PasswordInput
  • Buttons: Button, ButtonGroup
  • Navigation: NavigationMenu, Breadcrumb, Tabs, Pagination, SecondaryMenu
  • Overlays: Dialog, Sheet, Drawer, Popover, Tooltip, AlertDialog
  • Feedback: Alert, Badge, Chip, Tag, Progress, Spinner, Toast (Sonner)
  • Data Display: Table, DataTable, Tree, Avatar, Calendar, DatePicker
  • Advanced: Combobox, Command, Filter, Chart, Empty, Carousel, Collapsible, Accordion
  • Icons: 1500+ internal icons via BaseIcon + auto-generated components

Package Exports

JavaScript

// Main entry β€” all components + utilities
import { Button } from '@acronis-platform/shadcn-uikit';

// React-only entry (same content)
import { Button } from '@acronis-platform/shadcn-uikit/react';

// Individual components (tree-shakeable)
import { Button } from '@acronis-platform/shadcn-uikit/components/Button';

// Tailwind preset (for consumers extending Tailwind β€” requires Tailwind v4)
import preset from '@acronis-platform/shadcn-uikit/tailwind-preset';

CSS

// Default theme + base + components + utilities (most consumers use this)
import '@acronis-platform/shadcn-uikit/styles';

// Everything including all themes
import '@acronis-platform/shadcn-uikit/styles/full';

// Granular imports
import '@acronis-platform/shadcn-uikit/styles/tokens';      // CSS variables only
import '@acronis-platform/shadcn-uikit/styles/base';         // Reset + base styles
import '@acronis-platform/shadcn-uikit/styles/components';   // Component styles only
import '@acronis-platform/shadcn-uikit/styles/utilities';    // Tailwind utility classes

// Individual themes
import '@acronis-platform/shadcn-uikit/styles/themes/acronis-default';
import '@acronis-platform/shadcn-uikit/styles/themes/acronis-ocean';
import '@acronis-platform/shadcn-uikit/styles/themes/cyber-chat';
import '@acronis-platform/shadcn-uikit/styles/themes/acronis-white-label';

TypeScript Support

The library is fully typed with TypeScript:

import type { ButtonProps, CardProps } from '@acronis-platform/shadcn-uikit';

const MyButton: React.FC<ButtonProps> = (props) => {
  return <Button {...props} />;
};

Utility Functions

import { cn } from '@acronis-platform/shadcn-uikit';

// Merge class names
const className = cn('base-class', condition && 'conditional-class', 'another-class');

⚑ Tailwind CSS v4 β€” Notes for Consumers

This package uses Tailwind CSS v4 as a build-time tool to compile component styles. The output is standard CSS β€” consumers are free to use any styling solution in their own projects.

Styling philosophy

Tailwind is not part of the public API. The package ships pre-built CSS files. In your application you can use:

  • CSS Modules or SCSS files with your own design system tokens
  • A dedicated token/theme layer (CSS custom properties)
  • Tailwind CSS (any version), Vanilla Extract, styled-components, or any other solution
  • Plain CSS

The component styles, themes, and design tokens are all available as standalone CSS imports β€” no Tailwind processing needed at your end.

Pre-built CSS consumers (the majority)

Zero impact. Import @acronis-platform/shadcn-uikit/styles as before. No Tailwind installation needed on your side.

tw-animate-css peer dependency (required)

The tw-animate-css package replaces the older tailwindcss-animate (from Tailwind v3). Install it alongside the UI kit:

npm install tw-animate-css

If you previously had tailwindcss-animate as a dependency only for this UI kit, you can remove it.

Tailwind preset users (./tailwind-preset export)

If you use the @acronis-platform/shadcn-uikit/tailwind-preset export in your own Tailwind build, you must upgrade to Tailwind CSS v4:

  • Install @tailwindcss/postcss and tailwindcss ^4.x
  • Update your PostCSS configuration accordingly
  • See the Tailwind CSS v4 upgrade guide for details

Existing Tailwind v3 consumers using pre-built CSS

No direct conflict. However, the pre-built CSS uses Tailwind v4's @layer cascade layers, which may interact with a v3 Tailwind build if both are present in the same page. Recommended: avoid running Tailwind v3 over the pre-built CSS output.

🎨 Themes

Built-in Themes

  1. Acronis Default β€” standard Acronis brand colors (included by default)
  2. Acronis Ocean β€” alternative blue-focused theme with deeper ocean tones
  3. Cyber Chat β€” theme for the Cyber Chat product
  4. Acronis White Label β€” white-label theme for partner customization

Theme Features

  • βœ… Light & Dark modes β€” all themes support both modes via CSS variables
  • βœ… CSS-based β€” zero JavaScript overhead
  • βœ… Tree-shakeable β€” import only themes you use
  • βœ… Customizable β€” override CSS variables or create custom themes
  • βœ… SSR-compatible β€” works with server-side rendering

Theme Switching

Switch themes programmatically:

import { applyTheme, applyColorMode, toggleColorMode } from '@acronis-platform/shadcn-uikit';

// Switch to ocean theme
applyTheme('acronis-ocean');

// Toggle dark mode
toggleColorMode();

// Or set specific mode
applyColorMode('dark');
applyColorMode('light');
applyColorMode('system'); // Follow system preference

Shadow DOM / Embedded Containers

When the app renders inside a shadow root (e.g. via module federation), theme classes must also be applied to the inner container element β€” not just document.documentElement β€” because CSS inside a shadow root uses :host selectors that don't inherit from the document.

Pass additional container elements via the extraRoots parameter:

import { applyTheme, applyNavVariant } from '@acronis-platform/shadcn-uikit';

const innerContainer = document.getElementById('app-container');
applyTheme('acronis-ocean', true, innerContainer ? [innerContainer] : []);

// Same for white-label nav variants
applyNavVariant('ingram-micro', true, innerContainer ? [innerContainer] : []);

Both applyTheme and applyNavVariant accept the same optional parameters:

Parameter Type Default Description
theme / variant ThemeName / WhiteLabelNavVariant β€” The theme or variant to apply
persist boolean true Whether to persist the choice to localStorage
extraRoots HTMLElement[] [] Additional elements to receive the same theme classes

Using Alternative Themes

Import additional theme CSS, then apply:

// Import ocean theme
import '@acronis-platform/shadcn-uikit/styles/themes/acronis-ocean';

// Then apply it
import { applyTheme } from '@acronis-platform/shadcn-uikit';
applyTheme('acronis-ocean');

Creating Custom Themes

Create custom themes by copying the template file and customizing colors:

# See packages/ui/src/styles/themes/_template.scss for the template

See Theme Documentation for details.

πŸ—οΈ Project Structure

shadcn-uikit/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ ui/                    # Core UI components library (@acronis-platform/shadcn-uikit)
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ hooks/         # Custom React hooks
β”‚   β”‚   β”‚   β”œβ”€β”€ lib/           # Utility functions
β”‚   β”‚   β”‚   β”œβ”€β”€ styles/        # SCSS source β€” themes, tokens, base
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ themes/    # Theme SCSS files + template
β”‚   β”‚   β”‚   β”‚   └── tokens/    # Design tokens (CSS variables)
β”‚   β”‚   β”‚   β”œβ”€β”€ types/         # Shared TypeScript types
β”‚   β”‚   β”‚   β”œβ”€β”€ utils/         # Additional utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ index.ts       # Main entry (all exports)
β”‚   β”‚   β”‚   └── react.ts       # React-only entry
β”‚   β”‚   └── package.json
β”‚   β”œβ”€β”€ demo/                  # Demo application
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ components/    # Demo-specific components
β”‚   β”‚   β”‚   β”œβ”€β”€ demos/         # Per-component demo pages
β”‚   β”‚   β”‚   └── layouts/       # App layouts
β”‚   β”‚   └── package.json
β”‚   └── docs/                  # Package-level documentation
β”œβ”€β”€ docs/                      # Project-level documentation
β”‚   β”œβ”€β”€ explorations/          # Research & exploration documents
β”‚   β”œβ”€β”€ features/              # Feature specifications
β”‚   └── team/                  # Team processes & guides
β”œβ”€β”€ git-hooks/                 # Git hook scripts
β”œβ”€β”€ package.json               # Root workspace config
β”œβ”€β”€ pnpm-workspace.yaml        # pnpm workspace definition
└── README.md

πŸ› οΈ Development

Build All Packages

pnpm run build

Type Checking

pnpm run type-check

Linting

pnpm run lint

πŸš€ Quick Reference

Complete Setup Example

// main.tsx
import '@acronis-platform/shadcn-uikit/styles';
import { initializeThemeSystem } from '@acronis-platform/shadcn-uikit';

initializeThemeSystem();

// App.tsx
import { Button, Card, CardHeader, CardTitle, CardContent } from '@acronis-platform/shadcn-uikit';

export function App() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>My App</CardTitle>
      </CardHeader>
      <CardContent>
        <Button>Click me</Button>
      </CardContent>
    </Card>
  );
}

πŸ“š Documentation

πŸ“ License

MIT License β€” Copyright (c) 2026 Acronis International GmbH

See LICENSE for more details.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ”— Links

  • shadcn/ui β€” the original inspiration
  • Base UI β€” unstyled primitives (primary)
  • Radix UI β€” unstyled primitives (NavigationMenu, Slot)
  • Tailwind CSS β€” internal build tool

About

The Acronis shadcn UI Component Library for Web applications based on React

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors