Seed Bible extension API (v1.18.0) / seed-bible/components / IconButtonProps
Type Alias: IconButtonProps
type IconButtonProps = Omit<
JSX.ButtonHTMLAttributes<HTMLButtonElement>,
| "size"
| "children"
| "aria-label"
| "aria-pressed"
| "title"
| "type"
| "class"
| "className"
> & {
buttonRef?: Ref<HTMLButtonElement>;
class?: string;
className?: string;
icon: string | ComponentChild;
label: string;
look?: IconButtonLook;
pressed?: boolean;
size?: IconButtonSize;
type?: "button" | "submit";
};Type Declaration
buttonRef?
buttonRef?: Ref<HTMLButtonElement>;The <button> element, for code that has to focus or measure it (a menu returning focus to the button that opened it).
class?
class?: string;className?
className?: string;Extra classes, for placement. class and className both work.
icon
icon: string | ComponentChild;A Material Symbols name such as "bookmark", or an icon element (an SVG).
label
label: string;What the button does, for screen readers and the tooltip. Required, since the icon alone says nothing to a screen reader.
look?
look?: IconButtonLook;plain has no background until hovered; tinted sits on a soft circle, for a button floating over content.
pressed?
pressed?: boolean;For an on/off button (bookmark, mute): tells screen readers whether it's on, and draws it in the primary color while it is.
size?
size?: IconButtonSize;sm (28px) for toasts and small floating panels, md (32px) for pane headers and toolbars, lg (40px) for phone screen headers.
type?
type?: "button" | "submit";submit for a form's send button.