Primitive / Atomstable
Icon Frame
Consistent framed surface for icon glyphs and short initials.
@glinui/uiComponent: icon-frame
Installation
Install from the package for shared ownership or from the registry for copy-paste control.
Package Manager
pnpm add @glinui/ui @glinui/tokensRegistry
pnpm dlx @glinui/cli@latest add icon-frameUsage
ABC
TSX
1import { IconFrame } from "@glinui/ui"23export function Demo() {4 return (5 <div className="flex items-center gap-2">6 <IconFrame size="sm">A</IconFrame>7 <IconFrame variant="glass">B</IconFrame>8 <IconFrame variant="outline" size="lg">C</IconFrame>9 </div>10 )11}
Accessibility
- Use `aria-hidden` when decorative.
- Add screen-reader text for meaningful icons.
ARIA Attributes
- `aria-hidden="true"` for decorative usage
Reduced Motion
Frame transitions are color-only and respect reduced-motion settings.
Affected properties
background-colorborder-colorAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | "default" | "glass" | "outline" | "ghost" | No | default | Surface treatment. |
size | "sm" | "md" | "lg" | No | md | Square frame size. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Generated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/icon-frame.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-02-19T17:59:28.468Z · Full index: /docs/api-metadata
Primary Props Type
IconFrameProps
IconFrameProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
size | "sm" | "md" | "lg" | No | "md" | Variant option from iconFrameVariants. |
variant | "default" | "glass" | "outline" | "ghost" | No | "default" | Variant option from iconFrameVariants. |