Skip to content

tahmidbintaslim/sun-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐Ÿ˜Ž Smug UI

MUI Components, Reimagined.

7 design variants. Zero config. 100% TypeScript. Full MUI ecosystem.

npm version Bundle Size Tests TypeScript License: MIT

Live Demo ยท Documentation ยท Storybook



๐ŸŽฏ The Problem We Solve

Building with Material-UI is powerful, but painful:

Pain Point How Sun UI Fixes It
๐Ÿ˜ค MUI's default variants are limited (3 options) โœ… 7 beautiful variants out of the box
๐ŸŽจ Spending hours on consistent styling โœ… Production-ready design tokens included
๐Ÿ”ง Complex theme customization โœ… Beautiful defaults that just work
๐Ÿ“š Steep learning curve for teams โœ… Intuitive API โ€” same props across all components
โ™ฟ Accessibility as afterthought โœ… WCAG 2.1 AA compliant by default

Smug UI is for teams who love MUI's power but want beautiful, opinionated defaults without starting from scratch.


โšก Quick Start

npm install @smug-ui/react @mui/material @emotion/react @emotion/styled
import { Button } from '@smug-ui/react';

// 7 variants ร— 7 colors ร— 5 sizes = Infinite possibilities
<Button variant="solid" color="primary">Get Started</Button>
<Button variant="soft" color="success">Save Changes</Button>
<Button variant="ghost" color="danger">Delete</Button>
<Button variant="dash" color="info">Upload File</Button>

That's it. No theme setup required. Beautiful by default.


๐ŸŽจ 7 Design Variants

Every Sun UI component supports 7 design variants for maximum flexibility:

Variant Use Case Preview
solid Primary actions, CTAs Filled background, high contrast
soft Secondary actions Subtle tinted background
outlined Tertiary actions Border with transparent background
dash Upload zones, placeholders Dashed border style
ghost Minimal actions Shows color on hover
plain Text-only actions No background or border
link Inline links Underlined, hyperlink style
<Button variant="solid">Solid</Button>
<Button variant="soft">Soft</Button>
<Button variant="outlined">Outlined</Button>
<Button variant="dash">Dash</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="plain">Plain</Button>
<Button variant="link">Link</Button>

๐Ÿ†š Why Sun UI Over Alternatives?

Feature Sun UI Raw MUI Chakra UI Mantine daisyUI
React Required โœ… โœ… โœ… โœ… โŒ
Design Variants 7 3 4 4 10+
MUI Ecosystem โœ… Full โœ… Full โŒ โŒ โŒ
Design Tokens โœ… Built-in Manual โœ… โœ… Via Tailwind
TypeScript 100% Strict โœ… โœ… โœ… N/A
Zero Config โœ… โŒ โœ… โœ… โœ…
Learning Curve Low (if know MUI) Medium Low Low Very Low

