← All proposals

Icon: agentic icons

Add the new sharp, solid sparkles glyph to the Icon set alongside zappy.

Extends a PDS componentOpen in Storybook

proposals/Icon/Icon.mdx38 lines · View on GitHub
import { Canvas, Controls, Meta, Title } from '@storybook/addon-docs/blocks';

import * as IconStories from './Icon.stories';

<Meta of={IconStories} name='Usage' />

<Title />

## Purpose

The PDS Icon set with two additions: `microphoneLines` (voice button) and `stop` (stop a running response). `zappy` (PDS agents) and `sparklesSolid` (other, third-party agents) are already in the package.

## Usage

Use an icon to support a label or to stand in for one where the meaning is well known.

- Use `zappy` for Pantheon agents and `sparklesSolid` for other (third-party) agents.
- Use `microphoneLines` for a voice input button and `stop` for a control that stops a running response.
- The existing `sparkles` icon (regular style) is unchanged.

## Accessibility

- Icons render `aria-hidden='true'` and `focusable='false'`, so they are not announced. They are decorative.
- An icon that stands in for a label needs a name from its parent, for example the `aria-label` of the button that holds it ("Stop response", "Start voice input").
- Icons use `currentColor`, so they follow the text color in light and dark. Do not rely on the icon shape or color alone to convey state.
- Icons are not focusable and take no keyboard input.

## Implementation

See the table below for the available props. The other stories show every variant and state.

- `iconName` — Which icon to render. Every published PDS icon (`zappy` for PDS agents, `sparklesSolid` for other agents) plus two not yet in the package: `microphoneLines` (voice button) and `stop` (a filled square).

<hr />

<Canvas of={IconStories.Default} />
<Controls of={IconStories.Default} />