npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

losa-ui

v1.0.0

Published

Lost Saga UI Component Library - Custom UI components with game-inspired design system

Readme

Losa-UI

A custom UI component library inspired by Lost Saga's game interface design. Features gradient buttons, custom CSS variables, and a game-inspired design system.

Installation

npm install losa-ui

Peer Dependencies

This package requires the following peer dependencies:

npm install react react-dom tailwindcss

Setup

1. Import the styles

Add the following to your main CSS file or app entry point:

import 'losa-ui/styles';

Or in your CSS:

@import 'losa-ui/styles';

2. Configure Tailwind CSS

Make sure your tailwind.config.js includes the losa-ui components:

module.exports = {
  content: [
    // ... your files
    './node_modules/losa-ui/dist/**/*.{js,ts,jsx,tsx}',
  ],
  theme: {
    extend: {
      // losa-ui uses CSS variables, extend as needed
    },
  },
};

Usage

Import components

import { Button, Card, ItemCard, cn } from 'losa-ui';

Button

import { Button } from 'losa-ui';

// Default button
<Button>Click me</Button>

// Variants
<Button variant="blue">Blue Button</Button>
<Button variant="green">Green Button</Button>
<Button variant="red">Red Button</Button>

// Sizes
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>

// With icons
<Button iconLeft={<Icon />}>With Icon</Button>
<Button iconRight={<Icon />}>With Icon</Button>

// Loading state
<Button isLoading>Loading...</Button>

Card Components

import { Card, CardHeader, CardTitle, CardContent, CardFooter, ItemCard } from 'losa-ui';

// Basic Card
<Card>
  <CardHeader>
    <CardTitle>Card Title</CardTitle>
  </CardHeader>
  <CardContent>Content here</CardContent>
  <CardFooter>Footer content</CardFooter>
</Card>

// Item Card (game item style)
<ItemCard
  name="Epic Sword"
  price="1000 Gold"
  image="/path/to/image.png"
  rarity="unique"
  onBuy={() => console.log('Buy clicked')}
/>

Form Components

import { Input, Textarea, Checkbox, Select } from 'losa-ui';

<Input placeholder="Enter text..." />
<Textarea placeholder="Enter description..." />
<Checkbox checked={true} />

Dialog & Modal

import { Dialog, Modal } from 'losa-ui';

// Dialog
<Dialog>
  <DialogTrigger>Open</DialogTrigger>
  <DialogContent>
    <DialogHeader>
      <DialogTitle>Dialog Title</DialogTitle>
    </DialogHeader>
    <DialogContent_body>Content here</DialogContent_body>
    <DialogFooter>
      <Button>Close</Button>
    </DialogFooter>
  </DialogContent>
</Dialog>

// Modal
<Modal isOpen={isOpen} onClose={handleClose}>
  <ModalHeader>Title</ModalHeader>
  <ModalBody>Content</ModalBody>
  <ModalFooter>
    <Button onClick={handleClose}>Close</Button>
  </ModalFooter>
</Modal>

Navigation

import { Navbar, Nav, Footer } from 'losa-ui';

<Navbar logo="/logo.png" items={navItems} />
<Footer />

Theme Toggle

import { ThemeProvider, ThemeToggle } from 'losa-ui';

// Wrap your app with ThemeProvider
<ThemeProvider>
  <YourApp />
  <ThemeToggle />
</ThemeProvider>

Components List

  • Layout: Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter
  • Buttons: Button (with variants: default, blue, green, red)
  • Form: Input, Textarea, Checkbox, Select, Switch, Slider, Calendar
  • Display: Badge, Avatar, Alert, Progress, Skeleton, Table
  • Overlay: Dialog, Modal, Drawer, Sheet, Popover, Tooltip, HoverCard
  • Navigation: Navbar, Nav, Footer, Breadcrumb, Pagination, Tabs
  • Feedback: Toast, Sonner, AlertDialog, Progress
  • Data: Chart, Carousel
  • Game-specific: ItemCard, NewsCard, RankEntry, DriverCard, HeroCard, Headbox, Stage

CSS Variables

Losa-UI uses CSS custom properties for theming. The following variables are available:

/* Light theme (default) */
--ls-container-bg: #f4f4f4;
--ls-card-bg: #f8f8f8;
--ls-card-border: #d0d0d0;
--ls-card-shadow: 0 2px 4px rgba(0,0,0,0.1);
--ls-text-primary: #333;
--ls-text-extreme: #111;
--ls-menu-link: #555;
--ls-btn-border: #bbb;
/* ... and more */

/* Dark theme */
.dark {
  --ls-container-bg: #2a2a2a;
  --ls-card-bg: #333;
  --ls-text-primary: #e0e0e0;
  /* ... and more */
}

Utility Functions

cn() - Class name merger

import { cn } from 'losa-ui';

const className = cn(
  'base-classes',
  isActive && 'active-classes',
  'conditional-classes'
);

License

MIT