Skip to content

Latest commit

Β 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@dendelion/mojo-ui

Retro styled React component library with nature-themed design tokens and glassmorphism.

npm version npm downloads CI Status license TypeScript React Tailwind CSS PRs Welcome

πŸ“¦ NPM β€’ πŸ™ GitHub β€’ ✨ Features β€’ πŸš€ Installation β€’ πŸ“š Components

Features

  • 28 Components β€” Buttons, forms, layout, navigation, feedback, data display
  • Tailwind CSS Preset β€” Reusable mojoPreset with nature-themed color tokens
  • Glassmorphism β€” Shared style utilities for glass card patterns
  • TypeScript β€” Full TypeScript support with strict typing
  • SCSS Modules β€” Scoped styling with SCSS modules
  • Accessible β€” ARIA labels and keyboard navigation
  • Animated β€” Smooth transitions powered by framer-motion

Installation

npm install @dendelion/mojo-ui
# or
yarn add @dendelion/mojo-ui
# or
pnpm add @dendelion/mojo-ui

Peer Dependencies

npm install react react-dom framer-motion tailwindcss

Quick Start

1. Configure Tailwind CSS

// tailwind.config.js
import { mojoPreset } from '@dendelion/mojo-ui/tailwind';

export default {
  presets: [mojoPreset],
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
};

2. Import Global Styles

// In your app entry (e.g., main.scss)
@import '@dendelion/mojo-ui/src/globals.scss';

3. Use Components

import { Button, Card, Input } from '@dendelion/mojo-ui';

function App() {
  return (
    <Card title="Welcome">
      <Input placeholder="Enter your name" />
      <Button variant="green" title="Submit" />
    </Card>
  );
}

Components

Basic Input

  • Button β€” Retro-styled 3D buttons (green, yellow, gray, red)
  • IconButton β€” Circular icon buttons
  • Input β€” Text input with label support
  • Checkbox β€” Toggle checkbox
  • Select β€” Dropdown select
  • Textarea β€” Multi-line text input
  • Switch β€” Toggle switch with variants
  • Radio β€” Radio button group (horizontal/vertical)
  • Slider β€” Range slider with analog feel

Layout

  • Card β€” Container with header and footer
  • Panel β€” Multi-section container
  • PageLayout β€” Standard page structure
  • StatsGrid β€” Statistics grid layout

Navigation

  • Tabs β€” Tab navigation
  • VinylTabs β€” Themed tab navigation
  • NavigationIsland β€” Floating navigation bar

Feedback

  • ProgressBar β€” Segmented progress bar
  • CircularProgress β€” Circular progress indicator
  • StatsCard β€” Single statistic display
  • StatusIndicator β€” Color-coded status badge
  • Skeleton β€” Loading placeholder
  • Badge β€” Status/label badge with dot indicators
  • Alert β€” Alert banner with variants
  • Toast β€” Notification toasts with auto-dismiss

Overlay

  • Modal β€” Animated dialog overlay
  • Popup β€” Dropdown menu
  • Tooltip β€” Hover information tooltip

Data Display

  • DataTable β€” Table with retro styling

Icons

import {
  CheckIcon, CloseIcon, PlusIcon, SearchIcon,
  MenuIcon, SettingsIcon, ArrowUpIcon, ArrowDownIcon,
  SortIcon, FilterIcon,
} from '@dendelion/mojo-ui';

Shared Styles

Reusable glassmorphism and layout utilities:

import {
  container, content, title,
  statsCard, statsTitle, statsValue,
  statsGrid, serviceGrid, actionsGrid, recentList,
  glassmorphism, layout, grids, sharedStyles,
} from '@dendelion/mojo-ui/styles';

Design Tokens

Nature Colors

Color Shades Usage
moss fog, calm, DEFAULT, deep, relic, accent Success, growth
bark fog, calm, DEFAULT, deep, relic Structure, wood
coal fog, calm, DEFAULT, deep, relic Backgrounds, dark surfaces
clay fog, calm, DEFAULT, deep, relic Warm accents
river fog, calm, DEFAULT, deep, relic Info, water elements
paper fog, calm, DEFAULT, deep, relic, accent Light surfaces
sun fog, calm, DEFAULT, deep, relic Highlights, warnings
ember fog, calm, DEFAULT, deep, relic Errors, danger

Typography

Family Usage
Tiny5 Display text, headings
KyivType Sans UI elements, form inputs
KyivType Serif Body text
JetBrains Mono Code, monospace

Development

# Install dependencies
npm install

# Start showcase
npm run dev

# Build library
npm run build

# Type check
npm run check-types

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages