# ToggleButtonBaseProps (@salmonui/buttons/button)

> The ToggleButtonBaseProps interface of @salmonui/buttons/button.

Canonical: https://salmonui.dev/docs/reference/buttons/button/ToggleButtonBaseProps

```ts
import type { ToggleButtonBaseProps } from '@salmonui/buttons/button';
```

Entry index: https://salmonui.dev/docs/reference/buttons/button (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/buttons/button.md).

## Reference

Kind: interface

```ts
interface ToggleButtonBaseProps extends Omit<ButtonBaseProps, 'value' | 'name'> {
    pressed?: boolean | undefined;
    defaultPressed?: boolean | undefined;
    onPressedChange?: ((pressed: boolean, event: ToggleChangeEvent) => void) | undefined;
    value?: string | undefined;
    name?: string | undefined;
}
```

Members (23):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `pressed` | `pressed?: boolean \| undefined;` | optional | Controlled pressed state. Ignored inside a `ToggleButtonGroup`. |
| `defaultPressed` | `defaultPressed?: boolean \| undefined;` | optional | Initial pressed state when uncontrolled; restored on form reset. Default `false`. |
| `onPressedChange` | `onPressedChange?: ((pressed: boolean, event: ToggleChangeEvent) => void) \| undefined;` | optional | Proposed pressed state; called for controlled and uncontrolled buttons. |
| `value` | `value?: string \| undefined;` | optional | The item's value inside a `ToggleButtonGroup` (required there), and the submitted value of a standalone button with `name` (default `"on"`). |
| `name` | `name?: string \| undefined;` | optional | Standalone form field name: a hidden input carries `value` while pressed. |
| `children` | `children?: ReactNode;` | optional, inherited |  |
| `variant` | `variant?: ButtonVariant;` | optional, inherited | Visual weight. Default `'solid'` (or the group's). |
| `tone` | `tone?: ButtonTone;` | optional, inherited | Color role. Default `'neutral'`; `'primary'` for a `floating` button (or the group's). |
| `size` | `size?: ButtonSize;` | optional, inherited | Metric set. Default `'md'` (or the group's). |
| `iconStart` | `iconStart?: ReactNode;` | optional, inherited | Decorative icon before the label (inline-start; follows `dir`). |
| `iconEnd` | `iconEnd?: ReactNode;` | optional, inherited | Decorative icon after the label (inline-end; follows `dir`). |
| `iconOnly` | `iconOnly?: boolean;` | optional, inherited | Square metrics for a button that shows only an icon; requires `aria-label` or `aria-labelledby`. |
| `loading` | `loading?: boolean;` | optional, inherited | Shows a spinner, sets `aria-busy` and `aria-disabled` (focus is kept) and ignores activation. |
| `loadingLabel` | `loadingLabel?: string;` | optional, inherited | Visually hidden text appended to the name while `loading`. Default `"Loading"`. |
| `spinner` | `spinner?: ReactNode;` | optional, inherited | Replaces the built-in spinner graphic. |
| `progress` | `progress?: number;` | optional, inherited | Progress fill from inline-start, 0 to 100. No spinner unless `loading`. |
| `progressLabel` | `progressLabel?: ((value: number) => string);` | optional, inherited | Visually hidden progress text appended to the name. Default `` `${value}%` ``. |
| `floating` | `floating?: boolean \| ButtonFloatingPosition;` | optional, inherited | Floating action button: circular, elevated, positioned by CSS. |
| `floatingScope` | `floatingScope?: "parent" \| "viewport";` | optional, inherited | `'viewport'` (default, `position: fixed`) or `'parent'` (`position: absolute` in the nearest positioned ancestor). |
| `repeat` | `repeat?: boolean \| ButtonRepeatOptions;` | optional, inherited | Press-and-hold repeat. |
| `onRepeat` | `onRepeat?: ((event: ButtonRepeatEvent) => void);` | optional, inherited | Each repeat while held; the first activation is the native `onClick`. |
| `render` | `render?: ((props: ButtonRenderProps) => ReactElement<unknown, string \| JSXElementConstructor<any>>);` | optional, inherited | Renders another element (a link, a router link) with the computed props. |
| `ref` | `ref?: Ref<HTMLButtonElement>;` | optional, inherited | The `<button>` (or the element `render` returns). |
