# Item Arrange media, a title, descriptive text and actions in a single row. [Interactive guide](/docs/components/item) · Forge 3.2.0 Use the API for your installed version. Run `npx --no-install wss3-forge api --json` inside the project. ## Implementation guidance ### When to use it Use Item for one navigable document, person, resource or other record with a compact summary. ### How to compose it Put text in ItemContent and neighboring controls in ItemActions. Use ItemGroup for related rows. ### What to verify Verify list semantics, long labels and a tab order that keeps independent actions outside the row link. ## Usage ```tsx import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from 'wss3-forge' ``` - Use an item for a document, person or destination. Use a Field to label an input and associate validation messages. - Pass title, description, media and actions for the compact Forge API, or compose the named parts as children. Header and footer occupy their own rows. - Use ItemGroup for related entries and give its children list-item semantics. Use one link for a clickable row and keep other interactive controls outside that link. ```tsx Release notesUpdated yesterday ``` ## Runnable examples ### Document and team ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, useState, type ComponentType } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) function Lead({ rtl = false }: { rtl?: boolean }) { const { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, RowLink, ItemMedia } = useContext(ItemLibrary) const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } ``` ### Variant ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, type ComponentType } from 'react' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) function Appearance({ sizes = false }: { sizes?: boolean }) { const { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } = useContext(ItemLibrary) return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` ### Size ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, type ComponentType } from 'react' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) function Appearance({ sizes = false }: { sizes?: boolean }) { const { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } = useContext(ItemLibrary) return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` ### Icon ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, useState, type ComponentType } from 'react' import { Shield20Regular } from '@fluentui/react-icons' import { Button } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) function SecurityNotice() { const { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } = useContext(ItemLibrary) const [reviewed, setReviewed] = useState(false) return {reviewed ? 'Sign-in reviewed' : 'Security alert'}New sign-in from an unfamiliar device. } export default function Example() { return () } ``` ### Avatar ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, useState, type ComponentType } from 'react' import { PersonAdd16Regular } from '@fluentui/react-icons' import { Avatar, AvatarGroup, Button, VStack } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function Invite() { const { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } = useContext(ItemLibrary) const [invited, setInvited] = useState(false) return Lena RiveraWorkspace editor {invited ? 'Invitation prepared' : 'Project team'} {invited ? 'A draft invitation is ready for the team.' : 'Prepare an invitation for a new contributor.'} } export default function Example() { return () } ``` ### Image ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, type ComponentType } from 'react' import { ChevronRight16Regular } from '@fluentui/react-icons' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function Gallery() { const { ItemGroup, RowLink, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } = useContext(ItemLibrary) return {projects.map(project =>
{project.name}{project.description}
)}
} export default function Example() { return () } ``` ### Group ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, Fragment, useContext, useState, type ComponentType } from 'react' import { Avatar, Button } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function PersonRow({ person }: { person: typeof people[number] }) { const { ItemMedia, ItemContent, ItemTitle, ItemDescription } = useContext(ItemLibrary) return <> {person.name}{person.email} } function People() { const { ItemGroup, ItemSeparator, Item, ItemActions } = useContext(ItemLibrary) const [selected, setSelected] = useState('') return {people.map((person, i) => {i > 0 && } )} } export default function Example() { return () } ``` ### Header ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, type ComponentType } from 'react' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function CoverGrid() { const { ItemGroup, Item, ItemHeader, ItemContent, ItemTitle, ItemDescription } = useContext(ItemLibrary) return {projects.map(project => {project.name}{project.description} )} } export default function Example() { return () } ``` ### Link ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, type ComponentType } from 'react' import { ChevronRight16Regular, Open16Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) function LinkRows() { const { RowLink, ItemContent, ItemTitle, ItemDescription } = useContext(ItemLibrary) return Install ForgeSet up a new project. Reference guideOpens in a new tab. } export default function Example() { return () } ``` ### Dropdown ```tsx import { useState } from 'react' import { Avatar, Button, DropdownMenu } from 'wss3-forge' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function TeamMenu() { const [selected, setSelected] = useState('') return {selected || 'Select'}} items={people.map(person => ({ id: person.email, label: person.name, icon: , onClick: () => setSelected(person.name) }))} /> } export default function Example() { return () } ``` ### RTL ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, useState, type ComponentType } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) function Lead({ rtl = false }: { rtl?: boolean }) { const { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, RowLink, ItemMedia } = useContext(ItemLibrary) const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } ``` ### Footer ```tsx import * as DefaultParts from 'wss3-forge' import { createContext, useContext, type ComponentType } from 'react' import { Badge, Text } from 'wss3-forge' type ItemParts = Pick type RowLinkProps = { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode } const ItemLibrary = createContext }>({ ...DefaultParts, RowLink: ({ href, target, rel, children }) => {children} }) function ReviewSummary() { const { Item, ItemContent, ItemTitle, ItemFooter } = useContext(ItemLibrary) return Review summary ApprovedYesterday } export default function Example() { return () } ``` ### Compact Forge API ```tsx import { Document20Regular } from '@fluentui/react-icons' import { Item as CompactItem } from 'wss3-forge' export default function Example() { return (} variant="outlined" />) } ``` ## Primitive libraries ### Base UI Pass an anchor to render to make the row a native link. The separator uses Base UI Separator. ```sh npm install wss3-forge @base-ui/react ``` ```tsx import { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemMedia } from 'wss3-forge/base-ui' import { useState } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' function Lead({ rtl = false }: { rtl?: boolean }) { const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return }>{children} } ``` #### Variant ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/base-ui' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function Appearance({ sizes = false }: { sizes?: boolean }) { return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` #### Size ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/base-ui' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function Appearance({ sizes = false }: { sizes?: boolean }) { return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` #### Icon ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } from 'wss3-forge/base-ui' import { useState } from 'react' import { Shield20Regular } from '@fluentui/react-icons' import { Button } from 'wss3-forge' function SecurityNotice() { const [reviewed, setReviewed] = useState(false) return {reviewed ? 'Sign-in reviewed' : 'Security alert'}New sign-in from an unfamiliar device. } export default function Example() { return () } ``` #### Avatar ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } from 'wss3-forge/base-ui' import { useState } from 'react' import { PersonAdd16Regular } from '@fluentui/react-icons' import { Avatar, AvatarGroup, Button, VStack } from 'wss3-forge' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function Invite() { const [invited, setInvited] = useState(false) return Lena RiveraWorkspace editor {invited ? 'Invitation prepared' : 'Project team'} {invited ? 'A draft invitation is ready for the team.' : 'Prepare an invitation for a new contributor.'} } export default function Example() { return () } ``` #### Image ```tsx import { ItemGroup, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, Item } from 'wss3-forge/base-ui' import { ChevronRight16Regular } from '@fluentui/react-icons' const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function Gallery() { return {projects.map(project =>
{project.name}{project.description}
)}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return }>{children} } ``` #### Group ```tsx import { ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemGroup, ItemSeparator, Item, ItemActions } from 'wss3-forge/base-ui' import { Fragment, useState } from 'react' import { Avatar, Button } from 'wss3-forge' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function PersonRow({ person }: { person: typeof people[number] }) { return <> {person.name}{person.email} } function People() { const [selected, setSelected] = useState('') return {people.map((person, i) => {i > 0 && } )} } export default function Example() { return () } ``` #### Header ```tsx import { ItemGroup, Item, ItemHeader, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/base-ui' const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function CoverGrid() { return {projects.map(project => {project.name}{project.description} )} } export default function Example() { return () } ``` #### Link ```tsx import { ItemContent, ItemTitle, ItemDescription, Item } from 'wss3-forge/base-ui' import { ChevronRight16Regular, Open16Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function LinkRows() { return Install ForgeSet up a new project. Reference guideOpens in a new tab. } export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return }>{children} } ``` #### RTL ```tsx import { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemMedia } from 'wss3-forge/base-ui' import { useState } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' function Lead({ rtl = false }: { rtl?: boolean }) { const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return }>{children} } ``` #### Footer ```tsx import { Item, ItemContent, ItemTitle, ItemFooter } from 'wss3-forge/base-ui' import { Badge, Text } from 'wss3-forge' function ReviewSummary() { return Review summary ApprovedYesterday } export default function Example() { return () } ``` #### Dropdown ```tsx import { useState } from 'react' import { ChevronDown16Regular } from '@fluentui/react-icons' import { Avatar } from 'wss3-forge' import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Item, ItemContent, ItemDescription, ItemMedia, ItemTitle } from 'wss3-forge/base-ui' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] export default function ProjectTeamMenu() { const [selected, setSelected] = useState('') return }>{selected || 'Select'} {people.map(person => setSelected(person.name)}> {person.name}{person.email} )} } ``` ### Radix Use asChild with an anchor element for a linked row. The separator uses Radix Separator. ```sh npm install wss3-forge radix-ui ``` ```tsx import { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemMedia } from 'wss3-forge/radix' import { useState } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' function Lead({ rtl = false }: { rtl?: boolean }) { const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### Variant ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/radix' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function Appearance({ sizes = false }: { sizes?: boolean }) { return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` #### Size ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/radix' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function Appearance({ sizes = false }: { sizes?: boolean }) { return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` #### Icon ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } from 'wss3-forge/radix' import { useState } from 'react' import { Shield20Regular } from '@fluentui/react-icons' import { Button } from 'wss3-forge' function SecurityNotice() { const [reviewed, setReviewed] = useState(false) return {reviewed ? 'Sign-in reviewed' : 'Security alert'}New sign-in from an unfamiliar device. } export default function Example() { return () } ``` #### Avatar ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } from 'wss3-forge/radix' import { useState } from 'react' import { PersonAdd16Regular } from '@fluentui/react-icons' import { Avatar, AvatarGroup, Button, VStack } from 'wss3-forge' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function Invite() { const [invited, setInvited] = useState(false) return Lena RiveraWorkspace editor {invited ? 'Invitation prepared' : 'Project team'} {invited ? 'A draft invitation is ready for the team.' : 'Prepare an invitation for a new contributor.'} } export default function Example() { return () } ``` #### Image ```tsx import { ItemGroup, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, Item } from 'wss3-forge/radix' import { ChevronRight16Regular } from '@fluentui/react-icons' const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function Gallery() { return {projects.map(project =>
{project.name}{project.description}
)}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### Group ```tsx import { ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemGroup, ItemSeparator, Item, ItemActions } from 'wss3-forge/radix' import { Fragment, useState } from 'react' import { Avatar, Button } from 'wss3-forge' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function PersonRow({ person }: { person: typeof people[number] }) { return <> {person.name}{person.email} } function People() { const [selected, setSelected] = useState('') return {people.map((person, i) => {i > 0 && } )} } export default function Example() { return () } ``` #### Header ```tsx import { ItemGroup, Item, ItemHeader, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/radix' const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function CoverGrid() { return {projects.map(project => {project.name}{project.description} )} } export default function Example() { return () } ``` #### Link ```tsx import { ItemContent, ItemTitle, ItemDescription, Item } from 'wss3-forge/radix' import { ChevronRight16Regular, Open16Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function LinkRows() { return Install ForgeSet up a new project. Reference guideOpens in a new tab. } export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### RTL ```tsx import { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemMedia } from 'wss3-forge/radix' import { useState } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' function Lead({ rtl = false }: { rtl?: boolean }) { const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### Footer ```tsx import { Item, ItemContent, ItemTitle, ItemFooter } from 'wss3-forge/radix' import { Badge, Text } from 'wss3-forge' function ReviewSummary() { return Review summary ApprovedYesterday } export default function Example() { return () } ``` #### Dropdown ```tsx import { useState } from 'react' import { ChevronDown16Regular } from '@fluentui/react-icons' import { Avatar } from 'wss3-forge' import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Item, ItemContent, ItemDescription, ItemMedia, ItemTitle } from 'wss3-forge/radix' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] export default function ProjectTeamMenu() { const [selected, setSelected] = useState('') return {people.map(person => setSelected(person.name)}> {person.name}{person.email} )} } ``` ### React Aria An href creates a React Aria Link. Static rows render a div. ```sh npm install wss3-forge react-aria-components ``` ```tsx import { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemMedia } from 'wss3-forge/react-aria' import { useState } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' function Lead({ rtl = false }: { rtl?: boolean }) { const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### Variant ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/react-aria' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function Appearance({ sizes = false }: { sizes?: boolean }) { return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` #### Size ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/react-aria' import { Document20Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function Appearance({ sizes = false }: { sizes?: boolean }) { return {sizes ? (['default','sm','xs'] as const).map(size => {size === 'default' ? 'Default size' : size === 'sm' ? 'Small size' : 'Extra small size'} Document details) : (['default','outline','muted'] as const).map(variant => {variant === 'default' ? 'Default variant' : variant === 'outline' ? 'Outline variant' : 'Muted variant'} {variant === 'default' ? 'A plain display row.' : variant === 'outline' ? 'A bordered row for a distinct action.' : 'A quieter surface for secondary content.'} )} } export default function Example() { return () } ``` #### Icon ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } from 'wss3-forge/react-aria' import { useState } from 'react' import { Shield20Regular } from '@fluentui/react-icons' import { Button } from 'wss3-forge' function SecurityNotice() { const [reviewed, setReviewed] = useState(false) return {reviewed ? 'Sign-in reviewed' : 'Security alert'}New sign-in from an unfamiliar device. } export default function Example() { return () } ``` #### Avatar ```tsx import { Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions } from 'wss3-forge/react-aria' import { useState } from 'react' import { PersonAdd16Regular } from '@fluentui/react-icons' import { Avatar, AvatarGroup, Button, VStack } from 'wss3-forge' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function Invite() { const [invited, setInvited] = useState(false) return Lena RiveraWorkspace editor {invited ? 'Invitation prepared' : 'Project team'} {invited ? 'A draft invitation is ready for the team.' : 'Prepare an invitation for a new contributor.'} } export default function Example() { return () } ``` #### Image ```tsx import { ItemGroup, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, Item } from 'wss3-forge/react-aria' import { ChevronRight16Regular } from '@fluentui/react-icons' const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function Gallery() { return {projects.map(project =>
{project.name}{project.description}
)}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### Group ```tsx import { ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemGroup, ItemSeparator, Item, ItemActions } from 'wss3-forge/react-aria' import { Fragment, useState } from 'react' import { Avatar, Button } from 'wss3-forge' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] function PersonRow({ person }: { person: typeof people[number] }) { return <> {person.name}{person.email} } function People() { const [selected, setSelected] = useState('') return {people.map((person, i) => {i > 0 && } )} } export default function Example() { return () } ``` #### Header ```tsx import { ItemGroup, Item, ItemHeader, ItemContent, ItemTitle, ItemDescription } from 'wss3-forge/react-aria' const projects = [ { name: 'Letterpress', description: 'Type specimen', asset: '/typeset/wood-letterpress.jpg', href: '/typeset' }, { name: 'Workspace', description: 'Navigation layout', asset: '/blocks-gallery/workspace-sidebar-dark.webp', href: '/blocks/preview/workspace-sidebar' }, { name: 'Architecture', description: 'Image collection', asset: '/editorial/media-light.webp', href: '/docs/components/imagegallery' }, ] function CoverGrid() { return {projects.map(project => {project.name}{project.description} )} } export default function Example() { return () } ``` #### Link ```tsx import { ItemContent, ItemTitle, ItemDescription, Item } from 'wss3-forge/react-aria' import { ChevronRight16Regular, Open16Regular } from '@fluentui/react-icons' import { VStack } from 'wss3-forge' function LinkRows() { return Install ForgeSet up a new project. Reference guideOpens in a new tab. } export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### RTL ```tsx import { Item, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemMedia } from 'wss3-forge/react-aria' import { useState } from 'react' import { People20Regular, ChevronRight16Regular } from '@fluentui/react-icons' import { Button, VStack } from 'wss3-forge' function Lead({ rtl = false }: { rtl?: boolean }) { const [pinned, setPinned] = useState(false) return
{rtl ? 'قائمة الإصدار' : 'Release checklist'} {rtl ? 'الخطوات المتبقية قبل النشر.' : 'The remaining steps before publication.'} {rtl ? 'تعرّف على فريق المشروع' : 'Meet the project team'}
} export default function Example() { return () } function RowLink({ href, target, rel, size, children }: { href: string; target?: '_blank'; rel?: string; size?: 'xs' | 'sm'; children: import('react').ReactNode }) { return {children} } ``` #### Footer ```tsx import { Item, ItemContent, ItemTitle, ItemFooter } from 'wss3-forge/react-aria' import { Badge, Text } from 'wss3-forge' function ReviewSummary() { return Review summary ApprovedYesterday } export default function Example() { return () } ``` #### Dropdown ```tsx import { useState } from 'react' import { ChevronDown16Regular } from '@fluentui/react-icons' import { Avatar } from 'wss3-forge' import { Button, DropdownMenu, DropdownMenuItem, DropdownMenuTrigger, Item, ItemContent, ItemDescription, ItemMedia, ItemTitle } from 'wss3-forge/react-aria' const people = [ { name: 'Lena Rivera', email: 'lena@example.com' }, { name: 'Morgan Lee', email: 'morgan@example.com' }, { name: 'Sam Cole', email: 'sam@example.com' }, ] export default function ProjectTeamMenu() { const [selected, setSelected] = useState('') return {people.map(person => setSelected(person.name)} textValue={person.name} id={person.email}> {person.name}{person.email} )} } ``` ## Root package API ### Item A display row with separate content and actions. Props type: `ItemProps` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes **Composition exports** - `ItemActions` (named export) - `ItemContent` (named export) - `ItemDescription` (named export) - `ItemFooter` (named export) - `ItemGroup` (named export) - `ItemHeader` (named export) - `ItemMedia` (named export) - `ItemSeparator` (named export) - `ItemTitle` (named export) - `title?` — `ReactNode` Title for the compact Forge API. - `description?` — `ReactNode` Supporting text for the compact Forge API. - `media?` — `ReactNode` Leading media for the compact Forge API. - `actions?` — `ReactNode` Independent actions for the compact Forge API. - `children?` — `ReactNode` - `as?` — `'article' | 'div' | 'li'` Default `'div'`. Options `"article"`, `"div"`, `"li"`. Element used by the compact Forge entry. - `size?` — `'xs' | 'sm' | 'md' | 'default' | null` Default `'default'`. Options `null`, `"default"`, `"sm"`, `"md"`, `"xs"`. Set the row’s padding and gap. - `variant?` — `'plain' | 'subtle' | 'outlined' | 'default' | 'muted' | 'outline' | null` Default `'default'`. Options `null`, `"default"`, `"outline"`, `"muted"`, `"subtle"`, `"outlined"`, `"plain"`. Choose a transparent row, a bordered surface or a muted fill. - `ref?` — `React.LegacyRef | undefined` ### ItemActions Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ### ItemContent Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ### ItemDescription Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ### ItemFooter Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ### ItemGroup Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ### ItemHeader Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ### ItemMedia Props type: `ItemMediaProps` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `variant?` — `'default' | 'icon' | 'image' | null` Default `'default'`. Options `null`, `"default"`, `"icon"`, `"image"`. - `ref?` — `React.LegacyRef | undefined` ### ItemSeparator Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ### ItemTitle Props type: `HTMLAttributes` Native attributes: AriaAttributes, DOMAttributes, HTMLAttributes - `ref?` — `React.LegacyRef | undefined` ## Related types ```ts export interface ItemProps extends Omit, 'title'>, ItemAppearance { title?: ReactNode description?: ReactNode media?: ReactNode actions?: ReactNode children?: ReactNode as?: 'article' | 'div' | 'li' } export interface ItemMediaProps extends HTMLAttributes { variant?: 'default' | 'icon' | 'image' | null } ``` ## Optional primitive contracts - [wss3-forge/base-ui · Item contract](/ai/skill/primitive-api/Item.json) - [wss3-forge/radix · Item contract](/ai/skill/primitive-api/Item.json) - [wss3-forge/react-aria · Item contract](/ai/skill/primitive-api/Item.json)