Files
zeekay e0ec477433 feat: full docs modernization — zero 404s, 585 pages, dep updates
- Enable all 15 finance component docs (from .disabled → .mdx)
- Create stock-market.mdx, 8 chart docs, 8 block docs, 2 framework docs
- Add direction.tsx component (RTL/LTR support from upstream shadcn)
- Add xs/icon-xs button sizes, data-variant/data-size attributes
- Fix build-registry.mts to handle default exports in namespace re-exports
- Add default props to order-entry, positions-list, orders-history, trading-panel
- Fix 18 navigation stubs → re-export from root implementations
- Add 44 orphaned MDX files to nav (installation, dark-mode, desktop, guides, etc)
- Migrate 6 framer-motion imports → motion/react
- Bump React 19.2.0→19.2.4, Next.js 16.0.1→16.1.6, motion→12.34.0
- Align lucide-react, sonner v2, tailwind-merge v3, postcss-selector-parser v7
- Remove framer-motion dep (superseded by motion)
- Fix @types/react-dom, TypeScript versions across workspaces
2026-03-03 07:34:51 -08:00

101 lines
1.8 KiB
Plaintext

---
title: Svelte
description: Using @hanzo/ui components in Svelte and SvelteKit applications.
---
# Svelte Guide (Beta)
@hanzo/ui provides Svelte 5 components with full TypeScript support. This integration is currently in beta.
## Installation
<Steps>
### Install the package
```bash
npm install @hanzo/ui
# or
pnpm add @hanzo/ui
```
### Install Svelte and dependencies
```bash
npm install svelte
npm install -D tailwindcss postcss autoprefixer
```
### Configure Tailwind
```js title="tailwind.config.js"
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{html,js,svelte,ts}",
"./node_modules/@hanzo/ui/**/*.{js,ts,svelte}",
],
theme: {
extend: {},
},
plugins: [],
}
```
</Steps>
## Usage
```svelte
<script lang="ts">
import { Button, Card, Input } from '@hanzo/ui/svelte'
let count = $state(0)
</script>
<Card>
<Button onclick={() => count++}>
Clicked {count} times
</Button>
<Input bind:value={count} type="number" />
</Card>
```
## SvelteKit Integration
```svelte
<!-- src/routes/+page.svelte -->
<script lang="ts">
import { Button, Card } from '@hanzo/ui/svelte'
</script>
<Card>
<h1>Welcome to SvelteKit</h1>
<Button>Click me</Button>
</Card>
```
## Component Coverage
**Available:**
- Button, Card, Input, Label, Badge
- Checkbox, Dialog, Select, Separator
- Tabs, Toggle, Tooltip
**In Progress:**
- Form components
- Data Table
- Advanced animations
## Status
This integration is in **beta**. Some components may have limited functionality compared to the React version. Please report issues on [GitHub](https://github.com/hanzoai/ui/issues).
## Next Steps
- [View all components](/docs/components)
- [React Guide](/docs/frameworks/react) (stable)
- [Vue Guide](/docs/frameworks/vue) (stable)