Skip to content

Thin the app shells: move repeated consumer widgets into eggshell #351

Open

Description

@samitbasu

Goal (user, 2026-11-17): thin the consumers' app shells as much as possible by owning every widget pattern they repeat.

From the consumers' inventories:

Later candidates, seen once each: an a11y pattern for breadcrumbs, a stepped-track slider (timeline). Insight's own inventory will be folded in when it arrives.

Activity

  1. added
    record
    on Nov 18, 2026
  2. samitbasu commented on Nov 18, 2026

    @samitbasu
    OwnerAuthor

    Placement decision (user, 2026-11-17): cover as much of shadcn's toolkit as possible, but not in the core crate.

    • Core: primitives and universal controls (button, checkbox, select, text field, slider…).
    • crates/eggshell-ui-extras: composites such as accordion, carousel/gallery, badge, chip, spinner, tabs, notifications and combobox/command. Each is feature-gated and built only on core's public API. Styles live in extras; shadcn values go behind the shadcn crate's extras feature, like Markdown.
    • Core gaps: a gap in core's API is fixed with a small public core primitive, not a #[doc(hidden)] back door.
  3. samitbasu commented on Nov 18, 2026

    @samitbasu
    OwnerAuthor

    Audit: which core controls could move to eggshell-ui-extras

    Read-only audit of origin/main at cb0c520, against the placement rule above. Core keeps the primitives and the universal controls. Composites go to extras, feature-gated and built only on core's public API. Gaps are closed with small public core primitives. keyed_under and report stay the only #[doc(hidden)] exceptions.

    Summary

    module lines recommendation primitives needed to move it
    owned/table.rs 620 MOVE NodeHandle::hover_by_rect made public (P6). Cells use the existing keyed_under exception.
    owned/progress.rs 248 MOVE Colors::classes (P4), the public version of painted. Optional: NodeHandle::live (#347).
    owned/toggle_group.rs 138 MOVE ToggleChain::role(Role) / ButtonChain::role (P9). Optional: roving nav + Nav::Row (#346).
    owned/segmented.rs 368 MAYBE P1 enablement(), P2 control_size(), P3 Look::classes + Enablement::fade, P5 Keyed::lookup, P7 tile_hits, P8 whole-control tooltip, plus #346's selected and nav
    owned/toggle.rs 197 KEEP (would need ButtonChain::marked; its looks are part of ButtonStyle)
    owned/stepper.rs 409 KEEP (would need P1–P3, P5, P8, FieldHooks, Autofocus, select_on_focus, Edits, ValueRange::clamp/checked, announces)
    owned/splitter.rs 522 KEEP (deeply internal: sizes_pane, pane_rect, size_in_flight, Builder::flex)
    owned/select.rs 407 KEEP (universal; room_for, nav::highlight_initially, kept, menu::Tone)
    owned/menu.rs 1069 KEEP (universal; context menus, Menus in Kept, commands)
    owned/slider.rs 641 KEEP (universal; input_trace, TextLeaf, Autofocus, Edits)
    owned/button.rs 594 KEEP (universal; action, command, announces)
    owned/checkbox.rs 239 KEEP (universal)
    owned/radio.rs 260 KEEP (universal; its private roving code is deleted by #346's nav)
    owned/switch.rs 270 KEEP (universal; transition::animate)
    owned/field_box.rs 88 KEEP (a primitive: the field frame used by text_field and the slider readout)
    owned/custom.rs 136 KEEP (a primitive: the public leaf extras build on)
    owned/choice.rs 116 KEEP (a shared type: Choice/IntoChoice)
    owned/number.rs 307 KEEP (shared types and keys: ValueRange, Step, Edit, Edits)
    owned/mod.rs 830 KEEP (shared helpers; builder.rs and draw.rs call into it)
    prim/text_field.rs 322 KEEP (universal)
    prim/mod.rs 75 KEEP (Icon, Prim)

    Counts: 21 modules. 3 MOVE (1,006 lines), 1 MAYBE (368 lines), 17 KEEP.

    Note: most of what the controls use privately already has a public equivalent.

    • Slot / slot / claim / scope_with / div_id_with → the chain stores its K: Key, then div_id / scope / id_of.
    • leaf / leaf_with → Builder::custom(..).measure(..).
    • tip / tipped → NodeHandle::tooltip / tooltip_with. The chain stores the text or an Arc of the builder until add.
    • described / describe → NodeHandle::role + named, plus egui's Response::widget_info / accesskit_node_builder in a draw closure.
    • nav::take_activation → NodeHandle::on_click, which already takes keyboard activation.
    • draw::node_id_or_report → NodeUi::node_id.
    • check() / Chevron → Icon::new(icons::…).
    • OnResponse → a 10-line Option<Rc<dyn Fn>>.

    The real gaps are the style-to-classes helpers and three interaction flags (hover_by_rect, tile_hits, the whole-control tooltip).

    Public primitives needed across the MOVE and MAYBE items (deduplicated)

    # primitive replaces (private today) needed by status
    P1 Builder::enablement(): the inherited inert enablement Builder::enablement_of (builder.rs:197) segmented planned
    P2 Builder::control_size(): the inherited size Builder::size_of (builder.rs:204) segmented planned
    P3 Look::classes / Paint::classes, plus Enablement::fade / apply / colors owned/mod.rs:394,410,159,168,185 segmented planned (the Enablement methods are not yet listed)
    P4 Colors::classes(Tw) -> Tw: fill, border and text, select_none painted (owned/mod.rs:384), slider::track_classes (slider.rs:122) progress new, XS. Or inline 4 public Tw calls, at the cost of a drift copy.
    P5 Keyed::lookup made public: get, reporting MissingStyleEntry contract.rs:108 segmented new, XS (get + report works today)
    P6 NodeHandle::hover_by_rect: hovered over its rect, also under a sibling builder.rs:1950 table rows new, XS
    P7 NodeHandle::tile_hits: sensing children tile the padding box builder.rs:1957 segmented new, XS
    P8 Whole-control tooltip: the node's tip shown while any part is hovered or focused, plus a part that is described by it tipped_whole, tip_describes (owned/mod.rs:344,352 → tooltip.rs:384,404) segmented new, S
    P9 ToggleChain::role(Role) (or ButtonChain::role) ButtonChain::role (button.rs:294), ToggleChain::member (toggle.rs, pub(super)) toggle_group new, XS
    — NodeHandle::selected(bool) + NodeHandle::nav(Nav) + Nav::Row radio's private roving code (radio.rs:223–245, key::viewport_id) segmented (required for parity with Tabs), toggle_group (optional: arrow keys) planned (#346)
    — NodeHandle::live(Live) accesskit in a draw closure progress (optional) planned (#347)
    — keyed_under slot_of(band.with(("cell", column))) (table.rs:589) table cells existing exception

    Not needed by any move: Builder::text_style, FieldHooks, Autofocus, Edits, ValueRange::clamp/checked, nav::highlight_initially, room_for, sizes_pane, pane_rect, input_trace, transition::animate. Only KEEP modules use them.

    What the planned items unblock

    Net: with P4, P6 and P9, three XS additions, the three MOVE items move today. Segmented additionally needs P1–P3 (planned), P5, P7, P8 and #346's selected/nav.


    Details per module

    Line references are to origin/main. "Private" means pub(crate), pub(super) or module-private.

    owned/table.rs: 620 lines. MOVE

    1. What it is: a grid table (b.table(key)) with header, footer, striped bodies and single selection. Roles: Table / Row / ColumnHeader / Cell.
    2. Private items it uses:
      • Slot (11,123), b.slot (134), b.slot_of (589), div_id_with (315,592), b.reborrow (430)
      • NodeHandle::hover_by_rect (413), NodeHandle::id (414)
      • draw::node_id_or_report (608)
      • TableStyle from contract
    3. Replacements:
      • div_id(key, ..), and b.id_of(band) for handle.id().
      • Cells keyed under the row band → keyed_under (existing exception).
      • ui.node_id().
      • P6 hover_by_rect.
      • TableStyle moves to extras (TableStyle::of(ctx), from_style, as MarkdownStyle does).
    4. Core dependants: none in core. Extras' markdown uses owned::{Cells, Column, Align} (markdown/build.rs:8, parse.rs:6), so the markdown feature would enable table.
    5. MOVE: shadcn's Table is a composite, and the only core gap is one interaction flag.
    6. Break for apps:
      • eggshell-ui-extras with features = ["table"] and use eggshell_ui_extras::table::TableExt;. b.table(..) keeps its name.
      • owned::{Align, Cells, Column, Selectable, Selected, TableChain, Unselectable} move path.
      • Style::table / TableStyle leave core's Style.

    owned/progress.rs: 248 lines. MOVE

    1. What it is: a determinate progress bar (Role::ProgressIndicator, 0–100), drawn like the slider's track.
    2. Private items it uses:
      • Slot (8,86), b.slot (96), div_id_with (154)
      • tip (147), tipped (160), TipContent / Content (7,89,121,133)
      • slider::track_classes (6,150), which is painted
    3. Replacements:
      • div_id.
      • NodeHandle::tooltip / tooltip_with.
      • P4 Colors::classes for the track and fill.
      • a11y through egui in a draw closure, as today (widget_info, accesskit_node_builder).
      • ProgressStyle moves to extras.
    4. Core dependants: none. It depends on slider only for track_classes.
    5. MOVE: a feedback indicator, like Spinner (Spinner: an owned loading indicator #348), which is already placed in extras.
    6. Break for apps:
      • features = ["progress"] and ProgressExt.
      • ProgressChain moves path.
      • Style::progress / ProgressStyle leave core.
      • The Progress newtype stays in core (transitions use it).

    owned/toggle_group.rs: 138 lines. MOVE

    1. What it is: ToggleGroup plus b.toggle_item(&group, value, face): toggles where one member is on, each Role::RadioButton, placed anywhere below the builder.
    2. Private items it uses:
      • ToggleChain::new / member (pub(super), toggle.rs), which sets ButtonChain::role(RadioButton) (button.rs:294)
      • Member fields (pub(super))
      • key::child_id, which is already public as eggshell_ui::child_id
    3. Replacements: b.toggle(MemberKey, face, current == value) + P9 .role(Role::RadioButton) + on_change (public). Optional: Tabs: tab list + panels with roles, roving arrow keys, and the panel switch #346's nav(Nav::Row) for arrow keys, which it lacks today.
    4. Core dependants: none. It depends on toggle and button, which stay.
    5. MOVE: shadcn's ToggleGroup is a thin composite over the toggle. With one XS primitive, the 138 lines leave core.
    6. Break for apps:
      • features = ["toggle-group"] and ToggleGroupExt for b.toggle_item(..).
      • ToggleGroup, Member and ToggleItemChain move path.
      • No style change: the looks stay in ButtonStyle's toggle looks.

    owned/segmented.rs: 368 lines. MAYBE

    1. What it is: a segmented control (radio semantics), one row or wrapping, with custom-cell mode (Cell).
    2. Private items it uses:
      • Slot (14,69,298), b.slot (98), div_id_with (311)
      • enablement_of (218), size_of (239), Keyed::lookup (239), tile_hits (362)
      • tip (217), tipped_whole (365), tip_describes (338), Tooltip::text (330)
      • described (336), OnResponse (11,79,109,303)
      • centered (263), Paint::classes (263), Enablement::fade (253) / and (330)
    3. Replacements:
    4. Core dependants: none in core. Tabs (Tabs: tab list + panels with roles, roving arrow keys, and the panel switch #346, extras) plans to share its look through SegmentedStyle::track / cell kept in core. The control is used across the core test suite: control_size, inert_look, tooltips, state_stable, duplicate_key, contract_gaps, snapshots and several examples.
    5. MAYBE: feasible, and moving it next to Tabs puts the two "pick one of N" strips in one crate. But it needs six primitives, and Tabs: tab list + panels with roles, roving arrow keys, and the panel switch #346 already chose to keep it in core with public class methods. It is a radio-group skin, which is arguably universal.
    6. Break for apps:
      • features = ["segmented"] and SegmentedExt.
      • Cell and SegmentedChain move path.
      • Style::segmented moves to extras, and the preset's segmented block (preset.rs:439–479) moves under shadcn's extras feature.

    owned/toggle.rs: 197 lines. KEEP

    1. What it is: a button that shows on or off (aria-pressed), over bool or two values.
    2. Private items it uses: ButtonChain::new / marked / role (pub(super), button.rs:263,288,294), flip (owned/mod.rs:119), Unset.
    3. Replacements: a public ButtonChain::marked(Mark) would let it move.
    4. Core dependants: toggle_group. Its looks (toggle_on / toggle_off / toggle_sizes) are part of ButtonStyle (button.rs:534–552; preset.rs:378).
    5. KEEP: a pressed state is a button state. Moving it either leaves its looks in core or splits ButtonStyle.
    6. —

    owned/stepper.rs: 409 lines. KEEP

    1. What it is: a number input: a field plus up and down buttons, typed sessions, Edit began/ended.
    2. Private items it uses:
      • Slot, slot (74), claim (267), scope_with (268), leaf (274), announces (297)
      • enablement_of (201), size_of (204), lookup (204)
      • tip (200), tipped_whole (310), tip_describes (300,376), described (299)
      • FieldHooks (11,60,84,322), Autofocus (16,…,324)
      • field_box_classes (216), text_sized (238), centered (238,250), Paint::classes (250), Enablement::colors (229), Chevron (288)
      • number::pressed (363), Edits, ValueRange::checked (199) / clamp (388)
      • text_field::select_on_focus (prim/text_field.rs:36)
    3. Replacements: it would need P1–P3, P5 and P8, plus public FieldHooks, Autofocus::apply, select_on_focus, Edits and ValueRange::clamp / checked. These are about 7 new surfaces.
    4. Core dependants: none, but it shares the typed-session and Edits logic with the slider readout (Slider readout: open signal, typed range, readout-only control, tone #328). Moving it would fork that logic.
    5. KEEP: a number field is a universal control (<input type=number>), and the move cost is high.

    owned/splitter.rs: 522 lines. KEEP

    1. What it is: a resizable split between two panes of a flex container.
    2. Private items it uses:
      • Slot / slot (212), div_id_with (361)
      • Builder::flex (322), size_in_flight (358), sizes_pane (363)
      • draw::pane_rect (13,386), plane::Axis (14,…)
      • transition::animate (495), node_id_or_report (494)
      • number::hold_arrows / pressed (465,480)
    3. Replacements: none small. Pane sizing is applied in layout.
    4. Core dependants: Side is used by draw.rs:32, pipeline.rs:28 and builder.rs:1977.
    5. KEEP: deeply internal to layout and draw.

    owned/select.rs: 407 lines. KEEP

    1. What it is: the select (ComboBox trigger plus a listbox overlay).
    2. Private items it uses:
      • room_for (341) / pipeline::Room
      • nav::highlight_initially (366), b.kept() (366)
      • menu::Tone and row_classes / box_classes (12,331,…)
      • number::hold_arrows / pressed (13,246,250)
      • enablement_of, size_of, lookup, Paint::classes (217), fade (227), tip, tipped, describe, check, Chevron
    3. Replacements: —
    4. Core dependants: it shares the menu's listbox look. Combobox and Command palette (searchable pickers) #345 C1 adds popup semantics to its trigger.
    5. KEEP: a universal control, on the overlay and nav internals.

    owned/menu.rs: 1069 lines. KEEP

    1. What it is: dropdown and context menus, submenus, check, radio and command items.
    2. Private items it uses:
      • Menus in Kept (kept.rs:17), open_focus (528), OverlayChain internals
      • commands::Bound (303), b.command (281), nav::take_activation (546)
      • number::hold_arrows / pressed (541,556)
      • painted, describe, check, Chevron, enablement_of, slot, reborrow
    3. Replacements: —
    4. Core dependants: NodeHandle::context_menu (builder.rs:1987–2002), Placed::menu_open, select (Tone). It depends on button.
    5. KEEP: universal, and core's own API calls into it.

    owned/slider.rs: 641 lines. KEEP

    1. What it is: the slider, with label, readout and typed readout.
    2. Private items it uses:
      • input_trace (19,553,609), measure::TextLeaf (469), draw::node_text (468)
      • Autofocus (18,593), finite::clamp (97,284,527)
      • Edits, number::* (104–112), announces (534), leaf (585), claim / scope_with (354)
      • FieldBoxChain::new (574), text_field internals, Paint::classes (309), painted, tipped_whole, tip_describes
    3. Replacements: —
    4. Core dependants: progress (track_classes). Readout features in Slider readout: open signal, typed range, readout-only control, tone #328.
    5. KEEP: universal.

    owned/button.rs: 594 lines. KEEP

    1. What it is: the button.
    2. Private items it uses:
      • NodeHandle::action (583), announces (581), b.command (453)
      • enablement_of / size_of (518–519), lookup (538–551), Look::classes (556), fade (568)
      • tip (517), described (587), nav::take_activation (588)
    3. Replacements: —
    4. Core dependants: menu (DropdownChain, triggers), toggle, toggle_group, Commands.
    5. KEEP: universal.

    owned/checkbox.rs: 239 lines. KEEP

    1. What it is: the checkbox.
    2. Private items it uses: claim / scope_with (207–208), enablement_of (187), size_of / lookup (192), Paint::indicator (197), choice_row (210), choice_label (232), check (221), flip (188), tip (186), described (225).
    3. Replacements: —
    4. Core dependants: shares choice_row / choice_label / indicator with radio and switch.
    5. KEEP: universal.

    owned/radio.rs: 260 lines. KEEP

    1. What it is: the radio group.
    2. Private items it uses:
      • private roving focus (number::hold_arrows / pressed, 223–226; key::viewport_id, 245)
      • claim / scope_with (118–119), enablement_of, size_of / lookup (105), indicator (137), choice_row, choice_label, described
    3. Replacements: Tabs: tab list + panels with roles, roving arrow keys, and the panel switch #346's NodeHandle::nav + Nav::Row replaces the roving copy.
    4. Core dependants: —
    5. KEEP: universal.

    owned/switch.rs: 270 lines. KEEP

    1. What it is: the switch.
    2. Private items it uses: transition::animate (205,238), claim / scope_with (202–203), enablement_of, size_of / lookup (191), Enablement::colors (213), choice_row, choice_label, flip, tip, described.
    3. Replacements: —
    4. Core dependants: —
    5. KEEP: universal.

    owned/field_box.rs: 88 lines. KEEP

    1. What it is: b.field_box(key), the input frame that holds a field and what sits beside it.
    2. Private items it uses: Slot / slot / reborrow (24–25), div_id_with (86), enablement_of / size_of (69–70), lookup (72), field_box_classes (73), text_sized (84).
    3. Replacements: —
    4. Core dependants: text_field's leading and trailing icons (prim/text_field.rs:278), the slider readout (slider.rs:574).
    5. KEEP: a public primitive that extras composites (combobox input) build on.

    owned/custom.rs: 136 lines. KEEP

    1. What it is: b.custom(key, classes), a measured leaf hosting egui content.
    2. Private items it uses: slot (45), leaf_with (120), tip / tipped (118,128).
    3. Replacements: —
    4. Core dependants: —
    5. KEEP: it is the public leaf. Extras replaces leaf / leaf_with with it. CustomChain::tooltip doesn't add hover sensing, so the tooltip never shows unless the classes sense hover #244 is open against it.

    owned/choice.rs: 116 lines. KEEP

    1. What it is: Choice / IntoChoice.
    2. Private items it uses: none beyond Enablement.
    3. Replacements: —
    4. Core dependants: radio, segmented, select. Tabs (Tabs: tab list + panels with roles, roving arrow keys, and the panel switch #346) reuses it from extras.
    5. KEEP: a shared public type.

    owned/number.rs: 307 lines. KEEP

    1. What it is: ValueRange, Step, Edit (public), plus Edits, hold_arrows, pressed, steps_pressed and ValueRange::clamp / checked (pub(super)).
    2. Private items it uses: draw::node_id_or_report (282), finite::clamp.
    3. Replacements: —
    4. Core dependants: slider, stepper, radio, select, menu, splitter.
    5. KEEP: shared infrastructure.

    owned/mod.rs: 830 lines. KEEP

    1. What it is: the shared control helpers (Enablement, Mark, OnResponse, FieldHooks, tooltip glue, describe, Look / Paint::classes, field classes) and the Builder methods.
    2. Private items it uses: —
    3. Replacements: P3 and P4 are exactly its helpers made public.
    4. Core dependants: builder.rs:1934 (tipped), draw.rs:617,621,721 (describe), commands.rs:26 / builder.rs:23 (Enablement, Mark).
    5. KEEP.

    prim/text_field.rs: 322 lines. KEEP

    1. What it is: the text field (measure / show public, plus TextFieldChain).
    2. Private items it uses: Slot / slot / reborrow (75–76), leaf (286), leaf_with (311), size_of (258), lookup (305), FieldHooks (16,80,105), Autofocus / Token (14,…,193), FieldBoxChain::new (278), text_sized / text_field_classes (305,309).
    3. Replacements: —
    4. Core dependants: slider readout, stepper.
    5. KEEP: universal. Combobox and Command palette (searchable pickers) #345 C3 adds TextFieldChain::role.

    prim/mod.rs: 75 lines. KEEP

    Icon (public) and the internal Prim enum that measure, draw, testing and debug use. A primitive.

    Break summary for apps if the three MOVEs land

    • A dependency on eggshell-ui-extras with features = ["table", "progress", "toggle-group"], and one extension-trait import per widget (TableExt, ProgressExt, ToggleGroupExt). Call sites keep their names.
    • Type paths move from eggshell_ui::owned::… to eggshell_ui_extras::<widget>::….
    • Style::table and Style::progress leave core's Style. Their styles become TableStyle::of(ctx) / ProgressStyle::of(ctx) in extras, derived from Style like MarkdownStyle, and shadcn values sit behind eggshell-ui-shadcn/extras. An app that edits style.table or style.progress installs the extras style instead.
    • Extras' markdown feature enables table.
    • Breaking, acceptable while undeployed.
  4. samitbasu commented on Nov 18, 2026

    @samitbasu
    OwnerAuthor

    Added from a consumer's widget review (2026-11-18):

    The review's own recommendations (adopt table, icons and icon buttons now; pane host, pole–zero, traces, stats stay in the app) are consumer-side.

  5. samitbasu commented on Nov 18, 2026

    @samitbasu
    OwnerAuthor

    Queue (user, 2026-11-18): design notes, then builds, started as workers free up (at most 3 subagents, plus the two peers), in this order:

    1. Badge tones / widest_of / absent (Badge and Chip: owned labels, with an optional remove (×) and click #349 follow-up) + stable-width text (Stable-width text: reserve the widest of a set of strings #129)
    2. Form section + labelled row (Form section and labelled row (grouped form, LabeledContent) #370) and table digit columns + group rows (Table: digit-width columns and group header rows (key–value grids) #371)
    3. testing::Driver (testing::Driver: an interactive test driver (click, drag, type, press, settle) #373), then migrate eggshell's own tests onto it
    4. Alert/Banner (Alert / Banner #372) + dialog surface and footer (Sheets, drawers and slide-in sidebars #21)
    5. Text audit (Text audit: Placed::text_findings() for wrapped, clipped or elided text #374), built on the driver

    In flight before them: Notifications #347, Accordion #350, the screenshot flake #367 (with #360 and #357), Tabs #346 (blocky), and #315 stage 1 plus #353 (wordy-guy).

  6. samitbasu commented on Nov 18, 2026

    @samitbasu
    OwnerAuthor

    Queue additions (user, 2026-11-18), after item 5: hover card #376, menubar #377, skeleton #378, carousel #379, navigation menu #380.

  7. samitbasu commented on Nov 19, 2026

    @samitbasu
    OwnerAuthor

    shadcn audit: eggshell's claims against the pinned snapshot (f50887a, 2026-11-19)

    Read-only; no code changed. Sources are only apps/v4/registry/ and apps/v4/content/docs/components/ of the snapshot. S = apps/v4/registry/styles/style-vega.css, B = apps/v4/registry/bases/radix/ui/. Ours = the Vega style of crates/eggshell-ui-shadcn (preset.rs, tokens.rs, styles.rs) on main, and the PR branches for #401, #411 and #415. Rows are grouped structural, then visual; "none" rows are claims that match.

    Structural

    Component Our value shadcn's value Source Severity
    Combobox (#401) A select-like trigger (label plus chevron) that opens a popover holding a search field and the list (command/mod.rs combobox, placement below().gap(menu.offset)) ComboboxInput: an InputGroup whose input is the trigger (you type in place) and an InputGroupButton variant="ghost" size="icon-xs" ChevronDown at inline-end; optional clear (X); the popup holds only the list (+ empty), no search field. Popup sideOffset=6, min-w = anchor + 7 units, w = anchor width B combobox.tsx:78-99 (input), :103-135 (content, sideOffset = 6); S:296-298, :324-326 structural
    Autosuggest (#401) A text field with a suggestion list under it This is shadcn's Combobox itself (input + list); the ghost chevron and clear are part of it B combobox.tsx:78-99 structural (same finding)
    Command (#401) List max height 300; search field h_px(36); rows hover/selected in the menu item's accent fill max-h-72 (288); input group h-8 (32) bg-input/30 border-input/30 rounded-lg shadow-none in a p-1 pb-0 wrapper, search icon size-4 opacity-50; root bg-popover rounded-xl p-1; item selected = bg-muted text-foreground (not accent), rounded-sm px-2 py-1.5 gap-2, group heading px-2 py-1.5 text-xs font-medium text-muted-foreground, empty py-6 text-center text-sm; shortcut text-xs tracking-widest S:357-411 structural (selected fill, search field size)
    Dialog close button (#411) Note says shadcn's × is "bare 16 px at top-4 right-4"; ours is ghost icon-sm at top-2 right-2 (L-D3 (a)) Button variant="ghost" size="icon-sm" (32 px) with cn-dialog-close absolute top-4 right-4. So option (c) "icon-sm at top-4" is shadcn's; the premise of (a) is wrong B dialog.tsx:67-69; S:471-473 structural (a design claim in the note is wrong)
    Select popup position Opens below the trigger like a popper Radix default is position="item-aligned": the list opens over the trigger with the selected item aligned on it; popper only when asked. Item check indicator absolute right-2, items pr-8 pl-2 B select.tsx:70-78; S:1031-1041 structural
    Segmented / Tabs (#346) segmented.track_fill = t.input; unselected text muted_foreground List bg-muted; trigger text text-foreground/60, hover text-foreground; active bg-background (dark dark:bg-input/30 + border-input) B tabs.tsx:27-31, :65-67; S:1320-1325 visual (listed here since #346 builds on it)
    Menubar (#377) Not built (design note only) Bar h-9 gap-1 rounded-md border p-1 shadow-xs; trigger rounded-sm px-2 py-1 text-sm font-medium hover:bg-muted aria-expanded:bg-muted; content min-w-36; checkbox and radio items have the indicator on the left (pl-8, left-2, rounded-md), unlike dropdown-menu (pr-8, indicator right-2); label text-sm font-medium with no muted colour S:798-852 none yet (build to this)
    Navigation menu (#380) Not built Trigger rounded-md px-4 py-2 text-sm font-medium hover:bg-muted, open bg-muted/50; link rounded-md p-2 gap-1.5; viewport/popup rounded-lg shadow ring-1; chevron size-3 rotates 180; position transition 300 ms cubic-bezier(0.22,1,0.36,1), enter/exit scale-90 S:855-897 none yet (build to this)
    Toasts (#347) Not built Sonner; the only shadcn class is cn-toast = rounded-2xl; colours --normal-bg=popover, --normal-text=popover-foreground, --normal-border=border, --border-radius=var(--radius); icons size-4 B sonner.tsx:70-85; S:1245-1247 none yet

    Visual: classes (preset)

    Component Our value shadcn's value Source Severity
    Button padding / gap px-4 py-2 (button_padding 16, 8), gap 8 px-2.5 (10), gap-1.5 (6), has-icon px-2; sm px-2.5 gap-1; xs h-6 px-2 text-xs gap-1; lg h-10 px-2.5 S:173-203 visual
    Button primary hover primary/90 (0.9) hover:bg-primary/80 S:150 visual
    Button secondary hover secondary/80 color-mix(secondary, foreground 5%) (what our Lyra does) S:158 visual
    Button outline hover accent / accent-foreground (dark input/50) hover:bg-muted hover:text-foreground (dark input/50); light border border-border, dark border-input; aria-expanded:bg-muted S:154 visual
    Button ghost hover accent (dark accent/50) hover:bg-muted (dark muted/50) S:162 visual
    Button destructive Vega solid: bg-destructive text-white, dark destructive/60 Tinted: bg-destructive/10 text-destructive hover:bg-destructive/20, dark /20 and /30 (what our Lyra does) S:166 visual (large)
    Button radius radius_md (8) all sizes default rounded-md; xs/sm/icon-xs/icon-sm rounded-[min(var(--radius-md),8px/10px)] S:146, :174-194 none at default radius
    Toggle on = accent/accent-foreground; hover fill muted, text muted_foreground; px 8, gap 8 on = bg-muted (aria-pressed:bg-muted); hover only changes the text to foreground (no hover fill, except the outline variant's hover:bg-muted); px-2.5, gap-1; outline variant border-input hover:bg-muted shadow-xs; toggle-group item on bg-muted, px-2 in a spacing-0 group S:1343-1376 visual
    Input padding px-3 py-1 (12, 4) px-2.5 py-1 (10, 4), bg-transparent (light), dark:bg-input/30; no hover fill S:678 visual
    Input icon / addon icon gap 8, padding as the input addon pl-2/pr-2, gap-2, text-sm font-medium text-muted-foreground; group h-9; xs button h-6 rounded-[radius-5px] px-1.5 S:1398-1431 visual
    Select trigger padding from control (px-4); chevron 16 at 50 % opacity pl-2.5 pr-2 py-2 gap-1.5; chevron size-4 text-muted-foreground (full); sm h-8 S:1004-1017 visual
    Select content min width 128 (menu.min_width) min-w-36 (144); dropdown menu is min-w-32 (128), menubar min-w-36 S:1020, :538 visual
    Checkbox size 16, radius 4, glyph 14, shadow-xs same S:284, :292 none
    Radio checked fill = input fill, dot primary, shadow-xs checked bg-primary border-primary, dot bg-primary-foreground size-2, no shadow S:973, :985 visual
    Switch no shadow; sm = 0.75 scale shadow-xs; sm h-[14px] w-[24px] thumb size-3; default 18.4 x 32, thumb size-4 S:1251, :1259 visual (shadow only)
    Slider track fill input, 6 px bg-muted, h-1.5 S:1233 visual
    Slider thumb fill background bg-white in both themes, border-primary, shadow-sm, hover:ring-4 ring-ring/50, size-4 S:1241 visual (dark)
    Progress height 8; track primary/20 h-1.5 (6), track bg-muted, indicator bg-primary S:948-956 visual
    Dropdown menu border 1 px border; padding 4; item px-2 py-1.5 gap 8, rounded-sm; offset 4; min-w 128; shadow-md ring-1 ring-foreground/10 (no border), p-1, same item metrics, sideOffset=4, min-w-32, shadow-md; sub-content min-w-[96px] shadow-lg S:538, :546, :578; B dropdown-menu.tsx:36-44 none (ring vs border is visual)
    Menu heading colour popover_foreground, weight Medium text-muted-foreground px-2 py-1.5 text-xs font-medium S:562 visual
    Menu shortcut 12/16, tracking 1.2 text-xs tracking-widest (0.1 em = 1.2) S:570 none
    Tooltip foreground/background, rounded-md, 12 x 6, 12/16, max 320, arrow 10, offset 0, delay 700/300 same box; delayDuration = 0 (deliberately not matched, per the code comment); enter 100 ms fade+zoom-95+slide-2 S:1381-1389; B tooltip.tsx:8, :34-50 none (delay documented); motion duration visual
    Kbd 20 high, rounded-sm, px 4, 12/16 medium, tooltip variants /20 /10 same S:781 none
    Popover menu popup's border; w-72 p-4 (#411) w-72 p-4 gap-4 rounded-md text-sm shadow-md ring-1 ring-foreground/10 duration-100, sideOffset=4, align=center S:927; B popover.tsx:21-32 none (ring vs border visual)
    Hover card (#415) rounded-md, w-64 p-4, 4 pt, no arrow, 150 ms rounded-lg, w-64 p-4, shadow-md ring-1, sideOffset=4, align=center, 100 ms S:669; B hover-card.tsx:23-24 visual
    Dialog box (#411) Surface(background, foreground, border).rounded(radius), border 1 px; body p-6 gap-4; max width 448 in the example, note says max-w-lg; title "text-lg semibold" bg-popover text-popover-foreground, ring-1 ring-foreground/10 (no border), rounded-xl, p-6 gap-6, sm:max-w-md (448), title leading-none font-medium (not text-lg, not semibold), header/footer gap-2, description text-sm muted, duration-100 S:468-489 visual (note values wrong: gap, max width, title)
    Dialog scrim black/80 (204), "shadcn's overlays are bg-black/50" bg-black/10 with backdrop-blur-xs, duration-100 (dialog and alert dialog) S:464, :21 visual (the preset's comment is wrong)
    Sheet enter 500 ms / exit 300 ms ease-in-out transition duration-200 ease-in-out; shadow-lg; border on the inner edge; w-3/4 sm:max-w-sm; header gap-1.5 p-4, footer gap-2 p-4; overlay bg-black/10 + blur S:1081-1106 visual
    Motion (popover, menu, select, tooltip) 150 ms duration-100 (fade-in-0 + zoom-in-95 + slide-in-from-*-2) S:538, :927, :1020, :1381 visual
    Accordion / collapse 200 ms Easing::Out trigger rounded-md py-4 text-sm font-medium hover:underline, content text-sm, inner pb-4; keyframes are in the app's CSS (not in the snapshot) S:3-17 not verifiable (keyframes absent)
    Scroll area bar 10 px, thumb border, radius full, min thumb 18 bar w-2.5 with p-px and a 1 px transparent edge, so the thumb is about 7 px; radius full; min length is Radix's S:995-999; B scroll-area.tsx:40-48 visual (thumb thickness)
    Resizable handle 6 px hit area, hot band primary/15 and primary line w-px bg-border with a 4 px hit area (after:w-1); grip when asked: bg-border h-6 w-1 rounded-lg; focus ring-1 ring-ring; no hover colour B resizable.tsx:36-43; S:990 visual
    Table (#399) head h-10 px-2 medium, cells p-2, rule, hover muted/50, selected muted, footer muted/50 medium, 150 ms same S:1272-1312 none. Group rows and stripes (muted/50, muted/30, text-xs medium muted) are not shadcn: they are our extension, so there is nothing to compare against
    Skeleton (#378) pick: preset radius bg-muted rounded-md animate-pulse (rounded-md = radius_md) S:1224; B skeleton.tsx:7 visual if the pick is the full radius
    Inline code rounded radius_sm (6), px 4.8 py 3.2, 0.875 em docs example: rounded (4), px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold, bg-muted apps/v4/registry/new-york-v4/examples/typography-inline-code.tsx:3 visual (radius, weight)
    Button group / badge / alert / card not in the audit scope; no counterpart claim found n/a

    What I could not verify from the snapshot

    • --radius (10) and --radius-* multipliers: the global CSS (apps/v4/app/) is not in the sparse checkout.
    • typeset.css (the Markdown Typeset defaults): not in the snapshot.
    • Accordion open/close keyframes and the animate-* utilities' exact curves.
    • Behaviour of Select, Tabs and Toggle Group from the docs mdx was only sampled (hover-card delays, tooltip), not audited line by line.

    Pattern

    Where the Vega preset disagrees, it is mostly because it was written from an older Vega: padding and hover opacities of the previous new-york, and a solid destructive button. Our Lyra style already uses several values that the snapshot's Vega has (muted hover, tinted destructive, color-mix secondary hover). Decisions are the user's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    record

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions