skip section navigation

public prop names

use the semantic prop names in the current public components. similar-looking controls don’t all own state the same way, so check both the prop spelling and the update contract when moving an existing example. the packaged migration guide maps the previous props, dialog setup and CSS names to this update.

values and callbacks

componentcurrent contract
Inputbind:value, onValueInput(event), onValueBlur(event)
Selectorbind:selected, onValueChange(value)
ColorPickerbind:value, onValueChange(value)
Checklistbind:value as string IDs, onValueChange(value)
Togglechecked plus app-owned onclick update
Switcherchild buttons and app-owned loaf-active selection
CarouseldefaultSelected index and onSelect(item)
Stepsbind:currentStep
Popoverexpanded plus onDismiss(reason)
direct dialogsbind:open, optional bind:close, onClose

don’t replace every callback with onchange. Input’s named callbacks receive native events, while Selector and ColorPicker callbacks receive values. Toggle’s checked state isn’t bindable.

semantic names and casing

use FieldLabel’s htmlFor, PageContainer’s pageId and maxWidth, URLButton’s href, displayUrl and label, and GitHubStars’ repository and optional count. visual component props such as Icon, Component, Illustration and ButtonIcon retain their capital letters. image props such as imageSrc and iconSrc take URLs, not components.

update a toggle deliberately

svelte
<script>
	import { Toggle } from '@ciabi/loafkit-ui';
	let quiet = $state(false);
</script>

<Toggle label="Quiet reading mode" checked={quiet} onclick={() => quiet = !quiet} />

the handler updates app state rather than expecting the visual control to mutate it. apply the same ownership check before migrating another field.

package boundaries

replace old dialog-holder setup with createDialog, or directly render a dialog view with an open binding. Slider and the new components are exported from the package root. repository aliases such as $lib aren’t consumer import paths.

use your installed version’s types and the component’s guide alongside the migration table. native HTML attributes keep native spelling unless a documented component prop explicitly maps them, as Input does for inputMode and minLength.