Ant Design Svelte

Questions and solutions

Check the error message, package public types and minimal example. Below are common causes of connectivity, reactivity, SSR, and styling issues.

Package not found or changes not visible

Install the package with npm install @woodger/antd from your application's root directory. Check the installed version with npm ls @woodger/antd.

To check the component entry from the application directory, pass the svelte export condition to Node.js. This command only prints the path.

node --conditions=svelte --input-type=module -e "console.log(import.meta.resolve('@woodger/antd'))"

The path points to the entry point of the installed package. To update to the version tagged latest, run npm install @woodger/antd@latest and restart the development server.

React example does not pass TypeScript

Check the imports and Props on the component page. For form fields, use Form.Item or the separate FormItem export. Use Svelte snippets for fragments of markup.

Don't disable typing or add any for the sake of an unknown property. Available values, callbacks, and constraints belong to the current package types.

Field does not change or defaultValue is not updated

For a managed field, pass the value and process the change, or use the supported bind. defaultValue specifies the initial state; changing it is not a universal way to update the control.

undefined and null depend on the contract of the family: for DatePicker the empty value is null, for multiple Select an array is used. FormItem.name does not automatically substitute value; The model is changed through setters. See Form and value model.

Theme is not updated or the settings affect neighbors

Check the position of ConfigProvider in the Svelte tree. Calling theme.useToken in a parent's script does not read the provider, which that parent will only render below. Place the design token consumer in a child component.

Do not save token through one-time destructuring if reactive updates are needed. Do not recreate the entire area via the key block to change the color: this will reset the drafts.

An empty component config replaces the parent record, but does not reset the theme. theme.inherit:false resets tokens/algorithm/components inheritance, preserving individual provider settings. Details - in topics.

Styles or popup look different

Check the CSS connection, global reset, computed font-size/line-height, local style and nearest component size. Styling an internal node requires the semantic API or a properly qualified :global.

Popup may be outside the CSS wrapper, under clipping or in another stacking context. Choose a supported container; Don't increase the z-index of all elements at the same time. For a fixed element, the transform of the ancestor changes the containing block. When embedding Sider into an example or card, limit its trigger to the preview area.

The order of layers is described in styles, popup and holders - in ConfigProvider.

Server render is different from browser

Check the sources of start time, date, locale, theme and storage. Don't read the DOM in a script under SSR and don't store the userform in a shared server module variable.

Select date formats explicitly. It is not DatePicker's responsibility to transfer the ISO to the server; The time zone and conversion are determined by the application. For SSR, pass serializable data, and create Dayjs in the UI.

Do not disable SSR for all pages as the first solution to the error. SSR Guide shows the initial theme from the cookie and the validation order without JavaScript.