Config

Layout

App-wide defaults for every component inside it, set once in the root layout instead of at each call site: the locale of the calendars, date fields, NumberInput and FileDropzone (defaultLocale), where floating parts portal to (defaultPortalTo), the reading direction (dir), and strings, the text Zest shows and reads out that isn't the app's content (close buttons, landmark names, "No results found."). Unset strings stay English. A Config inside another overrides only what it sets, and a component's own prop (closeLabel) wins over both.

import { Config } from '@limerdev/zest';
Config for AI tools (llms.txt)
Use for
A non-English app: one Config in the root layout with the app's locale and strings.
Don't
Passing the same label to every instance of a component: set it in strings once.

Examples

Swedish

One Config in the root layout sets the locale and the strings for every component in the app. Strings it leaves out stay English.

Props

Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that renders your own element, with props to spread on it).

Config

Prop Type Default Description
defaultLocale string the browser's The locale of the calendars, date fields, NumberInput and FileDropzone inside, unless one sets its own (sv-SE). Bits UI's defaultLocale.
defaultPortalTo string | Element 'body' Where the floating parts inside portal to: a selector or an element. Bits UI's defaultPortalTo.
dir "ltr" | "rtl" – The reading direction of the components inside that take dir.
strings StringOverrides – The strings Zest shows and reads out (close buttons, landmarks, empty lists), over those of the Config around it, then English. A component's own prop still wins.