🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@enonic/ui

Package Overview
Dependencies
Maintainers
3
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enonic/ui

Enonic UI Component Library

latest
Source
npmnpm
Version
0.25.1
Version published
Weekly downloads
192
-38.06%
Maintainers
3
Weekly downloads
 
Created
Source

@enonic/ui

A modern UI component library built with Preact/React, TypeScript, and Tailwind CSS.

Installation

pnpm

With React

pnpm add @enonic/ui react react-dom @radix-ui/react-slot focus-trap-react

With Preact

pnpm add @enonic/ui preact @radix-ui/react-slot focus-trap-react
npm

With React

npm install @enonic/ui react react-dom @radix-ui/react-slot focus-trap-react

With Preact

npm install @enonic/ui preact @radix-ui/react-slot focus-trap-react
Yarn

With React

yarn add @enonic/ui react react-dom @radix-ui/react-slot focus-trap-react

With Preact

yarn add @enonic/ui preact @radix-ui/react-slot focus-trap-react

Usage

Import Components

import { Button, Input } from '@enonic/ui';

function App() {
  return (
    <div>
      <Button variant='primary' size='md'>
        Click Me
      </Button>
      <Input placeholder='Enter text...' />
    </div>
  );
}

Styles

Tailwind CSS

If your project uses Tailwind CSS, you can import the styles directly from the library:

/* Import Tailwind CSS */
@import 'tailwindcss';
/* Required by some components that use animations */
@import 'tw-animate-css';

/* Preset styles (includes tokens, base, and utilities) */
@import '@enonic/ui/preset.css';

CSS Only

If you only need the pre-built CSS styles:

@import '@enonic/ui/style.css';

Peer Dependencies

This library requires one of the following frameworks:

React

{
  "react": "^19.0.0",
  "react-dom": "^19.0.0",
  "@radix-ui/react-slot": "^1.2.0",
  "focus-trap-react": "^11.0.0"
}

Preact

{
  "preact": ">=10.0.0",
  "@radix-ui/react-slot": "^1.2.0",
  "focus-trap-react": "^11.0.0"
}

Icon Libraries (Optional)

The library uses and expects one of the following icon libraries to be used to provide icons for the components:

  • lucide-react (>=0.500.0) - For React projects
  • lucide-preact (>=0.500.0) - For Preact projects

Development

# Install dependencies
pnpm install

# Start development server with Storybook
pnpm dev

# Build the library
pnpm build

# Run type checking
pnpm typecheck

# Run linting
pnpm lint

# Check bundle size
pnpm size

License

MIT

Keywords

enonic

FAQs

Package last updated on 11 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts