@woodger/antd
v0.1.5
Published
Ant Design components for Svelte 5 with TypeScript and API compatibility
Maintainers
Readme
Ant Design for Svelte 5
An Ant Design component library for Svelte and TypeScript with UI components, form models, themes, and localization.
Installation
Run this command to use @woodger/antd in your project.
npm install @woodger/antdStyles
ConfigProvider loads the library styles. If you use components without it, import the styles
once in your application entry point or root component. In SvelteKit, you can do this in the
<script> block of the root layout at src/routes/+layout.svelte.
import '@woodger/antd/styles.css';Quick start
<script lang="ts">
import { Button, ConfigProvider, Input, Select } from '@woodger/antd';
let name = $state('');
let role = $state<string | undefined>('developer');
</script>
<ConfigProvider theme={{ mode: 'light', primary: 'blue' }}>
<label for="name">Name</label>
<Input id="name" bind:value={name} />
<label for="role">Role</label>
<Select
id="role"
bind:value={role}
options={[
{ value: 'developer', label: 'Developer' },
{ value: 'designer', label: 'Designer' }
]}
showSearch
allowClear
/>
<Button type="primary" onclick={() => console.log(name, role)}>Save</Button>
</ConfigProvider>Documentation
Using the library
- Components, examples, and limitations. Component catalog
- Models, fields, validation rules, and submission. Forms and validation
- Appearance, sizes, and interface language. Themes and localization
- Theme inheritance, component settings, and
theme.useToken(). Theme context - Colors, sizes, and spacing from
theme.getDesignToken(). Static design tokens - Local sizes and provider defaults. Component sizes
- Field appearance in
ConfigProviderandForm. Control variants - Setting
renderEmptyin ConfigProvider. Empty states - Popup containers, placement, and list width. Popup settings
- Configuring the press effect. Wave effect
- Keyboard interaction and accessibility. Keyboard and focus
- Implemented features and differences from Ant Design. Porting coverage
Developer guide
Install dependencies, build the package, and run checks with the instructions in the developer guide. Shared rules are in the development policies.
License
The project is distributed under the MIT license.
