Handoff: Button, variant='agentic'
Rewritten 2026-11-20 against v2.0.0-beta.21 to the lessons template. The proposal folder is still AgenticButton and the story title is still "Agentic Button"; the code is now an addition to Button, not a separate component.
What and why
A button for an action the agent does: the secondary Button look with the AI gradient as its border and the gradient working spinner. It is variant='agentic' on the existing Button, plus an isAnimated prop (shimmer). The designer approved folding it into Button on 2026-11-20, reversing the 2026-10-21 "separate component" decision (see decisions.md). There is one look, the secondary treatment, not a primary one.
- Figma / Jira: none. Source: the designer's agentic button design. The Figma page of this proposal still shows the old separate component.
- Context:
context.md
Exploration and decisions
- Extension, not a fork (2026-11-20).
Buttongets theagenticvalue. Markup, sizes, states and theisLoading/isWorkinglogic are the Button's own. The old 289-line copy (AgenticButton.tsx) is deleted. - Border technique.
--pds-gradient-ai-activeis a gradient, so it cannot go inborder-color. The border is transparent, the gradient paints the border-box, and the secondary fill sits on the padding-box over an opaque--pds-color-surface-defaultlayer so the translucent secondary fill does not show the gradient through. - Working spinner.
isWorkingwith the agentic variant renders the Spinner withcolor='agentic'(the gradient).isLoadingclears the gradient (background-image: none) so the pulse shows cleanly. isAnimatedshimmers the border (the animated agentic Panel's loop; off for reduced motion). Opt-in,falseby default; only applies to the agentic variant. The stories turn it on.isSplitButtondropped from the agentic code path (nothing used it).Buttonkeeps its ownisSplitButtonas in the package.
Full list: decisions.md.
API
All other Button props are unchanged. Additions:
| Prop | Type | Default | Purpose |
|---|---|---|---|
variant |
adds 'agentic' |
'primary' |
The secondary look plus the AI gradient border. tally and statusDot are allowed on it. |
isAnimated |
boolean |
false |
Shimmers the gradient border. Only applies to variant='agentic'. Off for reduced motion. |
Variants and states: all four sizes; default, disabled, loading, working (with disableWhenWorking), with icon, tally and status dot. Stories (all render <Button variant='agentic'>): Default, With Icon, With Tally, With Status Dot, Loading State, Working State, Working State Interactive, All States, All Sizes. The other variants and their stories are untouched.
Tokens used
From the CSS as it is now (agentic-button.css):
--pds-animation-duration-ai-shimmer--pds-color-surface-default--pds-gradient-ai-active
The rest is the Button's own.
Impact
From impact.md: no existing variant is changed; everything is scoped to .pds-button--agentic. Other proposals that use it: MenuButton (variant='agentic' trigger), SplitButton (separate handoff; its halves are plain secondary buttons), the Panel Approval Report (<Button variant='agentic'>), and through them LabeledDivider.
Reused vs net-new
- Reused: the whole
Button;Icon,Tally,Tooltip; the Spinner proposal'sagenticcolor. - Net-new: the
agenticvalue ofvariant, theisAnimatedprop,.pds-button--agentic,.pds-button--animated. Seecustom.md(no raw values).
Accessibility
- Unchanged from the Button: a native
button, visible focus ring,ariaLabel, loading and working states. - The gradient border is decorative; the label carries the meaning (the spinner wrapper is
aria-hidden, so the screen says what is working). See the Accessibility section ofAgenticButton.mdx. - Not checked: no a11y panel run, no contrast measurement and no look at light or dark in this rewrite.
Decisions and open questions
Each has a recommendation.
- Should there be a filled (primary) agentic button? Recommendation: not now; no screen needs it.
- Name of the value. Recommendation:
agentic, like Panel'sagentic-*values and SectionMessage'stype='agentic'.
Extension or new component
An addition to Button: a new variant value and one new flag. The human variants and their stories are untouched, except that the one base-CSS rule .pds-button--loading.pds-pulse { background-image: none } that this proposal used to need in button.css now lives in agentic-button.css, scoped to the agentic class (so button.css is the package's again on that point).
Footprint
Nothing draws outside the button's box: the gradient is on the border-box, inside the same width and height as the secondary Button. A parent cannot clip anything. With isAnimated, the gradient layer is twice the button's width inside the background and slides; it does not paint outside the box.
Dark mode and per-size values
No per-theme override in agentic-button.css. The fill and surface tokens are theme-aware; --pds-gradient-ai-active is defined once (in the light token file only), so the gradient is the same in both themes. Not checked by eye in either theme.
| Size | Icon | Working spinner | Tally size |
|---|---|---|---|
xs |
xs |
s |
xs |
s |
m |
m |
xs |
m |
m |
m |
s |
l |
xl |
l |
m |
These are the Button's existing switch cases; agentic adds none. Heights are the Button's.
Expect to change
- A
variantvalue instead of a separate component (L1). Recommendation: this is already the recommended shape. isAnimatedas a flag onButtonthat only does something on one variant (L2, L11). Recommendation: keep it defaultfalse; if the toolkit prefers, make shimmer part ofagenticalways, or name it as Panel'sisAnimated. Panel already shipsisAnimated(default off).Spinnercolor='agentic'is a magic string on a prop typedstringin the package. Recommendation: land the Spinner proposal'sagenticvalue first, or haveButtonpass an agentic class instead.tallyandstatusDotallowed onagentic. Recommendation: keep, as onsecondary.- Proposal story title says "Agentic Button"; once ported the stories belong under Button.
Target-version check
Checked against .pds-reference/src at v2.0.0-beta.21 (2026-11-20):
| Item | In the package at beta.21? |
|---|---|
variant='agentic' on Button |
no (ButtonVariant has ten values, none agentic) |
isAnimated on Button |
no |
pds-button__leading span and CSS |
yes (Button.tsx leading slot; button.css lines 47 and 59). The earlier note to add it was wrong and is removed |
Spinner color='agentic' |
no (color?: string); comes from the Spinner proposal |
--pds-gradient-ai-active, --pds-animation-duration-ai-shimmer |
yes (design tokens) |
Port notes
- Edit
src/components/buttons/Button: add'agentic'toButtonVariant(src/libs/types/custom-types.tsx) and to thetallyandstatusDotallow-lists, addisAnimated, the classespds-button--secondary pds-button--agentic(andpds-button--animated), the Spinnercolor, and the CSS block fromagentic-button.css. No generator. - Port the Spinner proposal (
color='agentic') first. - The local
_base/Buttonis only a stand-in copy of the package Button (withutils.tsxstand-ins); do not port it. Its CSS imports../../AgenticButton/agentic-button.css; in the port the block goes intobutton.css.
Preview
npm run storybook, then Component Proposals/Buttons/Agentic Button.
Figma: https://www.figma.com/design/AMGWJbraJoi2PKWnxo29Ah/PDS-Proposals?node-id=436-1232