Mixins / API

foldkit-mixins-ui

foldkit-mixins-ui — published slot contracts and mixin adapters for @foldkit/ui. Components still lay out their own markup through toView; each adapter's toView hands it the bundles with attached Mixins applied, and resolve applies them to bundles already in hand.

Namespaces

Accordion
Alert
Anchor@foldkit/ui's anchor positioning as a Mount and a Behavior: the floating element is placed against the button whose id is given, with placement, gap,…
AspectRatio
Avatar
Badge
Banner
Breadcrumb
Button
ButtonGroup
Calendar
Card
Carousel
Checkbox
CheckboxGroup
CodeBlock
ColorPicker
Combobox
ComboboxViewForked combobox views: the single and multi variants over the shared transcription in ./comboboxShared.js. Each create binds the upstream bundle for the…
Command
ContextMenu
DatePicker
DatePickerViewA DatePicker view with the consumer toView seam @foldkit/ui/datePicker does not expose. State, Messages, update, Commands, and helpers stay upstream; only…
DateRange
Dialog
Disclosure
Empty
Fieldset
FileDrop
HoverIntent
Icon
IconsAttribute-dispatched mask icons: mechanisms, not components. An element shows the icon its attribute names, drawn from --icon over the text's color. Where…
Input
InputCopy
Item
Kbd
Label
Listbox
ListboxViewForked listbox views: the single and multi variants over the shared transcription in ./listboxShared.js. Each create binds the upstream bundle for the…
Menu
Menubar
MenuViewA Menu view with the consumer toView seam @foldkit/ui/menu lacks. State, Messages, update, Commands, and Mounts stay upstream (imported from…
Meter
Nav
NestedMenu
NumberField
OtpField
Pagination
PasswordInput
PatternsAn accessibility pattern per adapted widget with an ARIA contract: the slots a widget of that kind must publish, with the capability, events and attributes…
Popover
Progress
RadioGroup
RangeSlider
Rating
RecipesShipped recipes for the slot contracts this package publishes. Each is a Style.recipeFor over those slots, so an application selects variants, hands the…
Resizable
ScrollArea
Segmented
Select
Separator
Sidebar
Skeleton
Slider
Spinner
Steps
Switch
Table
Tabs
TagsInput
Textarea
Toast
ToastViewA Toast view with the consumer toView seam @foldkit/ui/toast does not expose. State, Messages, update, Commands, Mounts, and subscriptions stay upstream:…
Tooltip
TouchTouch targets: mechanisms, not components. No slots, no views: compose these into an application's own slots.
TreeView
Typography
VirtualList

Functions

Values

AccordionSlotsAn accordion: sections whose headings each show and hide their panel, as the APG accordion pattern has it. Each trigger is a button in a heading, with…
AlertSlotsAn alert publishes its regions as slots; it owns no state, messages, or bundles. The tone comes from the recipe, the urgency from assertive: an assertive…
AspectRatioSlotsA fixed-ratio frame publishes one slot; it owns no state, messages, or bundles. The ratio is the recipe's, so a stylist can change it.
AvatarSlotsAn avatar publishes its regions as slots; it owns no state, messages, or bundles. The picture stacks over the fallback initials: a loaded image covers them,…
BadgeSlotsA status pill publishes one slot; it owns no state, messages, or bundles. The pill reads its tone from data-tone, which the Badge recipe maps to a family;…
BannerSlotsA banner: a full-width notice across the top of a page or a section, with an optional action and an optional dismiss button. Alert is a notice inside the…
BreadcrumbSlotsA breadcrumb trail publishes its regions as slots; it owns no state, messages, or bundles. The trail is a navigation landmark with an ordered list; the…
ButtonGroupSlotsA button group publishes one slot; it owns no state, messages, or bundles. The buttons stay the caller's (their labels, styles, and Messages), drawn as the…
ButtonSlotsThe button publishes one slot. click is owned by the base OnClick when the button is interactive, so a Behavior that adds its own click handler is a…
CalendarSlotsCalendar is a nested Submodel whose shape depends on model.viewMode. The top-level groups (root, grid, the navigation buttons) and per-item groups…
CardGroupSlotsA card group publishes its frame, the list of cards, each card's place in it, and the one highlight that moves between the cards. The list carries the…
CardSlotsA card publishes its regions as slots; it owns no state. Draw the parts the card has and skip the rest: a bare card is a root with content, a full one adds…
CarouselSlotsA carousel, the APG's: a group with aria-roledescription="carousel" named by its label, each slide a group with aria-roledescription="slide" named "2 of 5",…
CheckboxGroupSlotsA group of checkboxes for one question, as Zag's checkbox group: a fieldset named by its legend, and a row per option with the APG's checkbox (a button with…
CheckboxSlotsBoth the control and its label carry the base toggle handlers, so both own click. hiddenInput exists only when a form name is configured; its base bundle is…
CodeBlockSlotsA code block publishes its regions as slots, down to each line and each highlighted token; it owns no state. Highlighting is the caller's: pass the tokens a…
ColorPickerSlotsAn OKLCH color picker, Zag's color picker cut to the channels this repo's palette is written in: a group named by its label, one native range per channel…
ComboboxSlotsCombobox is a nested Submodel: an input/inputWrapper pair with an optional toggleButton, plus a backdrop/items group with an item per entry (and…
CommandSlotsA command menu, shadcn's Command and Fluid Functionalism's CommandMenu: a search field that keeps focus while the keys move through the rows and points at…
DatePickerSlotsDatePicker is a small composed Submodel: a trigger button plus a panel/backdrop pair around the embedded calendar. The resolver runs once per bundle and…
DialogSlotsDialog is a Submodel: each published bundle is a ChildAttribute group that carries the dialog boundary's dispatcher. The resolver treats those as opaque and…
DisclosureSlots
EmptySlotsAn empty state publishes its regions as slots; it owns no state, messages, or bundles. It says what is not here, why that is fine, and what creates the…
FieldsetSlots
FileDropSlotsFileDrop is a small Submodel: a root drop zone plus its hidden file input. The root owns the drag handlers (dragenter/dragleave/drop have no Event tokens,…
HoverIntentSlotsHoverIntent is a Submodel: open and close delays with intent, for a hover card or a menu that should not flicker. Both bundles are ChildAttribute groups:…
IconSlotsAn icon publishes one slot; it owns no state, messages, or bundles. A label makes it an image. Without one it is decorative and hidden from the…
InputCopySlotsA read-only field showing a value beside a copy button, Zag's clipboard. The view holds no state: the button sends onCopy, the application's update returns…
InputSlots
ItemSlotsAn item publishes its regions as slots; it owns no state, messages, or bundles. It is the common visual language for a row of anything: a menu option, a…
KbdSlotsA keyboard key publishes one slot; it owns no state, messages, or bundles. It names the key to press, never an action: pair it with words.
LabelSlotsA form label publishes one slot; it owns no state, messages, or bundles. It names a control through for: pass the id FieldAssociation derived, never a…
ListboxSlotsListbox is a nested Submodel: one button/backdrop/items group plus an item per entry (and group/heading/separator where the caller groups), so the resolver…
MenubarSlotsA menu bar, shadcn's and the APG's: a row of @foldkit/ui Menus, so each menu's keys, typeahead, rows and dismissal stay the Menu's, and the bar adds what a…
MenuSlotsMenu is a nested Submodel: one button/backdrop/items group plus an item per entry (and group/heading/separator where the caller groups), so the resolver…
MeterSlots@foldkit/ui's Meter, a meter: a measurement within a known range, such as storage used or a battery's charge, where Progress is work going on. The root says…
NavSlots@foldkit/ui's Nav, a navigation landmark of links with the current one marked, as shadcn's navigation menu draws it: links in a row, their keys the…
NestedMenuSlotsA menu whose rows may open submenus, shadcn's DropdownMenuSub and the APG's: @foldkit/ui Menus, one for the menu and one per submenu, so each keeps its own…
NumberFieldSlotsA number field, the APG's editable spinbutton and Zag's number input: a text field with role="spinbutton" that the arrows step, PageUp and PageDown step by…
OtpFieldSlotsA one-time code, as shadcn's input-otp: one real <input> laid over cells that only show its characters. The browser keeps everything a code field needs…
PaginationSlotsPage navigation publishes its regions as slots; it owns no state, only the controlled page it is given. The application moves the page in onPage; this draws…
PasswordInputSlotsA password field with a toggle that shows the password as text, Zag's password input: the toggle is a button outside the form's submission, named for what…
PopoverSlotsPopover is a Submodel; every bundle is a ChildAttribute group. button owns click (and its pointer/keyboard handlers) while open; panel owns blur; backdrop…
ProgressSlots@foldkit/ui's Progress, a progressbar with its value, drawn as a bar or, with the recipe's shape: 'ring', as Circular Progress. A value of none is…
RadioGroupSlotsRadioGroup is a Submodel: each published bundle is a ChildAttribute group that carries the boundary's dispatcher. The resolver treats those as opaque and…
RangeSliderSlotsA range slider, the APG's multi-thumb slider: a root group named by its label, and two native input type="range" thumbs over one track, each a real slider…
RatingSlotsA star rating, the APG's radio group of native radios: a root with role="radiogroup" named by its label, and a star per value, an input type="radio" sharing…
ResizableSlotsTwo panels with a handle between them, shadcn's Resizable and the APG's window splitter: the handle is a separator with its value, a tab stop the arrows…
ScrollAreaSlotsA scroll area publishes one slot; it owns no state, messages, or bundles. The browser owns scrolling; this owns the box: which axes may scroll and how the…
SegmentedSlotsA segmented control: one group of pressed-button options. Plain buttons, not tabs: the group is role="group", each option carries aria-pressed, and there…
SelectSlotsThe base bundle installs OnChange only when onChange is configured and the control is enabled, so a Behavior that adds its own handler is a conflict rather…
SeparatorSlotsA separator publishes one slot; it owns no state, messages, or bundles. Vertical separators need their container to constrain the cross axis: a bare div…
SidebarSlotsAn application's sidebar, shadcn's: a navigation landmark of sections, each a heading button that shows and hides its links, as an accordion's sections do…
SkeletonSlotsA loading placeholder publishes one slot; it owns no state, messages, or bundles. Stack several for multi-line content; each bar pulses on its own. The bar…
SliderSlotsSlider is a Submodel: each published bundle is a ChildAttribute group that carries the boundary's dispatcher. The resolver treats those as opaque and…
SpinnerSlotsA loading spinner publishes one slot; it owns no state, messages, or bundles. It says work is ongoing where a bar would mislead about progress; pair it with…
StepsSlotsA stepper, Zag's steps and Mantine's Stepper: a named ordered list of steps, each a numbered marker with a title and a description, a connector between each…
SwitchSlotsMirrors the checkbox contract: both the control and its label own click.
TableSlotsA data table publishes its regions as slots; it owns no state, messages, or bundles. Sorting, selection, and paging stay where the data lives (see…
TabsSlotsTabs is a nested Submodel: one tablist group plus a tab/panel pair per item, so the resolver runs once per group and each base ChildAttribute bundle passes…
TagsInputSlotsA field of tags, Zag's tags input: the tags as a list of chips, each with a remove button, and a text input for the next one. Enter or the delimiter adds…
TextareaSlots
ToastSlotsToast is a nested Submodel: one live-region container plus an entry per toast. The resolver runs once per bundle and each base attribute passes through by…
TooltipSlotsTooltip is a Submodel; both bundles are ChildAttribute groups. trigger owns focus, blur and pointerdown (the hover/keyboard entry points); panel carries the…
TreeViewSlotsA tree view, the APG's and Zag's: nested rows that open and shut, one tab stop, Up and Down through the rows showing, Right to open a row or step into it,…
TypographySlotsSet type publishes one slot; it owns no state, messages, or bundles. The level chooses the element: headings stay headings, body copy stays a paragraph, and…
VirtualListSlots@foldkit/ui's virtual list, which draws only the rows in view and spacers for the rest, so a list of thousands scrolls as one of thirty. The list's Model is…

Interfaces

AccordionItem
AccordionView
BannerView
ButtonViewA button in one call: the label, a style for its slot, and the rest of @foldkit/ui's own config. toView stays for a button drawn as something else (an a, a…
CarouselView
CheckboxGroupOption
CheckboxGroupView
CommandGroup
CommandItem
CommandView
FieldPartsA labelled field's pieces, drawn: the label, the control, and its description.
InputCopyView
InputFieldA text field in one call: a field's state drawn through view with its label, control, and description placed. The value is drawn with String(), as the base…
InputViewAn input in one call: its value and Messages, a style for its slots, and the rest of @foldkit/ui's own config. draw places the resolved input, label, and…
NumberFieldView
OtpFieldView
RangeSliderView
ResizableView
ResolveContext
ResolvedDays
ResolvedMonths
ResolvedNav
ResolvedRadioGroupThe radio group's bundles with the attached Mixins applied.
ResolvedTabs
ResolvedYears
SegmentedOptionOne option of a segmented control: what it stands for, and its words.
SegmentedView
SidebarLink
SidebarSection
SidebarView
Step
StepsView
TagsInputView
TextareaFieldA textarea field in one call: a field's state drawn through view with its label, control, and description placed. The value is drawn with String(), as the…
TextareaViewA textarea in one call: its value and Messages, a style for its slots, and the rest of @foldkit/ui's own config. draw places the resolved textarea, label,…
TreeNodeA row of the tree, and the rows it holds.
TreeViewView

Types

BannerActionThe banner's action: a link to follow, or a button that sends a Message.
ComboboxGroupRender
ComboboxHeadingRender
ComboboxItemRender
ComboboxMultiBundleUpstream multi Bundle with the forked view.
ComboboxMultiViewInputsUpstream multi view inputs plus the seam.
ComboboxRenderInfo
ComboboxSingleBundleUpstream single Bundle with the forked view.
ComboboxSingleViewInputsUpstream single view inputs plus the seam.
DatePickerRenderInfoThe date picker's popover-level bundles. panel and backdrop are present only while the popover shows them; calendar is the embedded calendar submodel's…
DatePickerViewInputsUpstream view inputs plus the seam. Omit toView for upstream markup. It is handed the date picker's own builder, since its bundles speak the date picker's…
ListboxGroupRenderOne rendered group; group is undefined for the ungrouped pass-through.
ListboxHeadingRenderA heading element's bundle, present only when the group names one.
ListboxItemRenderOne listbox item's bundle: element key, attributes, and caller content.
ListboxRenderInfoThe listbox's computed bundles. backdrop, items, scroll, and groups are present only while visible; a closed listbox carries the rest alone, as upstream…
MenuBundleUpstream's Bundle with the forked view.
MenuGroupRender
MenuHeadingRender
MenuItemRender
MenuRenderInfoThe menu's computed bundles. backdrop, items, scroll, and groups are present only while visible; a closed menu carries the rest alone, as upstream renders it.
MenuViewInputsUpstream ViewInputs plus toView.
MixinList
MultiBundleUpstream multi Bundle with the forked view.
MultiViewInputsUpstream multi view inputs plus the seam.
ResolvedA component's Base bundles with every slot among them resolved.
ResolvedButtonThe button's bundles with the attached Mixins applied.
ResolvedCalendar
ResolvedCheckboxThe checkbox's bundles with the attached Mixins applied.
ResolvedColumnHeader
ResolvedCombobox
ResolvedComboboxGroup
ResolvedComboboxHeading
ResolvedComboboxItem
ResolvedComboboxToggle
ResolvedDatePicker
ResolvedDayCell
ResolvedDialogThe dialog's bundles with the attached Mixins applied.
ResolvedDisclosureThe disclosure's bundles with the attached Mixins applied.
ResolvedFieldsetThe fieldset's bundles with the attached Mixins applied.
ResolvedFileDropThe file drop's bundles with the attached Mixins applied.
ResolvedHoverIntentThe hover intent's bundles with the attached Mixins applied.
ResolvedInputThe input's bundles with the attached Mixins applied.
ResolvedListbox
ResolvedListboxGroup
ResolvedListboxHeading
ResolvedListboxItem
ResolvedMenu
ResolvedMenuGroup
ResolvedMenuHeading
ResolvedMenuItem
ResolvedMonthCell
ResolvedPopoverThe popover's bundles with the attached Mixins applied.
ResolvedRadioOptionOne option with the attached Mixins applied to its bundles.
ResolvedSelectThe select's bundles with the attached Mixins applied.
ResolvedSliderThe slider's bundles with the attached Mixins applied.
ResolvedSlots
ResolvedSwitchThe switch's bundles with the attached Mixins applied.
ResolvedTab
ResolvedTextareaThe textarea's bundles with the attached Mixins applied. textarea is typed for h.textarea, which refuses InnerHTML.
ResolvedToast
ResolvedToastEntry
ResolvedTooltipThe tooltip's bundles with the attached Mixins applied.
ResolvedWeek
ResolvedYearCell
SingleBundleUpstream single Bundle with the forked view.
SingleViewInputsUpstream single view inputs plus the seam.
ToastEntryRenderOne toast entry's bundle: element id, attributes, and drawn content.
ToastRenderInfoThe toast stack's computed bundles.