API reference
@salmonui/buttons/button
23 exported symbols: 4 functions, 8 interfaces and 11 types. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/buttons/button';Functions
ButtonButton (APG Button, native <button>). type defaults to "button". Styling hooks: .salmon-button with data-variant, data-tone, data-size, data-icon-only, data-lo…ButtonGroupA visual group of buttons: role="group", named by aria-label or aria-labelledby. It adds no keyboard model: every button stays a tab stop. .salmon-button-group…ToggleButtonToggle button (APG Button, toggle variant): aria-pressed, data-pressed. Inside a ToggleButtonGroup it is an item of that group: a radio (role="radio", aria-che…ToggleButtonGroupA selection group of ToggleButtons with one tab stop (roving tabindex; arrow keys, Home / End, mirrored in RTL). .salmon-toggle-button-group with data-selectio…
Interfaces
ButtonBasePropsButtonGroupPropsButtonRepeatEventEvent of onRepeat: count starts at 1 for each hold.ButtonRepeatOptionsrepeat option of Button.ToggleButtonBasePropsToggleButtonGroupBasePropsToggleButtonGroupMultiplePropsToggleButtonGroupSingleProps
Types
ButtonAccessibleNameAn icon-only button needs an accessible name.ButtonChangeSourceWhere a change came from.ButtonFloatingPositionWhere a floating button sits; logical, mirrored in RTL. true means 'bottomEnd'.ButtonPropsButtonRenderPropsProps render receives: class names, data-* hooks, ARIA attributes, handlers, ref and children. Spread all of them onto the returned element. ref is typed to sp…ButtonSizeOne of three fixed metric sets; not a density token.ButtonToneColor role of a button.ButtonVariantVisual weight; chip is the compact pill of choice and filter chips.ToggleButtonGroupPropsToggleButtonPropsToggleChangeEventEvent of onPressedChange and onValueChange: reason is 'toggle' or 'reset' (form reset).