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

@neytron/compact-ui

v0.3.4

Published

Lightweight and customizable Vue 3 UI component library

Readme

Compact UI

Лёгкая типизированная UI-библиотека для Vue 3. Включает элементы форм, навигацию, оверлеи, уведомления и компоненты для отображения данных.

Документация и примеры

Установка

npm install @neytron/compact-ui vue

Требуется Vue >=3.5.0 <4 и современный ESM-сборщик.

Быстрый старт

Подключите стили один раз в entry-файле приложения:

import { createApp } from 'vue';
import App from './App.vue';
import '@neytron/compact-ui/styles.css';

createApp(App).mount('#app');

После этого импортируйте нужные компоненты:

<script setup lang="ts">
import { ref } from 'vue';
import { UiButton, UiInput, UiSelect } from '@neytron/compact-ui';

const name = ref('');
const role = ref<string | number | null>(null);

const roles = [
  { label: 'Разработчик', value: 'developer' },
  { label: 'Дизайнер', value: 'designer' },
];
</script>

<template>
  <form @submit.prevent>
    <UiInput v-model="name" label="Имя" required />
    <UiSelect v-model="role" :options="roles" label="Роль" />
    <UiButton type="submit">Продолжить</UiButton>
  </form>
</template>

Компоненты

  • Формы: UiInput, UiTextarea, UiSelect, UiCheckbox, UiRadio, UiSwitch, UiButton.
  • Данные и обратная связь: UiAlert, UiBadge, UiCard, UiProgress, UiSkeleton, UiSpinner, UiEmptyState, UiAvatar.
  • Навигация: UiAccordion, UiBreadcrumb, UiPagination, UiTabs, UiDropdownMenu.
  • Таблицы: UiDataTable, UiDataTableFilters.
  • Оверлеи: UiDialog, UiPopover, UiTooltip.
  • Уведомления: UiToast, UiToastProvider, useToast.
  • Настройка: UiConfigProvider.

Полный API, интерактивные примеры и описание доступности находятся в документации.

Импорты

Компоненты и TypeScript-типы доступны из общего entry:

import { UiButton, UiInput } from '@neytron/compact-ui';
import type { UiButtonProps, UiSelectOption } from '@neytron/compact-ui';

Также доступны прямые импорты:

import { UiButton } from '@neytron/compact-ui/button';
import { UiInput } from '@neytron/compact-ui/input';
import { UiSelect } from '@neytron/compact-ui/select';

Темы

Без дополнительной настройки используется светлая тема. Тему можно задать для всего приложения или отдельной его части:

<div data-cui-theme="light">...</div>
<div data-cui-theme="dark">...</div>
<div data-cui-theme="system">...</div>

system следует системной настройке prefers-color-scheme.

Цвета, размеры и скругления настраиваются через CSS Custom Properties:

[data-cui-theme='light'] {
  --cui-input-background: #ffffff;
  --cui-input-color: #171513;
  --cui-select-background: #ffffff;
  --cui-select-menu-background: #ffffff;
}

[data-cui-theme='dark'] {
  --cui-input-background: #171717;
  --cui-input-color: #f2f2f2;
  --cui-select-background: #171717;
  --cui-select-menu-background: #111111;
}

.product-theme {
  --cui-color-primary: #7c3aed;
  --cui-color-primary-hover: #6d28d9;
  --cui-radius-md: 12px;
  --cui-control-padding-block-md: 0.5rem;
}
<template>
  <section class="product-theme" data-cui-theme="light">
    <UiInput v-model="email" label="Email" />
    <UiButton>Сохранить</UiButton>
  </section>
</template>

Все доступные токены перечислены в руководстве по темам.

Локализация

Системные подписи компонентов по умолчанию используются на английском. Для локализации передайте нужные сообщения в UiConfigProvider:

<script setup lang="ts">
import { UiConfigProvider } from '@neytron/compact-ui';

const locale = {
  close: 'Закрыть',
  clearInput: 'Очистить поле',
  clearSelection: 'Очистить выбор',
  loading: 'Загрузка',
  noOptions: 'Нет вариантов',
  noResults: 'Ничего не найдено',
};
</script>

<template>
  <UiConfigProvider :locale="locale">
    <App />
  </UiConfigProvider>
</template>

Непереданные сообщения сохраняют значения по умолчанию. Полный список ключей доступен в руководстве по локализации.

Nuxt

Отдельный Nuxt-плагин не требуется. Добавьте стили в nuxt.config.ts:

export default defineNuxtConfig({
  css: ['@neytron/compact-ui/styles.css'],
});

Затем импортируйте компоненты обычным способом:

<script setup lang="ts">
import { UiButton } from '@neytron/compact-ui/button';
</script>

<template>
  <UiButton>Продолжить</UiButton>
</template>

Поддержка браузеров

Поддерживаются современные браузеры с CSS Custom Properties, logical properties, color-scheme и :has(). Internet Explorer и другие устаревшие браузеры не поддерживаются.

Лицензия

MIT.