@hautechai/webui.textbutton
v2.2.0
Published
Text-only button component optimized for minimal visual presence with hierarchy and icon support.
Downloads
158
Readme
TextButton
Purpose
Text-only button component optimized for minimal visual presence with hierarchy and icon support.
Installation
# pnpm (recommended)
pnpm add @hautechai/webui.textbutton
# npm
npm install @hautechai/webui.textbutton
# yarn
yarn add @hautechai/webui.textbuttonParameters
| Parameter | Type | Description | | ------------ | ------------------------------------------------ | ------------------------------------------------------------------------------- | | hierarchy | 'primary' | 'secondary' | Optional visual hierarchy affecting color and emphasis (defaults to 'primary') | | size | 'medium' | 'small' | 'xsmall' | Optional size variant controlling typography and spacing (defaults to 'medium') | | label | string | Required text content displayed on the button | | leadingIcon | React.ReactNode | Optional icon displayed before the label text | | trailingIcon | React.ReactNode | Optional icon displayed after the label text | | disabled | boolean | When true, disables button interaction and applies disabled styling | | onClick | (e: React.MouseEvent) => void | Optional click event handler function |
Usage Example
<TextButton
hierarchy="primary"
size="medium"
label="Learn More"
trailingIcon={<ArrowIcon />}
onClick={handleLearnMore}
/>