The Sweet Spot

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                                     โ”‚
โ”‚   Raw MUI โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Sun UI โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’ Opinionated Systems        โ”‚
โ”‚   (Flexible           (Best of          (Chakra, Mantine โ€”          โ”‚
โ”‚    but verbose)        both worlds)       locked ecosystem)         โ”‚
โ”‚                                                                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Sun UI gives you:

  • ๐ŸŽจ Beautiful defaults (like Chakra/Mantine)
  • ๐Ÿ”Œ Full MUI ecosystem access (600+ components)
  • ๐Ÿ› ๏ธ Complete customization (it's still MUI under the hood)

๐Ÿ“ฆ Packages

Package Description Install
@smug-ui/react React component library npm i @smug-ui/react
@smug-ui/theme MUI v5 theme configuration npm i @smug-ui/theme
@smug-ui/tokens Design tokens (colors, spacing) npm i @smug-ui/tokens
@smug-ui/icons Icon library (2000+ SVG) npm i @smug-ui/icons
@smug-ui/core Headless primitives ๐Ÿšง Coming soon

๐Ÿงฉ Components

14 Production-Ready Components

Form Controls

  • โœจ Button โ€” 7 variants, loading states, icons
  • ๐Ÿ“ TextField โ€” Validation, multiline, icons
  • ๐ŸŽฏ Select โ€” Single & multi-select
  • โ˜‘๏ธ Checkbox โ€” Indeterminate support
  • ๐Ÿ”˜ Radio โ€” Radio groups
  • ๐Ÿ”˜ Switch โ€” Toggle switch

Feedback

  • โš ๏ธ Alert โ€” Notifications with actions
  • ๐Ÿž Snackbar โ€” Toast notifications
  • ๐Ÿ’ฌ Tooltip โ€” Helpful hints
  • ๐Ÿ“ฆ Dialog โ€” Modal dialogs
  • ๐Ÿ“ฅ Drawer โ€” Side panels
  • ๐ŸŽˆ Popover โ€” Floating content

Data Display

  • ๐Ÿ‘ค Avatar โ€” User profiles
  • ๐Ÿท๏ธ Badge โ€” Status indicators
  • ๐Ÿ’ณ Card โ€” Content containers
  • ๐Ÿท๏ธ Chip โ€” Tags & filters

โœจ Features

Feature Description
๐ŸŽจ 7 Design Variants solid, soft, outlined, dash, ghost, plain, link
๐ŸŽฏ 7 Color Schemes primary, secondary, success, warning, danger, info, neutral
๐Ÿ“ 5 Sizes xs, sm, md, lg, xl
๐ŸŒ™ Dark Mode Automatic light/dark theme support
โ™ฟ Accessible WCAG 2.1 AA compliant, keyboard navigation
๐Ÿ“ฆ Tree-Shakeable Import only what you use
๐Ÿ”ง TypeScript 100% type-safe with strict mode
๐Ÿงช Tested 62 tests passing, real browser testing
๐Ÿ“š Documented Storybook with live examples

๐Ÿš€ Full Example

import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import { lightTheme } from '@smug-ui/theme';
import { Button, TextField, Card, Alert } from '@smug-ui/react';

export default function App() {
  return (
    <ThemeProvider theme={lightTheme}>
      <CssBaseline />

      <Card variant="soft">
        <Alert variant="solid" color="success">
          Welcome to Sun UI!
        </Alert>

        <TextField variant="outlined" label="Email" fullWidth />

        <Button variant="solid" color="primary" fullWidth>
          Get Started
        </Button>
      </Card>
    </ThemeProvider>
  );
}

๐Ÿ“– Documentation

Resource Description
๐Ÿ“š Documentation Complete usage guide
๐ŸŽจ Storybook Interactive component explorer
๐Ÿ—๏ธ Architecture Technical deep-dive
๐Ÿงช Testing Guide Testing patterns
๐Ÿค Contributing How to contribute

๐Ÿ› ๏ธ Development

# Clone & install
git clone https://github.com/tahmidbintaslim/smug-ui.git
cd smug-ui && pnpm install

# Development
pnpm dev              # Start Storybook
pnpm build            # Build all packages
pnpm test             # Run tests
pnpm lint             # Lint code

Project Structure

smug-ui/
โ”œโ”€โ”€ apps/docs/         โ†’ Storybook documentation
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ react/         โ†’ React components
โ”‚   โ”œโ”€โ”€ theme/         โ†’ MUI theme configuration
โ”‚   โ”œโ”€โ”€ tokens/        โ†’ Design tokens
โ”‚   โ”œโ”€โ”€ icons/         โ†’ Icon library
โ”‚   โ””โ”€โ”€ core/          โ†’ Headless primitives
โ””โ”€โ”€ ...

๐Ÿ—บ๏ธ Roadmap

โœ… v1.0 โ€” Foundation (Current)

  • 14 core components with 7 variants
  • Comprehensive test suite (124 tests)
  • Full TypeScript support
  • Dark mode
  • Storybook documentation

๐Ÿšง v1.1 โ€” Expansion (Q1 2026)

  • 5 additional components (Table, Tabs, Accordion, Stepper, Menu)
  • Theme builder UI
  • Figma design kit
  • CLI scaffolding tool

๐Ÿ”ฎ v2.0 โ€” Headless (Q2 2026)

  • @smug-ui/core headless primitives
  • Framework-agnostic tokens
  • Animation library
  • Advanced theming system

๐Ÿค Contributing

We welcome contributions! See our Contributing Guide.

# Quick contribution workflow
git checkout -b feat/your-feature
pnpm test && pnpm lint
git commit -m "feat: add awesome feature"
git push origin feat/your-feature

๐Ÿ“Š Stats

๐Ÿ“ฆ Components ๐ŸŽจ Variants ๐Ÿงช Tests โ™ฟ Accessibility ๐Ÿ“š Stories
14 7 62 WCAG 2.1 AA 82

๐Ÿ™ Credits

Built with:


๐Ÿ‘จโ€๐Ÿ’ป Author

Tahmid Bin Taslim


๐Ÿ“„ License

MIT ยฉ 2026 Tahmid Bin Taslim


Made with โ˜€๏ธ by the Sun UI team

โญ Star us on GitHub โ€” it means everything!

Report Bug ยท Request Feature ยท Contribute

About

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages