Skip to main content

Components — Overview

Concept​

Each note in this folder is a contract: what the component takes, what state and slots it hands to the skin's renderer, which tokens a skin should use, and what accessibility it guarantees under every skin. Platform notes implement the contract. Skins draw it.

The v1 set​

v0.1 ships the full component set (ADR-40): the original set (ADR-21), CamoPagedList and CamoSkeleton (ADR-29), the date and time pickers, stepper and accordion (ADR-35), every "Later" row of the Component Inventory, and the charts.

Overlays (dialogs, bottom sheets) open through the platform's navigator: Flutter showCamoDialog/showCamoBottomSheet, Compose Navigation 3 entries with Camouflage scene metadata. See Overlays.

Primitives​

The building blocks every other component uses.

ComponentMilestoneWhat it proves
CamoTextM3typography roles, content color, rich text
CamoIconM3icon widgets that follow the ambient icon style
CamoSurfaceM3surface levels and the skin's surface treatment
CamoDividerM3themed separators

Actions​

Things the user presses to do something.

ComponentMilestoneWhat it proves
CamoButtonM3six appearances × tones, the reference component
CamoIconButtonM3icon-only actions with a required label and tooltip
CamoFabM8the screen's primary floating action

Inputs​

Controlled inputs and forms.

ComponentMilestoneWhat it proves
CamoTextFieldM5controlled text, filters and display formats
CamoCheckboxM5boolean with label, rich label, error
CamoSwitchM5on/off that applies immediately
CamoRadioM5one choice from a visible set, roving focus
CamoSegmentedControlM5compact single or multi selection
CamoSliderM5continuous or stepped values
CamoSearchFieldM5search conventions on the text-field engine
CamoSelectM6a field that opens a menu or a picker sheet, async options
CamoFormM5Flutter-style Form and FormField on both platforms, rules as objects
CamoDatePickerM5a date or date range: a field that opens a calendar (sheet or popup), and an inline CamoCalendar (ADR-35)
CamoTimePickerM5a time: fields, dial or wheel by theme; the device's 12/24-hour setting
CamoStepperM5a quantity with − and +, one adjustable control

Containers and Lists​

Grouping content.

ComponentMilestoneWhat it proves
CamoCardM6appearance × tone containers, optional click
CamoListItemM6rows and sections: settings, contacts, pickers
CamoPagedListM6API-backed lists: refresh, next page, skeletons, empty and error states, from a plain state (ADR-29)
CamoAccordionM6expandable sections (FAQ, details), controlled

Data Display​

Compact pieces of information.

ComponentMilestoneWhat it proves
CamoChipM7filter, input, action chips and status tags
CamoBadgeM7counts and dots on icons and navigation items
CamoAvatarM7photo, initials, presence

Feedback​

Telling the user what's happening.

ComponentMilestoneWhat it proves
CamoProgressM7bars and circles, determinate or indeterminate
CamoSnackbarM7queued messages through Camouflage's messenger
CamoBannerM7inline status messages by tone
CamoSkeletonM6loading placeholders shaped like content (used by CamoPagedList)

Overlays​

Content above the page.

ComponentMilestoneWhat it proves
OverlaysM6frames and navigator integration (Flutter show, Compose Navigation 3)
CamoDialogM6the dialog content component
CamoBottomSheetM6the sheet content component
CamoMenuM6anchored popups and context menus
CamoTooltipM6hover, focus and long-press labels

App chrome for moving between destinations (routing stays with the app).

ComponentMilestoneWhat it proves
CamoTopBarM6title, navigation and actions, scroll-aware
CamoTabsM8tab bar for sibling views
CamoNavigationBarM8bottom navigation, CamoNavItem, adaptive navigation
CamoNavigationRailM8side rail for medium windows
CamoNavigationDrawerM8permanent and modal drawers

Reviewing a component: API or theme?​

  • ADR-23: a parameter goes into the component API only if every dialect can render it.
  • ADR-28: a layout or proportion choice that a brand's Figma commonly changes goes into the component theme, with a per-skin default.
  • ADR-30: for designs that go further (floating, hiding, expanding, reshaped components), offer the cheapest level that covers them: theme option → controlled behavior input → public building blocks → renderer override.

About the "Material mapping preview" and defaults in component notes​

Each component note shows a Material mapping preview and Material defaults in its component-theme table. Material is the reference dialect because its measurements are public and complete. The v1 skin is Minimal: its defaults for every component are in one table in Minimal Skin §3.4, and that's what v1 implements.

Rules shared by every component​

  1. Controlled. The component never owns the source of truth. Values come in (checked, value) and changes go out (onCheckedChange, onValueChange). The only internal state is interaction (pressed/focused/hovered), which is visual.
  2. Camouflage's own vocabulary. Components with visual variants take appearance (Solid, Soft, Raised, Outline, Ghost, Link) and tone (Default, Error, Success, Warning, Info), independently. They never use one design system's private terms (Material's tonal, Apple's borderedProminent). See Design Language.
  3. The component owns behavior; the renderer owns visuals. Callbacks, the semantics role and label, the enabled gate, the minimum touch target (48dp) and focusability are set by the component, so they hold under every skin.
  4. Layout stays with the platform. No CamoRow or CamoColumn. Use Row/Column/Box (Compose) or Row/Column/Stack (Flutter), with Camouflage.spacing for gaps.
  5. Text is a value, icons are widgets, layout is a slot. Labels, titles and messages are Strings the renderer draws. Icons are passed as icon widgets (your AppIcon.x()) and follow the icon style the component sets. Nested actions are Camouflage components (dialog buttons, top-bar icon buttons). Only free layout (card, surface, dialog content) is a slot. See ADR-12 in Decisions.
  6. Platform extras are added at the platform level. Each platform adds its own conventional parameters (a Kotlin modifier: Modifier, a Flutter key) on top of the contract.

How each component note is organised​

  • §1 Why: what problem the component solves.
  • §2 Shape: the render flow for this component, and a Material mapping preview.
  • §3 API: the Contract (parameters, state, slots), Tokens used, and Accessibility.
  • §4 Build steps: the build checklist, ending in Done when.
  • §5 Edge cases.

Charts​

Charts without a chart library, in their own package (ADR-40).

ComponentMilestoneWhat it proves
Chart FrameM11the package, scales, axes, legend, tooltip, data table fallback and the style layers
CamoSparklineM11a trend with no axes, readable as text
CamoLineChartM11line, area and stacked area
CamoBarChartM11vertical, horizontal, grouped and stacked bars
CamoPieChartM11pie and donut with a center label

Implementation​

Every Kotlin component note implements its base contract from Components — Overview, and follows the same component skeleton. Learn it once here, and each component note only covers what's specific to it.

The component skeleton​

@Composable
public fun CamoButton(
text: String,
onClick: () -> Unit,
modifier: Modifier = Modifier, // Compose convention: first optional param
appearance: Appearance? = null, // null → ButtonTheme.defaultAppearance
tone: Tone = Tone.Default,
enabled: Boolean = true,
loading: Boolean = false,
prefixIcon: (@Composable () -> Unit)? = null,
suffixIcon: (@Composable () -> Unit)? = null,
interactionSource: MutableInteractionSource? = null, // Compose convention: hoistable source
) {
val skin = requireSkin("CamoButton") // 1. fail fast, named
val theme = requireTheme("CamoButton")
val source = interactionSource ?: remember { MutableInteractionSource() }
val interaction = source.collectInteractionState() // 2. pressed/focused/hovered
val style = remember(skin, theme) { skin.button.defaults(theme).merge(theme.components.button) } // 3. resolve
val behavior = modifier // 4. behavior modifier
.minimumTouchTarget()
.clickable(source, indication = null, enabled = enabled, role = Role.Button, onClick = onClick)
.semantics(mergeDescendants = true) { contentDescription = text }
skin.button.Render( // 5. delegate
state = ButtonState(text, enabled, loading, appearance ?: style.defaultAppearance, tone, interaction, source),
slots = ButtonSlots(prefixIcon, suffixIcon),
theme = theme, style = style, modifier = behavior,
)
}
  1. Fail fast with the component's name (Provider and Scoping).
  2. Interaction: collectInteractionState() (a core helper) combines collectIsPressedAsState, collectIsFocusedAsState and collectIsHoveredAsState into InteractionState.
  3. Resolve the component style once per skin/theme change (remember keys).
  4. The behavior modifier does clicks, the role, semantics and the touch target, with indication = null because the renderer draws the feedback.
  5. Delegate to the renderer, which applies behavior outermost (Skin Contract).

Core helpers every component uses​

HelperWhat it does
Modifier.minimumTouchTarget(size = 48.dp)a layout modifier that reports at least 48×48 and centers the visual content, expanding the pointer area without growing the visuals (the same technique as Material 3's minimumInteractiveComponentSize, reimplemented because core doesn't depend on material3)
MutableInteractionSource.collectInteractionState()InteractionState from the four collectIs…AsState flows (pressed, focused, hovered, dragged)
rememberRovingFocus(count)one Tab stop per group, arrow keys move (and select, for radios, segments, tabs, chip groups), RTL-aware
Modifier.camoClickable(onClick, enabled, role)public: clickable + the active skin's feedback + the touch target, for an app's own clickable rows. Switching or borrowing skins restyles them too.
rememberHideOnScroll(listState)visible = false while scrolling down, for the nav bar, top bar and FAB (ADR-30)
ProvideContentStyle(color, iconStyle)sets LocalCamoContentColor + LocalCamoIconStyle for slots
Modifier.camoError(message: String?)semantics error(message) + a polite live region when the message appears

Components​

The components follow the same 8 groups as Components — Overview. All 40 have a Kotlin note.

GroupNoteCompose building blocks
PrimitivesCamoTextBasicText, AnnotatedString, LinkAnnotation
PrimitivesCamoIconImage + ColorFilter.tint, Compose Resources
PrimitivesCamoSurfaceBox + surface treatment
PrimitivesCamoDividerBox + clearAndSetSemantics
ActionsCamoButtonthe skeleton above
ActionsCamoIconButtonthe skeleton, icon-only
ActionsCamoFabAnimatedVisibility, animateContentSize
InputsCamoTextFieldstate-based BasicTextField, InputTransformation, OutputTransformation
InputsCamoCheckboxtoggleable(role = Checkbox)
InputsCamoSwitchtoggleable(role = Switch), animateDpAsState
InputsCamoRadioselectable(role = RadioButton), selectableGroup, roving focus
InputsCamoSegmentedControlRow + weight, building blocks
InputsCamoSliderpointerInput drag, progressBarRangeInfo + setProgress
InputsCamoSearchFieldBasicTextField + ImeAction.Search
InputsCamoSelectCamoFieldFrame + menu popup or sheet frame
InputsCamoDatePickerkotlinx-datetime, expect locale data, 6×7 grid
InputsCamoTimePickerLocalTime, expect 12/24-hour, three styles
InputsCamoStepperone adjustable node, hold-to-repeat coroutine
InputsCamoFormLocalCamoForm, FocusRequester, rememberSaveable
Containers and ListsCamoCardBox, optional clickable
Containers and ListsCamoListItemRow, section Layout with dividers
Containers and ListsCamoPagedListLazyColumn, snapshotFlow trigger, NestedScrollConnection pull
Containers and ListsCamoAccordionAnimatedVisibility, heading + state semantics
Data DisplayCamoChiptoggleable / selectable, FlowRow / LazyRow
Data DisplayCamoBadgecustom Layout for CamoBadgedBox
Data DisplayCamoAvatarinitials under the app's image, FNV hash color
FeedbackCamoProgressCanvas, rememberInfiniteTransition, progressSemantics
FeedbackCamoSnackbarsuspending CamoMessenger, live regions, anchoredDraggable
FeedbackCamoBannerRow + FlowRow actions, live region
FeedbackCamoSkeletonshared InfiniteTransition, drawWithCache
OverlaysOverlaysframes in core + camouflage-navigation3 scene strategies
OverlaysCamoDialogcontent inside core's CamoDialogFrame
OverlaysCamoBottomSheetAnchoredDraggableState, nestedScroll, IME insets
OverlaysCamoMenuPopup + flip positioning, keys, CamoMenuPanel
OverlaysCamoTooltipnon-focusable Popup, hover/focus/long-press triggers
NavigationCamoTopBarRow, WindowInsets, heading() semantics
NavigationCamoTabsmeasured indicator, HorizontalPager sync
NavigationCamoNavigationBarinsets, placement, hide on scroll, adaptive layout
NavigationCamoNavigationRailColumn, start insets
NavigationCamoNavigationDrawerpermanent panel, modal anchoredDraggable

File layout in :camouflage-core​

org/srctool/camouflage/core/
├── theme/ CamoTheme, CamoColors, …, SeedScheme, ThemeValidator
├── skin/ CamoSkin, SurfaceTreatment, InteractionFeedback, InteractionState, shared enums
├── provider/ CamouflageProvider, Camouflage, locals, reduced motion (expect)
├── util/ minimumTouchTarget, collectInteractionState, ProvideContentStyle, camoError
├── text/ CamoText, CamoSpan, TextRenderer, TextState
├── icon/ CamoIcon, IconSource, IconStyle, IconTheme, IconRenderer
├── button/ CamoButton, ButtonState/Slots/Theme/Style/Colors, ButtonRenderer
├── … one package per component
└── form/ CamoForm, CamoFormState, CamoFormField, CamoRule, CamoRules, form fields

Web (planned)​

Status: draft for the W0 spike

The component contracts in base/03 - Components are written as Kotlin signatures (CamoButton(text, onClick, appearance, tone, enabled, loading, prefixIcon, suffixIcon)). This note says how every kind of parameter becomes a custom element, so each web component follows the same rules and a parameter is easy to find from the contract. The spike (srctool/camouflage-web#1) tests rules 1 to 8 on the button and the dialog; the input rules (§3.5) are confirmed at W3.

1. Why​

Without shared conventions each component would invent its own attributes, events and slots. Web APIs also differ from Compose and Flutter in ways that matter: values reach elements as strings (attributes) or as JS values (properties), events are DOM events, and there are no lambdas for content, only slots.

The contract stays the source of truth. This note does not rename anything: a parameter named supportingText is supporting-text as an attribute and supportingText as a property, always.

2. Shape​

Contract (Kotlin and Dart)Web
a component CamoTextFielda custom element camo-text-field, class CamoTextField, tag registered by the define entry
a value parameter (String, Boolean, enum, number)an attribute and a property, kept in sync
an object, list or function parameter (inputFilter, displayFormat, items, rules)a property only
a widget parameter (prefixIcon, confirm)a named slot (slot="prefix-icon")
a single layout content: Slotthe default slot
a callback onClick, onValueChangea DOM event (click, input) or a camo-* custom event
modifier (size, padding, alignment)CSS on the host element (class, style)
skin and theme (never parameters)the provider (context and CSS variables)

3. API​

3.1 Names​

ThingRuleExample
Tagcamo- + the component name in kebab-case, without the Camo prefixCamoSegmentedControl → camo-segmented-control
Classthe contract nameCamoSegmentedControl
Attributethe parameter in kebab-casesupportingText → supporting-text
Propertythe parameter in camelCase, same as the contractel.supportingText
Enum valuelowercase kebab-case stringAppearance.Solid → appearance="solid", Tone.Error → tone="error"
Slotthe widget parameter in kebab-caseprefixIcon → slot="prefix-icon"
Eventthe DOM event if one exists, else camo- + kebab-caseclick, camo-dismiss
CSS partnamed in the component note::part(label)

3.2 Values: attributes and properties​

  • Primitive values and enums are both an attribute and a property. The property is the source of truth; attributes reflect only where the value is part of the look or the state (appearance, tone, disabled, loading, selected, open), so styling and tests can select on them.
  • Absent means null. A nullable parameter (appearance: Appearance? = null) is "not set" when the attribute is absent; the theme's default applies. Setting the property to null removes the attribute.
  • Booleans default to false. HTML booleans are present or absent, and cannot be "true by default" cleanly. A contract parameter that defaults to true is inverted:
ContractWeb
enabled: Boolean = truedisabled (absent = enabled)
singleLine: Boolean = truemultiline (absent = single line)
loading: Boolean = falseloading
secure: Boolean = falsesecure
  • Text values are attributes, not slot content. The contract says text is a value the renderer draws in its own style (text, label, title, message, placeholder, supportingText, error), and a renderer may not inspect a slot. So <camo-button text="Save">, not <camo-button>Save</camo-button>. This also keeps server rendering simple: the renderer gets the string from an attribute, and the light DOM is not needed to render. Using the default slot as the text is an open question (§5).
  • Numbers are attributes parsed as numbers and properties as numbers. Dates and times are ISO strings (2026-11-22, 13:45, 2026-11-22T13:45); a range is two properties, start and end.
  • Objects, lists and functions are properties only. Frameworks that can't pass properties declaratively set them in code (React 19, Vue, Svelte and Angular can).

3.3 Widgets and content: slots​

  • A widget parameter is a named slot in kebab-case: prefixIcon → <camo-icon slot="prefix-icon">, dialog confirm and dismiss → slot="confirm" and slot="dismiss".
  • A single layout content parameter (content: Slot) is the default slot.
  • A skin only decides where a slot goes (the renderer places the <slot>); it never looks at what is slotted in (the Skin Contract rule). The slot names a component exposes are part of its contract and appear in the Custom Elements Manifest.
  • Icons: a camo-icon takes inline SVG as its child (<camo-icon><svg …/></camo-icon>) or a name registered with registerIcons({ plus: "<svg…" }). It takes its size and color from --camo-icon-size and --camo-content-color, set by the container.

3.4 Events and callbacks​

ContractWeb
onClickthe native click event. The element handles Enter and Space, and does not fire click when disabled or loading (it stops the event in the capture phase).
onFocusChangedthe native focus and blur events (they don't bubble; focusin and focusout do)
onValueChangeinput while editing and change on commit, both native-style; the detail-less event reads from el.value
Other callbacksa CustomEvent named camo- + kebab-case, with a typed detail, bubbles: true, composed: true (so it crosses shadow roots)

Rules: an event is fired once per user action; a cancelable event can be cancelled with preventDefault(), and the element then keeps its previous state. Event names and detail types are listed in the manifest and in the HTMLElementEventMap type (section 3.8).

3.5 Inputs, forms and controlled values​

The contract's inputs are controlled (value plus onValueChange). On the web:

  • value is a property and attribute (initial value). The element updates value itself when the user edits, and fires a cancelable camo-before-change (detail { value }) first. Calling preventDefault() on it rejects the edit, which gives the same control a controlled input has in Compose and Flutter. Then it fires input and, on commit, change.
  • A framework that wants a fully controlled input sets value in response to the event, and nothing else is needed.
  • Every input is form-associated (ElementInternals): it takes name, value, required, disabled, takes part in FormData, reset and form.checkValidity(), and reports validity with setValidity. A text field shows its error attribute (the contract's error: String?) as the error state. Confirmed in W3: an error also makes the input invalid to its form (customError), so form.checkValidity() and requestSubmit() honor it; the user's next edit clears a message the form set.
  • CamoForm and its form fields: the rules are objects, so rules is a property, a rule or a list of rules by input name. Form-level state is read through events (camo-submit, camo-invalid, camo-changed) and form.valid and form.dirty. Confirmed in W3: every input with a name inside the form takes part, so there is no field wrapper; it works with a native <form> around it or alone.
  • inputFilter and displayFormat are properties (objects with functions), never attributes.

3.6 Overlays​

The base notes open overlays through the platform's navigator (showCamoDialog in Flutter, Navigation 3 entries in Compose). The web offers both forms:

<camo-dialog open title="Delete item?" message="This can't be undone.">
<camo-button slot="confirm" tone="error" text="Delete"></camo-button>
<camo-button slot="dismiss" appearance="ghost" text="Cancel"></camo-button>
</camo-dialog>
const result = await showCamoDialog<boolean>({
title: "Delete item?",
message: "This can't be undone.",
confirm: { text: "Delete", tone: "error", result: true },
dismiss: { text: "Cancel", appearance: "ghost", result: false },
});
  • The dialog is a native <dialog> element shown in the top layer; menus, popovers and tooltips use the Popover API. Focus trapping, Escape and scrim dismissal follow the overlay note. Confirmed in W4: one overlay frame (CamoModal) serves the dialog and the bottom sheet; the menu, the tooltip and the pickers use the Popover API; both forms of the dialog (declarative and showCamoDialog) work and attach to the nearest provider.
  • The imperative helpers return a promise resolved with the result (or undefined when dismissed), like Flutter's showCamoDialog<T>. They attach to the nearest provider (or to a host option), so the skin and theme come from the right place.
  • A declarative overlay fires camo-close with detail: { result }, and open is a property and attribute.
  • Dismissal rules, back behavior and result types come from the base overlay note, not from this one.

3.7 Lists and collections​

  • A list of items is slotted children (<camo-list-item>) when it is static, and a state property with a renderItem function when it is data-driven (CamoPagedList takes its paging state as an object, like the contract). Virtualization, if needed, is the component's concern and invisible to callers.
  • A list of items is slotted children when static (camo-list-item in a camo-list-section) and a state property with a renderItem function when data-driven (camo-paged-list). Amended in W4: an item carries selected and clickable and reports a press as the native click; no container event was needed, because a controlled list sets selected itself. Rows and sections are drawn by the skin; the section draws the dividers.

3.8 TypeScript​

Every component exports its class, a props interface and its events, and augments the global maps so types work everywhere:

export interface CamoButtonProps {
text: string;
appearance?: Appearance | null;
tone?: Tone;
disabled?: boolean;
loading?: boolean;
}
declare global {
interface HTMLElementTagNameMap { "camo-button": CamoButton }
}
  • Enums are string-literal unions (type Appearance = "solid" | "soft" | "raised" | "outline" | "ghost" | "link"), so attributes and properties share one type.
  • Framework typings (JSX for React, GlobalComponents for Vue, and so on) are generated from the Custom Elements Manifest, not written by hand.
  • The manifest is checked against the contract: a test fails if a component is missing a parameter, an enum value or a slot the contract names.

3.9 Accessibility​

  • The host element carries the role and label through ElementInternals (internals.role, internals.ariaLabel, ariaDisabled, ariaBusy), not through ids that would have to cross a shadow root. A label from label, from text, or from a slotted label becomes the accessible name.
  • An icon-only control requires label (the contract's required label); a missing one logs in development and fails the test.
  • Keyboard maps are the same as in the base notes. Focus is visible whenever it comes from the keyboard.
  • loading sets aria-busy and keeps the control focusable, as in the button contract.

4. Build steps​

  1. W0: apply sections 3.1 to 3.4, 3.6 and 3.9 to camo-button and camo-dialog; write the manifest check for the two.
  2. W1: the manifest-versus-contract test as a CI step; the HTMLElementTagNameMap and framework typing generation.
  3. W3: confirm and finish section 3.5 on the text field, checkbox, switch and the form.
  4. W4: confirm section 3.7 on the list and the paged list.
  5. Update this note with what each milestone settles, and add an ADR when a rule changes the contract.

Done when

  • Every component in a milestone follows sections 3.1 to 3.4 with no exceptions beyond those listed here.
  • The manifest check passes for every shipped component.
  • The spike's button and dialog render the same markup under Minimal and Cupertino.

5. Edge cases​

CaseDecided behavior
Text as the default slot (<camo-button>Save</camo-button>)Open. It is the habit of most web developers, but a renderer gets a string from an attribute and server rendering has no light DOM at render time. Proposed for later: support it only when the element can read its own text before first render, with the attribute winning if both exist.
A framework sets a boolean attribute to the string "false"The property is the source of truth. Document that disabled="false" is still disabled (HTML semantics); frameworks should use the property or omit the attribute.
An attribute and its property are both setThe last write wins, and the attribute reflects the property.
A camo-* event name that clashes with a native oneUse the native one when its meaning matches exactly; never reuse a native name with a different meaning.
A component needs a parameter the contract has no name forAdd it to the base contract first (ADR), then to the three platforms.
Server renderingInitial state is read from attributes only. Properties that hold objects must be set again on the client after hydration (the component note says which).
Right-to-leftdir comes from the document or provider; slots named prefix and suffix follow the writing direction, never left and right.

6. What the spike settled (W0, srctool/camouflage-web#5)​

Applied to camo-button and camo-dialog, checked by tests/node/manifest.test.ts, which generates the Custom Elements Manifest fresh and compares it with the contract (attributes, enum values, slots, events, inverted booleans).

FindingDecision
The contract's single content: SlotIt is the default slot (<slot name="">), not a slot named content. The skin's slots.content is "". Tested in the browser under both skins.
title is also a global HTML attributeThe browser would show a tooltip over the whole dialog. The element reads the attribute into the property and removes it. Other components should avoid a contract name that collides with a global attribute, or do the same.
Properties and decoratorsstatic properties plus declare fields, no decorators (they need build support and are not standard everywhere). Attributes reflect only where §3.2 says.
Where focus goes in a dialogThe slotted actions are light DOM, so native autofocus cannot see them. The dialog focuses an [autofocus] child, else dismiss, else confirm, after that button's first update. The dialog frame draws no focus ring of its own.
Manifest tooling@custom-elements-manifest/analyzer does not follow a defineElement() helper, so each class carries @tagname, @slot, @fires and @attr in its JSDoc. Enum values are not in the attribute's type text (only the alias name), so the check resolves aliases from skin/types.ts. The default slot appears in the manifest with the name "".
click when disabled or loadingNot fired (stopped in the capture phase); aria-disabled and aria-busy come from ElementInternals. Tested, axe passes.

Answers to the open questions

  • Default slot as the text: not in W0. Text stays an attribute; revisit after W1 with real usage, with the attribute winning if both exist.
  • One overlay options type or two: two. showCamoDialog takes ShowDialogOptions<T> (actions are objects with a result), the declarative element takes attributes and slotted buttons. They share the field names title and message, and both close through camo-close with { result }.

7. What W1 settled (srctool/camouflage-web#12 and #13)​

FindingDecision
Contract filecamouflage-contract.json (draft schema in the web repository, shared with srctool/camouflage#64): per component, its parameters (values with enum values and defaults, slots, callbacks) and its theme fields, in the base notes' names. The web mapping is derived from it by the rules of §3.1 to §3.4, in one place. A default-true boolean must be listed as inverted, or the check fails.
Manifest checkThe manifest is generated fresh and checked against the contract for every component, including camo-provider: attributes, enum values, slots, events, inverted booleans, kebab-case. It is published as custom-elements.json in the core package.
TypingsGenerated from the manifest and checked in CI: the tag and event maps (HTMLElementTagNameMap, HTMLElementEventMap), JSX for React 19 (@srctool/camouflage-core/react) and GlobalComponents for Vue (/vue). Compiled against a DOM, a React and a Vue consumer.
Theme-field gapsactionsLayout, titleAlign, showCloseButton, stackedScrim (dialog) and defaultAppearance (button) are not CSS values. They are listed and tested as gaps; a field leaves the list when the web carries it.
ScenariosOne list (scenarios/scenarios.json, JSON Schema) expands over skin, mode, text scale and direction into ids like the Kotlin file names. A new component needs a scenario entry and no test code: the Storybook harness story, the Playwright runner (three browsers, 0.5% tolerance, Linux baselines from CI) and the conformance checks read it.
Test modesreduced-motion, reduced-transparency and blur-off make the environment report that value, so a skin's fallback is exercised in any browser.
Size budgetpnpm size fails over a gzip budget set about 10% above the size; a milestone that adds components raises it in its pull request.
OpenThe scenario list is read by the web suite only: Kotlin's Roborazzi and Dart's Alchemist have not agreed to read it. The schema is a draft until srctool/camouflage#64 and the generator accept it.

8. What W2 settled (srctool/camouflage-web, milestone W2)​

FindingDecision
CamoText(style)The attribute is variant (body-medium, title-large, …): style is the global HTML attribute for inline CSS. The contract file lists variant; Kotlin and Dart keep style.
Rich textMarkup in the default slot (<strong>, <em>, <a href>), styled by the skin, instead of a span list. Each link is a real, focusable link.
IconsregisterIcons({ name: pathData | { svg, viewBox, autoMirror, original } }), or an inline <svg> child. Trusted markup, drawn through unsafeSVG so it also renders on the server. No label means decorative (aria-hidden); a label means role="img". An unregistered name draws an empty box.
Ambient icon style--camo-icon-size and --camo-content-color, set by every container (button, icon button, surface). The icon theme's size and color are gaps: the provider's reset is the root style.
Surfacelevel, shape, elevation, border; the skin's surface treatment paints it and clips content to the shape. It sets the content color to onSurface for its subtree. A block flag on SurfaceTreatment.decorate separates a region of content from a centered control.
DividerDecorative (aria-hidden). Insets follow the reading direction; a vertical divider takes the height of its row.
Icon buttonlabel is required and is the accessible name. Ghost by default; Raised falls back to Soft and Link to Ghost. The contract's non-null checked becomes toggle plus checked (an HTML boolean cannot be null); aria-pressed only when toggle. 48 px touch area around a 40 (Minimal) or 44 (Cupertino) container.
TooltipA stand-in drawn by the skin on hover and keyboard focus, hidden from assistive technology; the overlay camo-tooltip (W5) replaces it.
Shared drawingtextBase, iconBase, surfaceBase, dividerBase, iconButtonBase in core; a skin supplies defaults(theme) and spreads the base, so the no-literals rule still holds.
RobustnessAn empty attribute (appearance="", what a framework binding sends for "none") means absent.

9. What W3 settled (srctool/camouflage-web, milestone W3)​

FindingDecision
One baseCamoControl: a form-associated element with name, required, disabled and error; value and validity through ElementInternals; FormData, reset, checkValidity and disabled <fieldset> work. Events: a cancelable camo-before-change ({ value }), then input once per edit, and change on commit.
The editable nodeCore builds the <input> and hands it to the renderer as nodes.input; the renderer places it and draws label, helper text and error around it. They meet through fixed ids in the shadow root (input, label, supporting, error). The same node is the search field's, the stepper's and the pickers'.
Filters and formatsinputFilters and displayFormats are pure objects applied by applyEdit(previous, typed, cursor, …) around each edit; the cursor maps between raw and shown text. They run in Node.
Options are childrencamo-radio in camo-radio-group, camo-segment in camo-segmented-control: they render on the server and work in plain HTML. The group owns selection, the roving tab stop and the arrows (move and select, wrap, skip disabled). Server-render checked or selected on the child to avoid a flash.
Rich labelsA role makes its children presentational: a link in a checkbox label is focusable but invisible to a screen reader (axe nested-interactive). Labels take <strong> and <em>; a link or control in one warns. The link goes next to the control. A gap against the Kotlin and Dart labelSpans.
Formrules by input name: a rule or a list; rules are plain functions (CamoRules.required, requiredTrue, minLength, maxLength, min, max, pattern, email, matches), first failure wins. validate-mode: disabled (on submit), always, on-user-interaction, on-unfocus. camo-button type="submit" or Enter validates, then fires camo-submit (cancelable) or camo-invalid and focuses the first invalid input. setErrors takes server errors by name.
Dates and timesISO strings; month, weekday names, first weekday and the day label read by a screen reader come from Intl; calendar arithmetic is on year, month and day, so no time zone. A range is start and end; it submits start/end.
PickersA field plus a native popover (popover="auto": Escape, outside click, light dismiss), a popup below the field or a sheet from the bottom (presentation, auto by window width); camo-calendar is its own element. Single dates confirm with Cancel and OK (or instant); a range has Done and Clear. Space opens on key up.
Skin choicestimePicker is fields in Minimal and wheel in Cupertino (each wheel one adjustable control). Cupertino has no date wheel yet. Radio is a ring in Minimal and a checkmark list in Cupertino; the switch is the iOS 51 by 31.
Namesvalue for query; step (a spacing) for steps; checked for selected; readonly is the inverted allowTyping; hour-cycle is use24Hour.
GapsTyping a date into the field (allowTyping); CamoFieldFrame as an element; the theme fields that change structure (labelPlacement, labelPosition, showCheckIcon, showStopMarks, showValueLabel, stepper layout, showOutsideDays, time picker style).

10. What W4 settled (srctool/camouflage-web, milestone W4)​

FindingDecision
Overlay frameCamoModal: a native <dialog> shown with showModal() (top layer, scrim, focus trap, inert page, Escape), plus dismissal by the scrim, close(result), one camo-close, a focus target in slotted content, and an overlay that a server renders open and that becomes modal on hydration. persistent turns scrim and Escape off.
Popover overlaysMenu, tooltip and the pickers use popover="auto" (or manual). placePopover puts a popup below its anchor, above when there is no room, at the anchor's start edge; CSS anchor positioning is not used.
MenuAn anchor slot and element entries (camo-menu-item, camo-menu-divider, camo-menu-group exclusive). The anchor announces "has popup" and expanded; arrows, Home, End and typeahead move; a click or Enter runs the item's click and closes; checkable items are menu item checkboxes or, in an exclusive group, radios.
TooltipHover after a delay, keyboard focus at once; Escape, blur and press hide it; hoverable; never takes focus; the text is the anchor's description, not its name.
Paged liststate = { items, loading, endReached, error }, renderItem, itemKey; camo-load-more once per state near the end, camo-retry, camo-refresh (pull on touch); skeletons hidden from assistive technology, one live status. No virtualization.
SelectA text field plus a panel (no renderer of its own): camo-option children or an options property, searchable, async through loading, selected-label, camo-open, camo-query (debounced) and camo-load-more; a menu as wide as the field or a sheet (auto by window width and more than seven options).
SkeletonNo group element: every skeleton starts its cycle at the same moment of the page's clock. Stops under reduced motion.
Top barscroll-offset is a distance; scroll-target follows a scroller; Cupertino collapses a large title; title-content replaces the drawn title and the heading stays.
Host cannot see its children:host(:has(...)) is not in every engine and a server has no light DOM: slotted widgets are styled from the shadow root with ::slotted, and a gap belongs to the widget. W1's and W2's button rule for icons was dead in Chromium and is fixed.
GapsA wheel inside a select sheet and a date wheel; context menus; submenus, popover, side sheet and command palette (W6); the structural theme fields; refreshKeepsItems and itemFadeIn.

11. What W5 settled (srctool/camouflage-web, milestone W5)​

FindingDecision
Progresscamo-progress-bar and camo-progress-circle take progress (0 to 1, clamped); none is indeterminate. A progressbar with a value and a percentage, or with no value while unknown. Animations are CSS; under reduced motion each becomes a slow pulse. Cupertino's unknown circle is twelve fading spokes.
SnackbarA messenger, not a component: messengerOf(el).show(message, { action, tone, duration, withDismiss }) returns a promise of "action" or "dismissed"; one messenger per provider, one message at a time in the top layer, the timer held while hovered or focused, dismissCurrent(), swipe to dismiss; --camo-messenger-inset-bottom and -top replace CamoMessengerInsets. Minimal at the bottom, Cupertino a banner at the top. Polite announcement, assertive for error and warning.
BannerThe tone's status icon is slot fallback (icon slot replaces it); tone-info, tone-success, tone-warning and tone-error registered icons change them for banner and snackbar. status for info and success, alert for warning and error. Quiet buttons in actions take the banner's accent through --camo-action-color. dismissible adds a ✕ and fires camo-dismiss.
ChipOne element: selectable (filter; the app flips selected from click), removable (input chip, camo-remove, Delete and Backspace), clickable (action), none (tag). The ✕ is a real button except inside a chip that is itself a button. camo-chip-group is form-associated: a radio group for one choice (required keeps the last on) or toggle buttons for multiple; layout="scroll" is one scrolling row. A 48 px touch area around the 32 px chip.
Badgecount (absent is a dot, 0 or less draws nothing, above max reads "99+") and camo-badged-box anchoring it at the top-end corner (mirrored in right-to-left); the badge is hidden from assistive technology there and its text becomes the anchor's description.
AvataravatarInitials and avatarColorSeed (FNV-1a of the UTF-8 bytes; "Dwiki Riyadi" is 0xCDC853E9) are pure and shared with Kotlin and Dart; the photo is the app's <img slot="image">; initials until it loads. camo-avatar-group hides what is past max by CSS and adds a "+N" avatar once it has hydrated.
FABcollapsed folds an extended FAB (the name stays), hidden scales it out and takes it out of focus and reading; Minimal a flat rounded square, Cupertino a circle.
Tabscamo-tabs with camo-tab children: arrows select, a cancelable camo-before-change then change, one indicator measured by the container and slid with CSS (a tab draws its own until then, and on the server). Cupertino is a segmented control; a scrolling bar uses the underline.
Navigationcamo-nav-item (value, label, icon, selected-icon, a badge slot) in camo-navigation-bar, -rail and -drawer (with camo-nav-section), landmarks of links with aria-current="page", not tabs. The selection, roving and events are shared (NavigationController); picking the current item fires camo-reselect. camo-modal-drawer is the overlay frame from the start edge.
Namesexpanded is the inverted collapsed (FAB), visible is hidden (FAB, navigation bar), indicatorSize is indicatorWidth and indicatorHeight; title of a nav section is read and removed like the dialog's.
GapsCamoAdaptiveNavigation and an edge swipe to open the drawer; a snackbar is inert behind an open modal dialog; a screen reader's longer snackbar timeout; the structural theme fields (progress showStopIndicator, snackbar position, alignment, showDismiss, showToneIcon, banner accentBorder, toneIcons, chip showCheckWhenSelected, badge defaultTone, avatar shape, FAB size, tabs indicatorWidth, the chrome placement, indicator, showLabels).

12. What W6 settled (srctool/camouflage-web, milestone W6)​

FindingDecision
Parts a renderer drawsA renderer is pure, so it writes data-part (and data-key, data-id, data-index) on what is pressed and the element listens once on itself (the split button's parts, pagination, the carousel's buttons, the uploader's zone and rows, the table's sort headers).
PopoverOne pure placement function: below, then above; a side asked for (start and end follow the writing direction), then the opposite, then below; centered on the anchor and kept inside the window; it returns the physical side and where the anchor's center is, for the arrow. Click on the anchor toggles; outside click and Escape close; focus returns to the anchor; "has popup", expanded.
Button group and split buttonConnected by default (spaced is the inverted connected); the group passes its corners to the buttons through inherited properties, so a server render is already joined. The split button is two real buttons and the real menu, opening under the whole button; menu-only is a menu button.
Side sheet and toolbarcamo-side-sheet docked (complementary region, scrolling content, pinned actions) and camo-modal-side-sheet in the overlay frame from the end edge. The toolbar's actions are camo-icon-buttons: those that do not fit fold, in order, into a "more" menu with their labels, tones, disabled state and a checkmark for a toggle.
Image, rating, carouselThe image shows the browser's <img> in the skin's frame (placeholder, fade, error mark; no description means decorative). The rating is form-associated and adjustable (a slider; an image when read-only). The carousel is a scroll-snap strip with the strip as its one Tab stop, inert items out of sight, a page read when the scroll settles, and opt-in autoplay that stops for good once the user steps.
File uploaderThe zone is one button firing a cancelable camo-pick; picked and dropped files arrive in camo-files-dropped and are the form value; the app sets files rows (progress, remove, retry, a failed row announced once).
Data table and treeA real <table role="grid"> (sticky header, aria-sort, selection by a Set or a list of keys, sorting the app's); a flat list of treeitems with level, place and expanded state, lazy loading asked once. Both take object properties, which render on the server but hydrate only when set before the element upgrades.
Pagination, breadcrumb, stepspageItems keeps a fixed length of 2 * siblings + 5; the arrows move focus without choosing. The breadcrumb's items are data holders, the trail is drawn and folded by the breadcrumb (planBreadcrumb). Steps take their state from current; only clickable ones are buttons; index and count reflect for a server render.
Namesconnected is the inverted spaced, showIndicator the inverted hide-indicator; onClose is camo-close, onPageChange is camo-page-change; page counts from 0; the table's selection is a Set or a list.
GapsVirtualization, content-measured and resizable columns, row expansion and cell editing; checkbox trees and range selection; a rich tooltip; the toolbar's labels, hide on scroll and vertical form; the structural theme fields (popover showArrow, toolbar placement, table density, tree showLines, and the rest of the list in the findings).

13. What W7 settled (srctool/camouflage-web, milestone W7)​

FindingDecision
Package@srctool/camouflage-charts depends on core only; /define registers camo-chart-frame, camo-chart-data-table, camo-sparkline, camo-line-chart, camo-bar-chart, camo-pie-chart and camo-charts-provider. Charts are not in the skin contract
DrawingBy fractions, so nothing is measured: a stretched SVG with non-scaling strokes for lines and areas, boxes at percentages for bars, dots and labels, a square SVG for the pie. The server's drawing is right at any width and hydration moves nothing
DataJSON attributes (categories, series, slices, values), or properties; the server and the browser read the same data before the first render. Functions (axis and value formats) are properties only
StyleThe theme's defaults, the preset for the skin's name, the theme's tokenSets.chart, then chart-style. The palette is live color-family variables, leaving out those under 3:1 with the surface
AccessibilityA plot is role="application" (not an image, so arrow keys reach it), named by the title and a generated summary, with the focused point said in a live region. A sparkline is an image. The table fallback is camo-chart-data-table
Replacing the drawing<camo-charts-provider .renderer=…>; the frame, axes, legend, keys and tables stay
Right-to-leftLogical properties and one mirrored SVG; a time axis stays left to right and a pie keeps turning clockwise
A W4 bugA card or list item that was not clickable cancelled every click inside it. Now it blocks only its own click; a disabled one still blocks everything
GapsZoom, pan and brush; dual y axes; patterns as a second cue beside color; the skin's tooltip renderer; label thinning on a server; gauges and reference bands

14. What W8 settled (srctool/camouflage-web, milestone W8)​

FindingDecision
Packagesskin-material, skin-fluent and skin-carbon join Minimal and Cupertino, each on core only. Theme factories that need the color library are a /factory entry, since plain Node cannot load it
How a skin is writtenMost renderers are core's shared base with the skin's defaults(theme) and a little CSS on its parts; button and dialog are the skin's own
OptionscreateMaterialSkin({ expressiveProgress }), createCupertinoSkin({ surface }) (classic or liquid-glass), createFluentSkin({ surface }) (solid, acrylic, mica). cupertinoSkin is now Classic with blurred bars, sheets and menus
Capabilities in CSSThe provider writes --camo-blur-supported, --camo-glass-refraction, --camo-material-texture, --camo-window-material and --camo-input-pointer after hydration; the server writes none, so the first paint is opaque and touch-sized
RefractionAn SVG displacement filter inside backdrop-filter, in Chromium only (userAgentData); elsewhere glass keeps blur and edge
DensityFluent (32 pointer, 40 touch) and Carbon (40, 48) follow the input in CSS; fluentTheme({ density }) and carbonTheme({ density }) fix it
RippleThe press controller leaves the pointer's position in --camo-press-x and --camo-press-y
Colors changed for contrastFluent: dark error text #ee8f94, light warning #bc4b09. Carbon: dark error #ff8389, the light theme's inverse link #78a9ff; banner actions are link blue
Core bugs foundA line or dot navigation indicator squashed the icon; a bottom sheet's close button stacked under the title and left an empty heading when untitled; a removed tooltip threw; a side-aligned snackbar did not center below 600
GapsNo time-picker dial or date wheel; no Material switch icons; no Fluent dialog close button; Carbon steps a nested tile one layer only; Liquid Glass not measured on a mid-range device; Mica untested against a window material

Material availability on the web

SkinSurfaces, best firstNeeds
Minimal, Material, Carbonflat, paper, layerednothing
Cupertino Classicblur, opaquebackdrop-filter
Cupertino Liquid Glassrefraction, blur and edge, Classic blur, opaquerefraction: Chromium in a secure context
Fluent Acrylicblur, tint and grain; grain over solid; Solidbackdrop-filter
Fluent Micathe window's material, Solida window material; a web page has none

Reduce Transparency ends every chain at the opaque surface.

15. What W9 settled (srctool/camouflage-web, milestone W9)​

FindingDecision
Submenuscamo-menu-submenu (text, open, disabled) inside a menu, any depth. Its child is a nested popover="auto", so Escape and a click outside behave natively. Hover opens after 250 ms and closes after a 120 ms grace
Split panecamo-split-pane with camo-pane children. Each pane carries its own size, min-size, max-size, collapsible and draws the divider after itself, so a server draws the split from attributes. fractions saves and restores; camo-resize reports
SeparatorThe divider is a real separator with a percentage value, which the web has and Compose and Flutter do not
Scrollbarcamo-scrollbar is the scroll area itself. With a mouse the platform bar is hidden by CSS (so nothing moves at hydration) and the skin's is drawn; touch and no-script keep the platform's. Camouflage's own scroll containers use the platform's bar in the theme's colors, not the skin's renderer
DensityA generic `density="xs
Renderers60 on the web with splitPane and scrollbar
GapsNo safe triangle for the pointer path to a submenu; no scroll adapters for virtualized lists; the drawn scrollbar is not wired into the tree, table or lists; Carbon xs keeps 14 px text; the macOS "show scroll bars" setting is not read