Askr documentation
Generated API snapshot

@askrjs/themes/button-group

Exports from the declarations published in @askrjs/themes. Signatures reflect the published artifact.

Exports

This entrypoint publishes 3 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

ButtonGrouptype

ButtonGroup: (props: ButtonGroupProps) => JSX.Element

Groups related buttons together, optionally visually attached, with a horizontal or vertical orientation and role="group" by default. Attached groups without an explicit orientation stack at phone width unless they contain icon buttons; pass orientation="horizontal" to keep the row.

ButtonGroupOrientationtype

ButtonGroupOrientation: "horizontal" | "vertical"

Layout direction of a {@link ButtonGroup }. When omitted, an attached group is a row that stacks at phone width unless it contains icon buttons. An explicit value keeps that direction unless the caller also passes data-responsive="true", which opts back into phone stacking.

ButtonGroupPropstype

ButtonGroupProps: DivProps & {
  children?: unknown;
  attached?: boolean;
  orientation?: ButtonGroupOrientation;
  /** Stack at phone width. Defaults to `"true"` for attached groups without an `orientation`. */
  "data-responsive"?: "true" | "false";
  ref?: Ref<HTMLDivElement>;
}

Props for the {@link ButtonGroup } component.

attached
attached?: boolean | undefined;
children
children?: unknown;
data-responsive
Stack at phone width. Defaults to `"true"` for attached groups without an `orientation`.
orientation
orientation?: ButtonGroupOrientation | undefined;
ref
ref?: Ref<HTMLDivElement>;