@sv-sleek/ui
v1.0.0
Published
A sleek Svelte UI component library.
Readme
Sleek: a truly Sveltesque UI Component Library
Sleek is a Svelte UI component library designed to be minimal, flexible, and easy to use.
The main inspiration is ofc Shadcn/ui, but with a focus on Svelte's unique capabilities and idioms.
Installation
WIPUsage
<script>
import { Button } from 'sleek';
</script>
<Button onclick={() => console.log('Clicked!')}>Click Me</Button>Why Sleek?
- Sveltesque: Embraces Svelte's styling simplicity, you don't need to add anything to your project to use it (no Tailwind CSS).
- Minimal: Only includes essential components, no bloat.
- Flexible: You can use as an NPM package or import the component code directly with our cli tool
(WIP).
Our friends at Flowbite Svelte are doing some amazing work, but I personally didn't want to use Tailwind CSS as it goes against the reason I picked Svelte in the first place.
Svelte solves the styling problem in a very elegant way, no more CSS-in-JS, no more Tailwind classes (and ugly code)... I wanted to build a library that embraces that philosophy, while bringing the composability of Shadcn/ui to Svelte.
Contributing to Sleek UI Components
Follow this minimal pattern for all UI components:
- Types: Use types in
types.tsfor common properties (Size, etc.) - Component-specific types: Create in component's
types.tsfile - Wrapper pattern: Create reusable wrappers for shared behavior
- Minimal props: Only expose what's absolutely necessary
Example Structure
component/
├── types.ts # Component-specific interfaces
├── wrapper.svelte # Shared behavior/styling
└── variants.svelte # Specific implementationsButton Example
ButtonWrapper: Handles clicks, disabled state, sizingIconButton: Extends wrapper with icon displayTextButton: Extends wrapper with text display
Use Size type for consistent sizing across components.
