Next: (hygguile components card), Previous: (hygguile abstraction), Up: API
Create a standard HTML button element.
The inner content (text string or HTML fragments) of the button.
An optional HTML identifier string.
A symbol representing the HTML button type (e.g., 'button,
'submit).
A boolean indicating whether the button should be hidden.
A JavaScript handler string triggered on click events.
A boolean putting the button in its loading state: a spinner appears,
the control is disabled, and aria-busy says why.
The spoken label of the loading state. Defaults to "Loading".
List of symbols for background CSS classes.
List of symbols for hover background CSS classes.
List of symbols for border width CSS classes.
List of symbols for border color CSS classes.
List of symbols for container shadow CSS classes.
List of symbols for text color CSS classes.
List of symbols for text sizing CSS classes.
List of symbols for active state transformation CSS classes.
List of symbols for font family CSS classes.
List of symbols for font weight CSS classes.
List of symbols for border radius CSS classes.
List of utility formatting layout classes.
(button "Click Me" #:id "btn-primary" #:on-click "alert('Hello!')")
(button "Saving" #:loading #t)
A destructive action: the colour is a warning, and the label says what it does.
The button’s label or nodes.
A boolean putting the button in its loading state.
The spoken label of the loading state.
The HTML button type.
An optional identifier.
A JavaScript handler.
Extra layout classes.
(danger-button "Delete project")
Create a red-themed HTML form submission button meant for destructive actions.
The inner content (text string or HTML fragments) of the button.
(danger-submit-button "Delete Repository")
A quiet action that only shows its surface on hover or focus.
The button’s label or nodes.
A boolean putting the button in its loading state.
The spoken label of the loading state.
The HTML button type.
An optional identifier.
A JavaScript handler.
Extra layout classes.
(ghost-button "Skip for now")
Create a button containing both an icon and text.
An optional HTML identifier string.
A symbol identifying the type of icon to render.
The text string or components positioned next to the icon.
A boolean indicating whether the button should be hidden.
A JavaScript handler string triggered on click events.
A symbol representing the HTML button type.
List of symbols for background CSS classes.
List of symbols for hover background CSS classes.
List of symbols for border width CSS classes.
List of symbols for border color CSS classes.
List of symbols for shadow CSS classes.
List of symbols for text sizing CSS classes.
List of symbols for font family CSS classes.
List of symbols for font weight CSS classes.
List of symbols for text color CSS classes.
List of symbols for border radius CSS classes.
List of symbols for active state transformation CSS classes.
List of symbols targeting icon coloring and sizing classes.
List of utility layout CSS classes.
List of symbols applied to the inner layout wrapper surrounding the icon and content.
(icon-button #:icon 'download #:content "Fetch Data" #:on-click "downloadData()")
An icon button with no visible text, named for assistive technology.
The label is not decoration: an icon-only control has no accessible name
without it, so it is rendered as a visually hidden <span> and the
button carries aria-label as well.
The Phosphor icon name.
The accessible name.
An optional identifier.
The HTML button type.
A JavaScript handler.
A boolean putting the button in its loading state.
The spoken label of the loading state.
Background classes.
Hover background classes.
Text and icon colour classes.
Border colour classes.
Icon sizing and colour classes.
Extra layout classes.
(icon-only-button #:icon 'gear #:label "Settings")
Create a button pre-configured with a light font weight.
The inner content (text string or HTML fragments) of the button.
(light-button "Read More...")
Create a button pre-configured with a monospace font family.
The inner content (text string or HTML fragments) of the button.
(mono-button "git commit")
The one main action of a page or form.
The button’s label or nodes.
A boolean putting the button in its loading state.
The spoken label of the loading state.
The HTML button type.
An optional identifier.
A JavaScript handler.
Extra layout classes.
(primary-button "Create account")
A supporting action beside a primary one.
The button’s label or nodes.
A boolean putting the button in its loading state.
The spoken label of the loading state.
The HTML button type.
An optional identifier.
A JavaScript handler.
Extra layout classes.
(secondary-button "Cancel")
Create a green-themed standard HTML form submission button.
The fill is the dark end of the green ramp with near-white type on the light theme, and the light end with dark type on the dark theme, so the label clears WCAG AA (4.5:1) whichever theme is active.
The inner content (text string or HTML fragments) of the button.
(submit-button "Save Preferences")
Create a utility button pre-wired to toggle UI dark/light mode themes.
A symbol identifying the default icon type.
The description text displayed within the button layout.
A symbol representing the HTML button type.
List of symbols for background CSS classes.
List of symbols for hover background CSS classes.
List of symbols for border width CSS classes.
List of symbols for border color CSS classes.
List of symbols for shadow CSS classes.
List of symbols for text sizing CSS classes.
List of symbols for active state transformation CSS classes.
List of symbols for font family CSS classes.
List of symbols for font weight CSS classes.
List of symbols for text color CSS classes.
The global JavaScript function invocation string triggered to process the theme change.
List of symbols for border radius CSS classes.
List of symbols targeting icon coloring and sizing classes.
List of utility layout CSS classes.
List of symbols applied to the inner layout wrapper surrounding the icon and content.
(ui-mode-button #:content "Switch Theme")
Next: (hygguile components card), Previous: (hygguile abstraction), Up: API