@mpiorowski/svelte-init
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

SvelteInit

A low-overhead Svelte UI library with the basic, most useful components and functions, to help with the initial development.

npm npm npm

Demo

svelte-init.vercel.app

Features

  • Working out of the box most useful components, without any additional configuration.
  • Written fully in TypeScript
  • Using Tailwind for styling. But can be done with pure css also :).
  • No dark / light theme included, but can be easly achived using tailwind theme.

Components

Functions

Instalation

npm install @mpiorowski/svelte-init

Inside Your main *.css file (imported in root layout) paste color/shadow configuration:

:focus {
    outline: none;
}

.no-scroll {
    overflow: hidden;
}

.input {
    @apply shadow transition bg-white border border-gray-300 hover:border-gray-400 focus:ring focus:ring-gray-200 placeholder-gray-300;
}
.input.error {
    @apply border border-red-500 placeholder-red-500;
}
.text-error {
    @apply text-red-500;
}
input[type="checkbox"], input[type="radio"] {
    @apply accent-slate-600;
}
.button {
    @apply shadow transition;
}
.button.primary {
    @apply bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-600 focus:ring;
}
.button.error {
    @apply bg-red-500 text-white hover:bg-red-600 focus:ring-red-600 focus:ring;
}
.button.ghost {
    @apply bg-gray-200 text-gray-600 hover:bg-gray-300 focus:ring-gray-300 focus:ring;
}
.button.primary.link {
    @apply text-blue-500 hover:underline hover:bg-white;
}
.button.error.link {
    @apply text-red-500 hover:underline hover:bg-white;
}
.button.ghost.link {
    @apply text-gray-600 hover:underline hover:bg-white;
}
.toast {
    @apply shadow-md;
}
.toast.success {
    @apply bg-green-500 text-white;
}
.toast.error {
    @apply bg-red-500 text-white;
}
.toast.info {
    @apply bg-blue-500 text-white;
}
.toast.warning {
    @apply bg-yellow-500 text-white;
}
.drawer, .modal {
    @apply shadow-md bg-gray-100;
}
.dropdown {
    @apply shadow transition bg-white border border-gray-300;
}
.tooltip-text {
    @apply shadow transition bg-gray-600 text-gray-200;
}

Package Sidebar

Install

npm i @mpiorowski/svelte-init

Weekly Downloads

1

Version

2.1.1

License

MIT

Unpacked Size

386 kB

Total Files

87

Last publish

Collaborators

  • mpiorowski