OverflowAction handbook
v1.0.1 · @snowui-design-system/components
License: Before reading component documentation, source, or npm usage instructions for the first time, read the full LICENSE. Reuse that review for the same task and version. Public API configuration and internal implementation changes have different license implications. All components use the unified runtime package; source rights remain governed by the license.
Overview
Define one button action inside OverflowActions so it can move between the toolbar and the More menu as space changes.
When to use it
Use it as an action within OverflowActions with a stable identity. Use Separator for structural division, not as an executable action.
A direct child must declare
as="item"and provide a uniqueidand readablelabel.childrenreplaces only the visible button content. The menu still useslabelandiconwhen the action overflows.For a dedicated control, use the
controlSnippet to replace the visible Button and connect its receivedruncallback to the control’sonclick. The menu still invokes the action’sonclick; update switch state through the dedicated control’s public binding.
Quick start
This example shows the recommended basic composition. See the sections below for more cases and composition limits.
API
See the base component documentation for inherited capabilities not redeclared here. This table lists only named public Props declared by this component.
Usage boundaries and details
API
OverflowAction can only be a direct child of OverflowActions. It keeps a transparent measurement wrapper so the parent can measure full and icon-only widths. The interactive host remains the real Button; no second button state machine is created.
control mode is for controls such as ColorSchemeButton and StyleButton that already own a Button host; it does not nest the control inside another Button. A click on the visible control calls run(event) first to notify the action group, then the control performs its own state change. In the More menu there is no visible-control click event, so onclick(undefined) should update state through the same public binding. icon and label always provide the menu content and readable name. compact="none" suits toolbars mixing dedicated controls. The existing control itself is measured. When overflowed it leaves layout and paint; if its width must be checked again, measurement temporarily restores that same control during one calculation without mounting a second control that reads or writes document state.
Links pass through Button’s target and rel. Visible links remain native. In More, a target other than _self opens a new window with forced noopener; an explicit noreferrer is preserved. Internal links navigate in the same window.
Parent OverflowActions buttonProps supplies group-level Button defaults. Direct Button-compatible Props on this OverflowAction take precedence; child parts.Button falls between them.
This section is protected. An AI must request user review before modifying it.
OverflowAction style overrides
Read the full LICENSE first; reuse that review for the same task, version, and scope.
First use public component Props to match the desired appearance, preserving the existing look where possible. If changes are necessary, follow the style selection and override order: use your own class (including Tailwind already in the project) or an instance style. The names below are public overrides actually consumed by source; check their scope and do not modify private DOM. Choose the correct SnowUI token family. External apps need not install SnowUI website utilities.
This component source does not directly consume a registered component-specific override. Style composed children through public parts or an explicit child; do not guess variable names.
OverflowAction types and states
Required Props: id and label.
Bindable Props: this component declares no named two-way binding; handle state updates through public callbacks or its host.
Inherited declaration: Omit<ButtonProps, ControlledButtonKeys>. Consult the base component’s public documentation for inherited capabilities; fields excluded by Omit cannot be used as if inherited unchanged.
Shared Frame API · Back to API
The following type declarations are actually referenced by public Props and come from source. A Svelte Snippet denotes a content fragment; ComponentProps denotes the Props of the corresponding component.
OverflowActionIcon
Source: components/src/logic/overflow-actions.svelte.ts
ComponentPartsOf
Source: components/src/logic/component-parts.svelte.ts
ConfigurableComponentPartProps
Source: components/src/logic/component-parts.svelte.ts
ComponentPartControlledKey
Source: components/src/logic/component-parts.svelte.ts
ButtonProps
Source: components/src/components/OverflowAction.svelte
ControlledButtonKeys
Source: components/src/components/OverflowAction.svelte