Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

Rebuild component block templates and showcases from storybook (#1542)

Joey4e6bc9bf1ea7
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogAsyncAction.doc.mjs b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogAsyncAction.doc.mjs
new file mode 100644
index 0000000000..c853590754
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogAsyncAction.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AlertDialog — Async Action',
+ description:
+ 'Alert dialog with an async action that shows a loading state while processing.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AlertDialog', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogAsyncAction.tsx b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogAsyncAction.tsx
new file mode 100644
index 0000000000..eccf89485b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogAsyncAction.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSAlertDialog} from '@xds/core/AlertDialog';
+import {XDSButton} from '@xds/core/Button';
+
+export default function AlertDialogAsyncAction() {
+ const [isOpen, setIsOpen] = useState(false);
+ const [isLoading, setIsLoading] = useState(false);
+
+ return (
+ <>
+ <XDSButton
+ label="Revoke access"
+ variant="destructive"
+ onClick={() => setIsOpen(true)}
+ />
+ <XDSAlertDialog
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ title="Revoke access?"
+ description="This user will immediately lose access to all shared resources."
+ actionLabel="Revoke"
+ isActionLoading={isLoading}
+ onAction={async () => {
+ setIsLoading(true);
+ await new Promise(r => setTimeout(r, 2000));
+ setIsLoading(false);
+ setIsOpen(false);
+ }}
+ />
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.doc.mjs b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.doc.mjs
index 582d8f2f11..7777c4c352 100644
--- a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.doc.mjs
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'AlertDialog — Delete Confirmation',
- description: 'Confirmation dialog triggered by a danger button for destructive actions.',
+ description:
+ 'Destructive confirmation dialog triggered by a button, the most common alert dialog pattern.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['AlertDialog', 'Button'],
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.tsx b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.tsx
index 943e6e7d20..5836721113 100644
--- a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.tsx
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogDeleteConfirmation.tsx
@@ -1,15 +1,15 @@
'use client';
+import {useState} from 'react';
import {XDSAlertDialog} from '@xds/core/AlertDialog';
import {XDSButton} from '@xds/core/Button';
-import {useState} from 'react';
export default function AlertDialogDeleteConfirmation() {
const [isOpen, setIsOpen] = useState(false);
return (
<>
<XDSButton
- label="Delete"
+ label="Delete item"
variant="destructive"
onClick={() => setIsOpen(true)}
/>
@@ -17,7 +17,7 @@ export default function AlertDialogDeleteConfirmation() {
isOpen={isOpen}
onOpenChange={setIsOpen}
title="Delete item?"
- description="This action cannot be undone."
+ description="This action cannot be undone. The item and all its data will be permanently removed."
actionLabel="Delete"
onAction={() => setIsOpen(false)}
/>
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperativeAlert.doc.mjs b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperativeAlert.doc.mjs
new file mode 100644
index 0000000000..3600d5dd36
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperativeAlert.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AlertDialog — Imperative API',
+ description:
+ 'Alert dialog using the imperative hook API, no state management needed.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AlertDialog', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperative.tsx b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperativeAlert.tsx
similarity index 52%
rename from packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperative.tsx
rename to packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperativeAlert.tsx
index 8478879468..6700c479c2 100644
--- a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperative.tsx
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperativeAlert.tsx
@@ -1,22 +1,24 @@
'use client';
import {useXDSImperativeAlertDialog} from '@xds/core/AlertDialog';
+import {XDSButton} from '@xds/core/Button';
-export default function AlertDialogImperative() {
+export default function AlertDialogImperativeAlert() {
const alert = useXDSImperativeAlertDialog();
return (
<>
- <button
+ <XDSButton
+ label="Delete item"
+ variant="destructive"
onClick={() =>
alert.show({
- title: 'Delete?',
- description: 'This cannot be undone.',
+ title: 'Delete item?',
+ description: 'This action cannot be undone.',
actionLabel: 'Delete',
onAction: () => alert.hide(),
})
- }>
- Delete
- </button>
+ }
+ />
{alert.element}
</>
);
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogInformationalAlert.doc.mjs b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogInformationalAlert.doc.mjs
new file mode 100644
index 0000000000..34e279e66e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogInformationalAlert.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AlertDialog — Informational Alert',
+ description:
+ 'Non-destructive confirmation dialog with a primary action button for informational notices.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AlertDialog', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogInformationalAlert.tsx b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogInformationalAlert.tsx
new file mode 100644
index 0000000000..f791029492
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AlertDialog/AlertDialogInformationalAlert.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSAlertDialog} from '@xds/core/AlertDialog';
+import {XDSButton} from '@xds/core/Button';
+
+export default function AlertDialogInformationalAlert() {
+ const [isOpen, setIsOpen] = useState(false);
+ return (
+ <>
+ <XDSButton
+ label="Show notice"
+ variant="secondary"
+ onClick={() => setIsOpen(true)}
+ />
+ <XDSAlertDialog
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ title="Session expired"
+ description="Your session has expired. You will be redirected to the login page."
+ actionLabel="Sign in"
+ actionVariant="primary"
+ onAction={() => setIsOpen(false)}
+ />
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellAutoHeight.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellAutoHeight.doc.mjs
deleted file mode 100644
index 497da83529..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellAutoHeight.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AppShell — Auto Height',
- description: 'Shell with auto height mode for content-heavy pages that scroll naturally.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'TopNav', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellAutoHeight.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellAutoHeight.tsx
deleted file mode 100644
index ab267fe371..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellAutoHeight.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading} from '@xds/core/TopNav';
-import {XDSSideNav} from '@xds/core/SideNav';
-
-export default function AppShellAutoHeight() {
- return (
- <XDSAppShell
- topNav={
- <XDSTopNav
- label="Docs"
- heading={<XDSTopNavHeading heading="Docs" />}
- />
- }
- sideNav={
- <XDSSideNav>
- <div style={{padding: 16}}>Navigation items</div>
- </XDSSideNav>
- }
- height="auto">
- <div style={{padding: 24}}>
- <h1>Documentation</h1>
- <p>Long document content that grows with the page.</p>
- </div>
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.doc.mjs
new file mode 100644
index 0000000000..3676d631ef
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AppShell — Content Only',
+ description:
+ 'Minimal shell with no navigation, useful for full-bleed pages, auth screens, or embedded views.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AppShell', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.tsx
new file mode 100644
index 0000000000..fad473b279
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellContentOnly.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {XDSAppShell} from '@xds/core/AppShell';
+import {XDSText} from '@xds/core/Text';
+
+export default function AppShellContentOnly() {
+ return (
+ <XDSAppShell contentPadding={6}>
+ <XDSText type="large">Page Content</XDSText>
+ <XDSText type="body">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
+ veniam, quis nostrud exercitation ullamco laboris.
+ </XDSText>
+ </XDSAppShell>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellControlledCollapse.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellControlledCollapse.doc.mjs
deleted file mode 100644
index eaf804e33e..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellControlledCollapse.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AppShell — Controlled Collapse',
- description: 'AppShell with externally controlled side navigation collapse state.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'TopNav', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellControlledCollapse.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellControlledCollapse.tsx
deleted file mode 100644
index b03395277f..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellControlledCollapse.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading} from '@xds/core/TopNav';
-import {XDSSideNav} from '@xds/core/SideNav';
-import {useState} from 'react';
-
-export default function AppShellControlledCollapse() {
- const [collapsed, setCollapsed] = useState(false);
- return (
- <XDSAppShell
- topNav={
- <XDSTopNav
- label="App"
- heading={<XDSTopNavHeading heading="App" />}
- />
- }
- sideNav={
- <XDSSideNav>
- <div style={{padding: 16}}>Navigation items</div>
- </XDSSideNav>
- }
- mobileNav={{isOpen: collapsed, onOpenChange: setCollapsed}}>
- <div style={{padding: 24}}>
- <h1>Content</h1>
- <p>SideNav collapse is controlled externally.</p>
- </div>
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellFullBleedWithPadded.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellFullBleedWithPadded.doc.mjs
deleted file mode 100644
index 520abea9fb..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellFullBleedWithPadded.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AppShell — Full Bleed With Padded',
- description: 'Full-bleed layout with a padded details section below.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'Section', 'Text', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellFullBleedWithPadded.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellFullBleedWithPadded.tsx
deleted file mode 100644
index 77ec9c204c..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellFullBleedWithPadded.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading} from '@xds/core/TopNav';
-import {XDSHeading} from '@xds/core/Text';
-import {XDSText} from '@xds/core/Text';
-import {XDSSection} from '@xds/core/Section';
-
-export default function AppShellFullBleedWithPadded() {
- return (
- <XDSAppShell
- contentPadding={0}
- topNav={
- <XDSTopNav
- label="App"
- heading={<XDSTopNavHeading heading="Player" />}
- />
- }>
- <div
- style={{
- height: 300,
- background: '#000',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- color: '#fff',
- }}>
- Full-width video player
- </div>
- <XDSSection padding={4}>
- <XDSHeading level={1}>Video Title</XDSHeading>
- <XDSText type="body">Video description</XDSText>
- </XDSSection>
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedContent.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellPaddedContent.doc.mjs
deleted file mode 100644
index 645172dd78..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedContent.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AppShell — Padded Content',
- description: 'Settings page layout with contentPadding for form-style content.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'SideNav', 'Text', 'TextInput', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedContent.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellPaddedContent.tsx
deleted file mode 100644
index a5ea1ec5db..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedContent.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading} from '@xds/core/TopNav';
-import {XDSSideNav} from '@xds/core/SideNav';
-import {XDSHeading} from '@xds/core/Text';
-import {XDSTextInput} from '@xds/core/TextInput';
-import {useState} from 'react';
-
-export default function AppShellPaddedContent() {
- const [appName, setAppName] = useState('');
-
- return (
- <XDSAppShell
- contentPadding={4}
- topNav={
- <XDSTopNav
- label="App"
- heading={<XDSTopNavHeading heading="Settings" />}
- />
- }
- sideNav={
- <XDSSideNav>
- <div style={{padding: 16}}>Navigation items</div>
- </XDSSideNav>
- }>
- <XDSHeading level={1}>General</XDSHeading>
- <XDSTextInput
- label="App Name"
- value={appName}
- onChange={(v) => setAppName(v)}
- />
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedWithFullBleed.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellPaddedWithFullBleed.doc.mjs
deleted file mode 100644
index fd9a61d673..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedWithFullBleed.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AppShell — Padded With Full Bleed',
- description: 'Padded layout with a full-bleed chart section using XDSSection padding override.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'Card', 'Section', 'Text', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedWithFullBleed.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellPaddedWithFullBleed.tsx
deleted file mode 100644
index 4fa5036edd..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellPaddedWithFullBleed.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading} from '@xds/core/TopNav';
-import {XDSHeading} from '@xds/core/Text';
-import {XDSSection} from '@xds/core/Section';
-import {XDSCard} from '@xds/core/Card';
-
-export default function AppShellPaddedWithFullBleed() {
- return (
- <XDSAppShell
- contentPadding={4}
- topNav={
- <XDSTopNav
- label="App"
- heading={<XDSTopNavHeading heading="Dashboard" />}
- />
- }>
- <XDSHeading level={1}>Overview</XDSHeading>
- <XDSSection padding={0}>
- <div
- style={{
- height: 200,
- background: 'var(--color-accent-muted)',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}>
- Full-width chart
- </div>
- </XDSSection>
- <XDSCard>Details</XDSCard>
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellResponsiveMobileNav.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellResponsiveMobileNav.doc.mjs
deleted file mode 100644
index 94175f405d..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellResponsiveMobileNav.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AppShell — Responsive MobileNav',
- description: 'Responsive layout with SideNav for desktop and MobileNav drawer for mobile.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'TopNav', 'SideNav', 'MobileNav', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellResponsiveMobileNav.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellResponsiveMobileNav.tsx
deleted file mode 100644
index 616870de1e..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellResponsiveMobileNav.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
-import {XDSSideNav} from '@xds/core/SideNav';
-import {XDSMobileNav} from '@xds/core/MobileNav';
-import {XDSButton} from '@xds/core/Button';
-import {useState} from 'react';
-
-function MenuIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <path d="M3 12h18M3 6h18M3 18h18" />
- </svg>
- );
-}
-
-export default function AppShellResponsiveMobileNav() {
- const [mobileOpen, setMobileOpen] = useState(false);
-
- return (
- <XDSAppShell
- topNav={
- <XDSTopNav
- label="Navigation"
- heading={<XDSTopNavHeading heading="My App" />}
- startContent={
- <>
- <XDSButton
- label="Menu"
- icon={<MenuIcon />}
- variant="ghost"
- onClick={() => setMobileOpen(true)}
- />
- <XDSTopNavItem label="Home" href="/" isSelected />
- </>
- }
- />
- }
- sideNav={
- <XDSSideNav>
- <div style={{padding: 16}}>Navigation items</div>
- </XDSSideNav>
- }
- mobileNav={
- <XDSMobileNav
- isOpen={mobileOpen}
- onOpenChange={(open) => setMobileOpen(open)}
- header="My App">
- <div style={{padding: 16}}>Navigation items</div>
- </XDSMobileNav>
- }>
- <div style={{padding: 24}}>
- <h1>Content</h1>
- <p>Responsive layout with mobile navigation drawer.</p>
- </div>
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.doc.mjs
index 8bcd1a52b7..de172af5ee 100644
--- a/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.doc.mjs
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'AppShell — SideNav Only',
- description: 'Layout with side navigation only and no top navigation bar.',
+ name: 'AppShell — Side Nav Only',
+ description:
+ 'App shell with SideNav header providing app identity, no TopNav needed.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'SideNav'],
+ componentsUsed: ['AppShell', 'SideNav', 'Text', 'NavIcon'],
};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx
index b2bfd476fb..8f22f477a5 100644
--- a/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx
@@ -1,6 +1,8 @@
'use client';
import {XDSAppShell} from '@xds/core/AppShell';
+import {XDSText} from '@xds/core/Text';
+import {XDSNavIcon} from '@xds/core/NavIcon';
import {
XDSSideNav,
XDSSideNavHeading,
@@ -8,40 +10,52 @@ import {
XDSSideNavSection,
} from '@xds/core/SideNav';
-function AppIcon() {
+function CubeIcon() {
return (
- <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
- <circle cx="12" cy="12" r="10" />
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
</svg>
);
}
function HomeIcon() {
return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.955-8.955a1.126 1.126 0 0 1 1.59 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
</svg>
);
}
-function ChartBarIcon() {
+function ChartIcon() {
return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <rect x="18" y="3" width="4" height="18" rx="1" />
- <rect x="10" y="8" width="4" height="13" rx="1" />
- <rect x="2" y="13" width="4" height="8" rx="1" />
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function FolderIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z" />
+ </svg>
+ );
+}
+
+function UsersIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
+ </svg>
+ );
+}
+
+function CogIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.646.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.333.183-.582.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
</svg>
);
}
@@ -49,34 +63,32 @@ function ChartBarIcon() {
export default function AppShellSideNavOnly() {
return (
<XDSAppShell
+ contentPadding={6}
sideNav={
<XDSSideNav
header={
<XDSSideNavHeading
- icon={<AppIcon />}
- heading="My App"
- headingHref="/"
+ icon={<XDSNavIcon icon={<CubeIcon />} />}
+ heading="Acme App"
+ headingHref="#"
/>
}>
<XDSSideNavSection title="Main" isHeaderHidden>
- <XDSSideNavItem
- label="Dashboard"
- icon={HomeIcon}
- isSelected
- href="/dashboard"
- />
- <XDSSideNavItem
- label="Analytics"
- icon={ChartBarIcon}
- href="/analytics"
- />
+ <XDSSideNavItem label="Dashboard" icon={HomeIcon} isSelected href="#" />
+ <XDSSideNavItem label="Analytics" icon={ChartIcon} href="#" />
+ <XDSSideNavItem label="Projects" icon={FolderIcon} href="#" />
+ </XDSSideNavSection>
+ <XDSSideNavSection title="Organization">
+ <XDSSideNavItem label="Team" icon={UsersIcon} href="#" />
+ <XDSSideNavItem label="Settings" icon={CogIcon} href="#" />
</XDSSideNavSection>
</XDSSideNav>
}>
- <div style={{padding: 24}}>
- <h1>Dashboard</h1>
- <p>Main content area</p>
- </div>
+ <XDSText type="large">Page Content</XDSText>
+ <XDSText type="body">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua.
+ </XDSText>
</XDSAppShell>
);
}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.doc.mjs
index 628c78cbe6..1997661f0c 100644
--- a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.doc.mjs
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'AppShell — TopNav Only',
- description: 'Layout with only a top navigation bar and no side navigation.',
+ name: 'AppShell — Top Nav Only',
+ description:
+ 'Simple layout with TopNav and no side navigation, suitable for landing pages.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'TopNav'],
+ componentsUsed: ['AppShell', 'TopNav', 'Text', 'NavIcon'],
};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx
index 303356053b..806ad4cce1 100644
--- a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx
@@ -1,21 +1,46 @@
'use client';
import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading} from '@xds/core/TopNav';
+import {XDSText} from '@xds/core/Text';
+import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+
+function CubeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
+ </svg>
+ );
+}
export default function AppShellTopNavOnly() {
return (
<XDSAppShell
+ contentPadding={6}
topNav={
<XDSTopNav
- label="Navigation"
- heading={<XDSTopNavHeading heading="Landing Page" />}
+ label="Main navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="Acme App"
+ logo={<XDSNavIcon icon={<CubeIcon />} />}
+ />
+ }
+ startContent={
+ <>
+ <XDSTopNavItem label="Home" href="#" isSelected />
+ <XDSTopNavItem label="Products" href="#" />
+ <XDSTopNavItem label="Docs" href="#" />
+ </>
+ }
/>
}>
- <div style={{padding: 24}}>
- <h1>Landing Page</h1>
- <p>Main content area</p>
- </div>
+ <XDSText type="large">Page Content</XDSText>
+ <XDSText type="body">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua.
+ </XDSText>
</XDSAppShell>
);
}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavSideNav.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavSideNav.doc.mjs
deleted file mode 100644
index ae05027424..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavSideNav.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AppShell — TopNav + SideNav',
- description: 'Most common layout with top navigation bar and side navigation.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['AppShell', 'TopNav', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavSideNav.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavSideNav.tsx
deleted file mode 100644
index 116eaf403e..0000000000
--- a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavSideNav.tsx
+++ /dev/null
@@ -1,105 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
-import {
- XDSSideNav,
- XDSSideNavItem,
- XDSSideNavSection,
-} from '@xds/core/SideNav';
-
-function Logo() {
- return (
- <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
- <rect width="24" height="24" rx="4" />
- </svg>
- );
-}
-
-function HomeIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
- </svg>
- );
-}
-
-function ChartBarIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <rect x="18" y="3" width="4" height="18" rx="1" />
- <rect x="10" y="8" width="4" height="13" rx="1" />
- <rect x="2" y="13" width="4" height="8" rx="1" />
- </svg>
- );
-}
-
-function CogIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <circle cx="12" cy="12" r="3" />
- <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" />
- </svg>
- );
-}
-
-export default function AppShellTopNavSideNav() {
- return (
- <XDSAppShell
- topNav={
- <XDSTopNav
- label="Main navigation"
- heading={<XDSTopNavHeading heading="My App" logo={<Logo />} />}
- startContent={
- <>
- <XDSTopNavItem label="Home" href="/" isSelected />
- <XDSTopNavItem label="Products" href="/products" />
- </>
- }
- />
- }
- sideNav={
- <XDSSideNav>
- <XDSSideNavSection title="Main" isHeaderHidden>
- <XDSSideNavItem
- label="Dashboard"
- icon={HomeIcon}
- isSelected
- href="/dashboard"
- />
- <XDSSideNavItem
- label="Analytics"
- icon={ChartBarIcon}
- href="/analytics"
- />
- </XDSSideNavSection>
- <XDSSideNavSection title="Settings">
- <XDSSideNavItem label="General" icon={CogIcon} href="/settings" />
- </XDSSideNavSection>
- </XDSSideNav>
- }>
- <div style={{padding: 24}}>
- <h1>Dashboard</h1>
- <p>Main content area</p>
- </div>
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.doc.mjs
new file mode 100644
index 0000000000..ce559bed79
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AppShell — Top Nav with Side Nav',
+ description:
+ 'The most common layout with TopNav for app identity and SideNav for page-level navigation.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AppShell', 'TopNav', 'SideNav', 'Text', 'NavIcon', 'Icon'],
+};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx
new file mode 100644
index 0000000000..74f81f3947
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx
@@ -0,0 +1,106 @@
+'use client';
+
+import {XDSAppShell} from '@xds/core/AppShell';
+import {XDSText} from '@xds/core/Text';
+import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+import {
+ XDSSideNav,
+ XDSSideNavItem,
+ XDSSideNavSection,
+} from '@xds/core/SideNav';
+
+
+function CubeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
+ </svg>
+ );
+}
+
+function HomeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.955-8.955a1.126 1.126 0 0 1 1.59 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
+ </svg>
+ );
+}
+
+function ChartIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function FolderIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z" />
+ </svg>
+ );
+}
+
+function UsersIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
+ </svg>
+ );
+}
+
+function CogIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.646.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.333.183-.582.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+export default function AppShellTopNavWithSideNav() {
+ return (
+ <XDSAppShell
+ contentPadding={6}
+ topNav={
+ <XDSTopNav
+ label="Main navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="Acme App"
+ logo={<XDSNavIcon icon={<CubeIcon />} />}
+ />
+ }
+ startContent={
+ <>
+ <XDSTopNavItem label="Home" href="#" isSelected />
+ <XDSTopNavItem label="Products" href="#" />
+ <XDSTopNavItem label="Docs" href="#" />
+ </>
+ }
+ />
+ }
+ sideNav={
+ <XDSSideNav>
+ <XDSSideNavSection title="Main" isHeaderHidden>
+ <XDSSideNavItem label="Dashboard" icon={HomeIcon} isSelected href="#" />
+ <XDSSideNavItem label="Analytics" icon={ChartIcon} href="#" />
+ <XDSSideNavItem label="Projects" icon={FolderIcon} href="#" />
+ </XDSSideNavSection>
+ <XDSSideNavSection title="Organization">
+ <XDSSideNavItem label="Team" icon={UsersIcon} href="#" />
+ <XDSSideNavItem label="Settings" icon={CogIcon} href="#" />
+ </XDSSideNavSection>
+ </XDSSideNav>
+ }>
+ <XDSText type="large">Page Content</XDSText>
+ <XDSText type="body">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua.
+ </XDSText>
+ </XDSAppShell>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.doc.mjs b/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.doc.mjs
new file mode 100644
index 0000000000..288e3a50bd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AppShell — With Banner',
+ description:
+ 'Full layout with TopNav, SideNav, and a dismissable info banner between the nav and content.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AppShell', 'TopNav', 'SideNav', 'Banner', 'Text', 'NavIcon'],
+};
diff --git a/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.tsx b/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.tsx
new file mode 100644
index 0000000000..3d254f4376
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AppShell/AppShellWithBanner.tsx
@@ -0,0 +1,115 @@
+'use client';
+
+import {XDSAppShell} from '@xds/core/AppShell';
+import {XDSBanner} from '@xds/core/Banner';
+import {XDSText} from '@xds/core/Text';
+import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+import {
+ XDSSideNav,
+ XDSSideNavItem,
+ XDSSideNavSection,
+} from '@xds/core/SideNav';
+
+function CubeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
+ </svg>
+ );
+}
+
+function HomeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.955-8.955a1.126 1.126 0 0 1 1.59 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
+ </svg>
+ );
+}
+
+function ChartIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function FolderIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z" />
+ </svg>
+ );
+}
+
+function UsersIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
+ </svg>
+ );
+}
+
+function CogIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.646.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.333.183-.582.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+export default function AppShellWithBanner() {
+ return (
+ <XDSAppShell
+ contentPadding={6}
+ topNav={
+ <XDSTopNav
+ label="Main navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="Acme App"
+ logo={<XDSNavIcon icon={<CubeIcon />} />}
+ />
+ }
+ startContent={
+ <>
+ <XDSTopNavItem label="Home" href="#" isSelected />
+ <XDSTopNavItem label="Products" href="#" />
+ <XDSTopNavItem label="Docs" href="#" />
+ </>
+ }
+ />
+ }
+ sideNav={
+ <XDSSideNav>
+ <XDSSideNavSection title="Main" isHeaderHidden>
+ <XDSSideNavItem label="Dashboard" icon={HomeIcon} isSelected href="#" />
+ <XDSSideNavItem label="Analytics" icon={ChartIcon} href="#" />
+ <XDSSideNavItem label="Projects" icon={FolderIcon} href="#" />
+ </XDSSideNavSection>
+ <XDSSideNavSection title="Organization">
+ <XDSSideNavItem label="Team" icon={UsersIcon} href="#" />
+ <XDSSideNavItem label="Settings" icon={CogIcon} href="#" />
+ </XDSSideNavSection>
+ </XDSSideNav>
+ }
+ banner={
+ <XDSBanner
+ status="info"
+ container="section"
+ title="System maintenance scheduled"
+ description="The system will undergo maintenance tonight at 10pm UTC."
+ isDismissable
+ />
+ }>
+ <XDSText type="large">Page Content</XDSText>
+ <XDSText type="body">
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
+ tempor incididunt ut labore et dolore magna aliqua.
+ </XDSText>
+ </XDSAppShell>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioImageGallery.doc.mjs b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioImageGallery.doc.mjs
new file mode 100644
index 0000000000..6141683370
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioImageGallery.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AspectRatio — Image Gallery',
+ description: 'Grid of images with consistent 4:3 aspect ratios for a uniform gallery layout.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AspectRatio', 'Grid'],
+};
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx
new file mode 100644
index 0000000000..aa753f60b9
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import {XDSAspectRatio} from '@xds/core/AspectRatio';
+import {XDSGrid} from '@xds/core/Grid';
+
+const images = [
+ {id: 1, alt: 'Mountain landscape'},
+ {id: 2, alt: 'Ocean sunset'},
+ {id: 3, alt: 'Forest trail'},
+ {id: 4, alt: 'City skyline'},
+ {id: 5, alt: 'Desert dunes'},
+ {id: 6, alt: 'Snowy peaks'},
+];
+
+export default function AspectRatioImageGallery() {
+ return (
+ <XDSGrid columns={3} gap={4}>
+ {images.map(({id, alt}) => (
+ <XDSAspectRatio key={id} ratio={4 / 3}>
+ <img
+ src={`https://picsum.photos/seed/${id}/400/300`}
+ alt={alt}
+ style={{
+ width: '100%',
+ height: '100%',
+ objectFit: 'cover',
+ borderRadius: 8,
+ }}
+ />
+ </XDSAspectRatio>
+ ))}
+ </XDSGrid>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquare.tsx b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquare.tsx
deleted file mode 100644
index dae431131b..0000000000
--- a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquare.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {XDSAspectRatio} from '@xds/core/AspectRatio';
-
-export default function AspectRatioSquare() {
- return (
- <XDSAspectRatio ratio={1}>
- <div
- style={{
- width: '100%',
- height: '100%',
- background: 'var(--color-accent-muted)',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}>
- Square content
- </div>
- </XDSAspectRatio>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquare.doc.mjs b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquareImage.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquare.doc.mjs
rename to packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquareImage.doc.mjs
index b70acaec8e..28c25a3bd4 100644
--- a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquare.doc.mjs
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquareImage.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'AspectRatio — Square',
- description: 'Square 1:1 aspect ratio container.',
+ name: 'AspectRatio — Square Image',
+ description: '1:1 square aspect ratio, ideal for avatars and Instagram-style images.',
isReady: true,
aspectRatio: 1,
componentsUsed: ['AspectRatio'],
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx
new file mode 100644
index 0000000000..3a000f4e7e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {XDSAspectRatio} from '@xds/core/AspectRatio';
+
+export default function AspectRatioSquareImage() {
+ return (
+ <div style={{maxWidth: 300}}>
+ <XDSAspectRatio ratio={1}>
+ <img
+ src="https://picsum.photos/400/400"
+ alt="1:1 square"
+ style={{
+ width: '100%',
+ height: '100%',
+ objectFit: 'cover',
+ borderRadius: 8,
+ }}
+ />
+ </XDSAspectRatio>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioVideo.doc.mjs b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioVideo.doc.mjs
deleted file mode 100644
index 84def99548..0000000000
--- a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioVideo.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'AspectRatio — Video',
- description: '4:3 aspect ratio container for video content.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['AspectRatio'],
-};
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioVideo.tsx b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioVideo.tsx
deleted file mode 100644
index 7802bb9b62..0000000000
--- a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioVideo.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import {XDSAspectRatio} from '@xds/core/AspectRatio';
-
-export default function AspectRatioVideo() {
- return (
- <XDSAspectRatio ratio={4 / 3}>
- <div
- style={{
- width: '100%',
- height: '100%',
- background: '#000',
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- color: '#fff',
- }}>
- 4:3 video placeholder
- </div>
- </XDSAspectRatio>
- );
-}
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.doc.mjs b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.doc.mjs
index 3f40fcff65..77afbd4744 100644
--- a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.doc.mjs
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'AspectRatio — Widescreen',
- description: 'Widescreen 16:9 aspect ratio container for images.',
+ name: 'AspectRatio — 16:9 Widescreen Image',
+ description: 'Standard 16:9 widescreen aspect ratio wrapping an image.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['AspectRatio'],
};
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx
index c834c0796d..599894d692 100644
--- a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx
@@ -4,12 +4,19 @@ import {XDSAspectRatio} from '@xds/core/AspectRatio';
export default function AspectRatioWidescreen() {
return (
- <XDSAspectRatio ratio={16 / 9}>
- <img
- src="https://placehold.co/640x360"
- alt="Widescreen image"
- style={{objectFit: 'cover', width: '100%', height: '100%'}}
- />
- </XDSAspectRatio>
+ <div style={{maxWidth: 600}}>
+ <XDSAspectRatio ratio={16 / 9}>
+ <img
+ src="https://picsum.photos/800/450"
+ alt="16:9 widescreen"
+ style={{
+ width: '100%',
+ height: '100%',
+ objectFit: 'cover',
+ borderRadius: 8,
+ }}
+ />
+ </XDSAspectRatio>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.doc.mjs b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.doc.mjs
new file mode 100644
index 0000000000..c14afd1f70
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'AspectRatio — Loading Skeleton',
+ description: 'Aspect ratio container with a skeleton placeholder for loading states.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['AspectRatio', 'Skeleton'],
+};
diff --git a/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.tsx b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.tsx
new file mode 100644
index 0000000000..8cbcf391ef
--- /dev/null
+++ b/packages/cli/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.tsx
@@ -0,0 +1,14 @@
+'use client';
+
+import {XDSAspectRatio} from '@xds/core/AspectRatio';
+import {XDSSkeleton} from '@xds/core/Skeleton';
+
+export default function AspectRatioWithSkeleton() {
+ return (
+ <div style={{maxWidth: 600}}>
+ <XDSAspectRatio ratio={16 / 9}>
+ <XDSSkeleton width="100%" height="100%" />
+ </XDSAspectRatio>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarFallbackChain.doc.mjs b/packages/cli/templates/blocks/components/Avatar/AvatarFallbackChain.doc.mjs
new file mode 100644
index 0000000000..a324c29aa4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarFallbackChain.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Avatar — Fallback Chain',
+ description:
+ 'Demonstrates the avatar fallback chain: primary image, fallback image, initials, then default icon.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Avatar'],
+};
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarFallbackChain.tsx b/packages/cli/templates/blocks/components/Avatar/AvatarFallbackChain.tsx
new file mode 100644
index 0000000000..2cc2f8010f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarFallbackChain.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {XDSAvatar} from '@xds/core/Avatar';
+
+export default function AvatarFallbackChain() {
+ return (
+ <div style={{display: 'flex', alignItems: 'center', gap: 24}}>
+ <div>
+ <p style={{margin: '0 0 8px', fontSize: 13}}>Valid src</p>
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=10"
+ name="Test User"
+ size="large"
+ />
+ </div>
+ <div>
+ <p style={{margin: '0 0 8px', fontSize: 13}}>
+ Invalid src, valid fallbackSrc
+ </p>
+ <XDSAvatar
+ src="https://invalid-url.example/broken.jpg"
+ fallbackSrc="https://i.pravatar.cc/150?img=11"
+ name="Test User"
+ size="large"
+ />
+ </div>
+ <div>
+ <p style={{margin: '0 0 8px', fontSize: 13}}>Both invalid, has name</p>
+ <XDSAvatar
+ src="https://invalid-url.example/broken.jpg"
+ fallbackSrc="https://also-invalid.example/broken.jpg"
+ name="Test User"
+ size="large"
+ />
+ </div>
+ <div>
+ <p style={{margin: '0 0 8px', fontSize: 13}}>All invalid, no name</p>
+ <XDSAvatar
+ src="https://invalid-url.example/broken.jpg"
+ size="large"
+ />
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.doc.mjs b/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.doc.mjs
index fc24136773..cc53ef0683 100644
--- a/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.doc.mjs
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Avatar — Initials Fallback',
- description: 'Avatar showing auto-generated initials when no image is provided.',
+ description: 'Avatars rendering initials from user names when no image is available.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Avatar'],
};
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.tsx b/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.tsx
index 133decc688..c0b3a3ccd6 100644
--- a/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.tsx
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarInitialsFallback.tsx
@@ -3,5 +3,12 @@
import {XDSAvatar} from '@xds/core/Avatar';
export default function AvatarInitialsFallback() {
- return <XDSAvatar name="Jane Smith" size="large" />;
+ return (
+ <div style={{display: 'flex', alignItems: 'center', gap: 16}}>
+ <XDSAvatar name="John Doe" size="medium" />
+ <XDSAvatar name="Alice" size="medium" />
+ <XDSAvatar name="Bob Smith Johnson" size="medium" />
+ <XDSAvatar name="Dr. Sarah Connor" size="medium" />
+ </div>
+ );
}
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotSizes.doc.mjs b/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotSizes.doc.mjs
deleted file mode 100644
index 5765cb3e11..0000000000
--- a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotSizes.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Avatar — Status Dot Sizes',
- description: 'Status dot scales automatically across different avatar sizes.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Avatar'],
-};
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotSizes.tsx b/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotSizes.tsx
deleted file mode 100644
index 80e6129172..0000000000
--- a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotSizes.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {XDSAvatar, XDSAvatarStatusDot} from '@xds/core/Avatar';
-
-export default function AvatarStatusDotSizes() {
- return (
- <div style={{display: 'flex', gap: 16, alignItems: 'center'}}>
- <XDSAvatar name="AB" size="tiny" status={<XDSAvatarStatusDot />} />
- <XDSAvatar name="CD" size="large" status={<XDSAvatarStatusDot />} />
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotVariants.doc.mjs b/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotVariants.doc.mjs
deleted file mode 100644
index a1d0f9faa5..0000000000
--- a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotVariants.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Avatar — Status Dot Variants',
- description: 'Different status dot variants for busy and away contexts.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Avatar'],
-};
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotVariants.tsx b/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotVariants.tsx
deleted file mode 100644
index 77ec831fec..0000000000
--- a/packages/cli/templates/blocks/components/Avatar/AvatarStatusDotVariants.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {XDSAvatar, XDSAvatarStatusDot} from '@xds/core/Avatar';
-
-export default function AvatarStatusDotVariants() {
- return (
- <div style={{display: 'flex', gap: 16, alignItems: 'center'}}>
- <XDSAvatar
- name="EF"
- status={<XDSAvatarStatusDot variant="negative" label="Busy" />}
- />
- <XDSAvatar
- name="GH"
- status={<XDSAvatarStatusDot variant="neutral" label="Away" />}
- />
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.doc.mjs b/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.doc.mjs
index fb20c89cb9..220cb4de47 100644
--- a/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.doc.mjs
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Avatar — With Image',
- description: 'Avatar displaying a user profile image.',
+ name: 'Avatar — With Images',
+ description: 'Avatars with profile images shown at different sizes.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Avatar'],
};
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.tsx b/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.tsx
index 2fe120b0e6..0fdbb7ef7b 100644
--- a/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.tsx
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarWithImage.tsx
@@ -3,5 +3,28 @@
import {XDSAvatar} from '@xds/core/Avatar';
export default function AvatarWithImage() {
- return <XDSAvatar src="/user.jpg" name="John Doe" />;
+ return (
+ <div style={{display: 'flex', alignItems: 'center', gap: 16}}>
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=1"
+ name="User 1"
+ size="tiny"
+ />
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=2"
+ name="User 2"
+ size="small"
+ />
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=3"
+ name="User 3"
+ size="medium"
+ />
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=4"
+ name="User 4"
+ size="large"
+ />
+ </div>
+ );
}
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarWithStatus.doc.mjs b/packages/cli/templates/blocks/components/Avatar/AvatarWithStatus.doc.mjs
new file mode 100644
index 0000000000..581e13e762
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarWithStatus.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Avatar — With Status Indicators',
+ description: 'Avatars with positive, neutral, and negative status dots for online presence.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Avatar'],
+};
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarWithStatus.tsx b/packages/cli/templates/blocks/components/Avatar/AvatarWithStatus.tsx
new file mode 100644
index 0000000000..5c726e3a07
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Avatar/AvatarWithStatus.tsx
@@ -0,0 +1,28 @@
+'use client';
+
+import {XDSAvatar, XDSAvatarStatusDot} from '@xds/core/Avatar';
+
+export default function AvatarWithStatus() {
+ return (
+ <div style={{display: 'flex', alignItems: 'center', gap: 16}}>
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=20"
+ name="Online User"
+ size="large"
+ status={<XDSAvatarStatusDot variant="positive" label="Online" />}
+ />
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=21"
+ name="Offline User"
+ size="large"
+ status={<XDSAvatarStatusDot variant="neutral" label="Offline" />}
+ />
+ <XDSAvatar
+ src="https://i.pravatar.cc/150?img=22"
+ name="Busy User"
+ size="large"
+ status={<XDSAvatarStatusDot variant="negative" label="Busy" />}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarWithStatusIndicator.doc.mjs b/packages/cli/templates/blocks/components/Avatar/AvatarWithStatusIndicator.doc.mjs
deleted file mode 100644
index f751a5eb03..0000000000
--- a/packages/cli/templates/blocks/components/Avatar/AvatarWithStatusIndicator.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Avatar — With Status Indicator',
- description: 'Avatar with a size-aware status dot showing online presence.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Avatar'],
-};
diff --git a/packages/cli/templates/blocks/components/Avatar/AvatarWithStatusIndicator.tsx b/packages/cli/templates/blocks/components/Avatar/AvatarWithStatusIndicator.tsx
deleted file mode 100644
index 3cef055c17..0000000000
--- a/packages/cli/templates/blocks/components/Avatar/AvatarWithStatusIndicator.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSAvatar, XDSAvatarStatusDot} from '@xds/core/Avatar';
-
-export default function AvatarWithStatusIndicator() {
- return (
- <XDSAvatar
- src="/user.jpg"
- name="John Doe"
- size="medium"
- status={<XDSAvatarStatusDot variant="positive" label="Online" />}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeTextBadge.doc.mjs b/packages/cli/templates/blocks/components/Badge/BadgeCategoryTags.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/Badge/BadgeTextBadge.doc.mjs
rename to packages/cli/templates/blocks/components/Badge/BadgeCategoryTags.doc.mjs
index f485d6f8bf..7f74272ae3 100644
--- a/packages/cli/templates/blocks/components/Badge/BadgeTextBadge.doc.mjs
+++ b/packages/cli/templates/blocks/components/Badge/BadgeCategoryTags.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Badge — Text Badge',
- description: 'Simple text badge with the default neutral variant.',
+ name: 'Badge — Category Tags',
+ description: 'Non-semantic color badges used as category or team tags.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Badge'],
};
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeColorVariants.tsx b/packages/cli/templates/blocks/components/Badge/BadgeCategoryTags.tsx
similarity index 54%
rename from packages/cli/templates/blocks/components/Badge/BadgeColorVariants.tsx
rename to packages/cli/templates/blocks/components/Badge/BadgeCategoryTags.tsx
index 3ab9f85030..6552e5e8f0 100644
--- a/packages/cli/templates/blocks/components/Badge/BadgeColorVariants.tsx
+++ b/packages/cli/templates/blocks/components/Badge/BadgeCategoryTags.tsx
@@ -2,13 +2,18 @@
import {XDSBadge} from '@xds/core/Badge';
-export default function BadgeColorVariants() {
+export default function BadgeCategoryTags() {
return (
<div style={{display: 'flex', gap: 8, flexWrap: 'wrap'}}>
<XDSBadge variant="blue" label="Design" />
+ <XDSBadge variant="cyan" label="DevOps" />
+ <XDSBadge variant="green" label="Backend" />
+ <XDSBadge variant="orange" label="Urgent" />
+ <XDSBadge variant="pink" label="Marketing" />
<XDSBadge variant="purple" label="Engineering" />
+ <XDSBadge variant="red" label="Critical" />
<XDSBadge variant="teal" label="Research" />
- <XDSBadge variant="orange" label="Urgent" />
+ <XDSBadge variant="yellow" label="Review" />
</div>
);
}
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeCountBadge.tsx b/packages/cli/templates/blocks/components/Badge/BadgeCountBadge.tsx
deleted file mode 100644
index 848d420b1c..0000000000
--- a/packages/cli/templates/blocks/components/Badge/BadgeCountBadge.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSBadge} from '@xds/core/Badge';
-
-export default function BadgeCountBadge() {
- return <XDSBadge variant="info" label={42} />;
-}
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeStatusVariants.doc.mjs b/packages/cli/templates/blocks/components/Badge/BadgeCountBadges.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/Badge/BadgeStatusVariants.doc.mjs
rename to packages/cli/templates/blocks/components/Badge/BadgeCountBadges.doc.mjs
index 9bda0fbe32..31ce24603e 100644
--- a/packages/cli/templates/blocks/components/Badge/BadgeStatusVariants.doc.mjs
+++ b/packages/cli/templates/blocks/components/Badge/BadgeCountBadges.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Badge — Status Variants',
- description: 'Semantic status badges for success, error, and warning states.',
+ name: 'Badge — Count Badges',
+ description: 'Badges used as numeric counters for notifications or item counts.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Badge'],
};
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeCountBadges.tsx b/packages/cli/templates/blocks/components/Badge/BadgeCountBadges.tsx
new file mode 100644
index 0000000000..1baad64894
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Badge/BadgeCountBadges.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSBadge} from '@xds/core/Badge';
+
+export default function BadgeCountBadges() {
+ return (
+ <div style={{display: 'flex', gap: 8, alignItems: 'center'}}>
+ <XDSBadge variant="info" label={3} />
+ <XDSBadge variant="error" label="99+" />
+ <XDSBadge variant="success" label={12} />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeCountBadge.doc.mjs b/packages/cli/templates/blocks/components/Badge/BadgeSemanticVariants.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/Badge/BadgeCountBadge.doc.mjs
rename to packages/cli/templates/blocks/components/Badge/BadgeSemanticVariants.doc.mjs
index 7da8781eb3..8a38ef2b39 100644
--- a/packages/cli/templates/blocks/components/Badge/BadgeCountBadge.doc.mjs
+++ b/packages/cli/templates/blocks/components/Badge/BadgeSemanticVariants.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Badge — Count Badge',
- description: 'Info badge displaying a numeric count value.',
+ name: 'Badge — Semantic Variants',
+ description: 'All five semantic badge variants: neutral, info, success, warning, and error.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Badge'],
};
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeSemanticVariants.tsx b/packages/cli/templates/blocks/components/Badge/BadgeSemanticVariants.tsx
new file mode 100644
index 0000000000..cd954367dc
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Badge/BadgeSemanticVariants.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSBadge} from '@xds/core/Badge';
+
+export default function BadgeSemanticVariants() {
+ return (
+ <div style={{display: 'flex', gap: 8, alignItems: 'center'}}>
+ <XDSBadge variant="neutral" label="Neutral" />
+ <XDSBadge variant="info" label="Info" />
+ <XDSBadge variant="success" label="Success" />
+ <XDSBadge variant="warning" label="Warning" />
+ <XDSBadge variant="error" label="Error" />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeColorVariants.doc.mjs b/packages/cli/templates/blocks/components/Badge/BadgeStatusLabels.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/Badge/BadgeColorVariants.doc.mjs
rename to packages/cli/templates/blocks/components/Badge/BadgeStatusLabels.doc.mjs
index de56631570..4b11e36a03 100644
--- a/packages/cli/templates/blocks/components/Badge/BadgeColorVariants.doc.mjs
+++ b/packages/cli/templates/blocks/components/Badge/BadgeStatusLabels.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Badge — Color Variants',
- description: 'Non-semantic color badges for categorization and tagging.',
+ name: 'Badge — Status Labels',
+ description: 'Badges as status indicators showing active, pending, failed, and draft states.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Badge'],
};
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeStatusVariants.tsx b/packages/cli/templates/blocks/components/Badge/BadgeStatusLabels.tsx
similarity index 59%
rename from packages/cli/templates/blocks/components/Badge/BadgeStatusVariants.tsx
rename to packages/cli/templates/blocks/components/Badge/BadgeStatusLabels.tsx
index 77cb28c562..b92735cfc5 100644
--- a/packages/cli/templates/blocks/components/Badge/BadgeStatusVariants.tsx
+++ b/packages/cli/templates/blocks/components/Badge/BadgeStatusLabels.tsx
@@ -2,12 +2,13 @@
import {XDSBadge} from '@xds/core/Badge';
-export default function BadgeStatusVariants() {
+export default function BadgeStatusLabels() {
return (
- <div style={{display: 'flex', gap: 8, flexWrap: 'wrap'}}>
+ <div style={{display: 'flex', gap: 8, alignItems: 'center'}}>
<XDSBadge variant="success" label="Active" />
- <XDSBadge variant="error" label="Failed" />
<XDSBadge variant="warning" label="Pending" />
+ <XDSBadge variant="error" label="Failed" />
+ <XDSBadge variant="neutral" label="Draft" />
</div>
);
}
diff --git a/packages/cli/templates/blocks/components/Badge/BadgeTextBadge.tsx b/packages/cli/templates/blocks/components/Badge/BadgeTextBadge.tsx
deleted file mode 100644
index 3cbedae7e5..0000000000
--- a/packages/cli/templates/blocks/components/Badge/BadgeTextBadge.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSBadge} from '@xds/core/Badge';
-
-export default function BadgeTextBadge() {
- return <XDSBadge label="Default" />;
-}
diff --git a/packages/cli/templates/blocks/components/Banner/BannerCollapsibleContent.doc.mjs b/packages/cli/templates/blocks/components/Banner/BannerCollapsibleContent.doc.mjs
new file mode 100644
index 0000000000..4aad93e122
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Banner/BannerCollapsibleContent.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Banner — Collapsible Content',
+ description: 'Banner with an expandable content area, action button, and dismiss control.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Banner', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/Banner/BannerCollapsibleContent.tsx b/packages/cli/templates/blocks/components/Banner/BannerCollapsibleContent.tsx
new file mode 100644
index 0000000000..4ceefec5bf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Banner/BannerCollapsibleContent.tsx
@@ -0,0 +1,24 @@
+'use client';
+
+import {XDSBanner} from '@xds/core/Banner';
+import {XDSButton} from '@xds/core/Button';
+
+export default function BannerCollapsibleContent() {
+ return (
+ <XDSBanner
+ status="warning"
+ title="Configuration changes detected"
+ description="Review the changes before they take effect."
+ endContent={<XDSButton label="Review" variant="secondary" size="sm" />}
+ isDismissable
+ defaultIsExpanded>
+ <div style={{fontSize: 13}}>
+ <p style={{margin: '0 0 8px'}}>Changed settings:</p>
+ <ul style={{margin: 0, paddingInlineStart: 20}}>
+ <li>Authentication method updated</li>
+ <li>Rate limits modified</li>
+ </ul>
+ </div>
+ </XDSBanner>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Banner/BannerDismissable.doc.mjs b/packages/cli/templates/blocks/components/Banner/BannerDismissable.doc.mjs
index 9be4b41b56..4191b4e729 100644
--- a/packages/cli/templates/blocks/components/Banner/BannerDismissable.doc.mjs
+++ b/packages/cli/templates/blocks/components/Banner/BannerDismissable.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Banner — Dismissable',
- description: 'Error banner with description and self-dismissing behavior.',
+ name: 'Banner — Dismissable Warning',
+ description: 'Warning banner that can be dismissed by the user.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Banner'],
};
diff --git a/packages/cli/templates/blocks/components/Banner/BannerDismissable.tsx b/packages/cli/templates/blocks/components/Banner/BannerDismissable.tsx
index 89e229456d..83ae282754 100644
--- a/packages/cli/templates/blocks/components/Banner/BannerDismissable.tsx
+++ b/packages/cli/templates/blocks/components/Banner/BannerDismissable.tsx
@@ -5,11 +5,10 @@ import {XDSBanner} from '@xds/core/Banner';
export default function BannerDismissable() {
return (
<XDSBanner
- status="error"
- title="Something went wrong"
- description="Please try again later."
+ status="warning"
+ title="Your session will expire soon."
+ description="Please save your work to avoid losing changes."
isDismissable
- onDismiss={() => console.log('dismissed')}
/>
);
}
diff --git a/packages/cli/templates/blocks/components/Banner/BannerWithContent.doc.mjs b/packages/cli/templates/blocks/components/Banner/BannerErrorList.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/Banner/BannerWithContent.doc.mjs
rename to packages/cli/templates/blocks/components/Banner/BannerErrorList.doc.mjs
index b42d5529ed..5f09b08ad6 100644
--- a/packages/cli/templates/blocks/components/Banner/BannerWithContent.doc.mjs
+++ b/packages/cli/templates/blocks/components/Banner/BannerErrorList.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Banner — With Content',
- description: 'Error banner with a content area listing issues below the header.',
+ name: 'Banner — Error List',
+ description: 'Error banner with an expanded content area listing validation errors.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Banner'],
};
diff --git a/packages/cli/templates/blocks/components/Banner/BannerWithContent.tsx b/packages/cli/templates/blocks/components/Banner/BannerErrorList.tsx
similarity index 53%
rename from packages/cli/templates/blocks/components/Banner/BannerWithContent.tsx
rename to packages/cli/templates/blocks/components/Banner/BannerErrorList.tsx
index b5be88328b..f8a45527cb 100644
--- a/packages/cli/templates/blocks/components/Banner/BannerWithContent.tsx
+++ b/packages/cli/templates/blocks/components/Banner/BannerErrorList.tsx
@@ -2,15 +2,17 @@
import {XDSBanner} from '@xds/core/Banner';
-export default function BannerWithContent() {
+export default function BannerErrorList() {
return (
<XDSBanner
status="error"
title="Multiple errors found"
- description="The following issues need to be resolved:">
- <ul>
+ description="The following issues need to be resolved:"
+ defaultIsExpanded>
+ <ul style={{margin: 0, paddingInlineStart: 20, fontSize: 13}}>
<li>Email address is invalid</li>
<li>Password must be at least 8 characters</li>
+ <li>Username is already taken</li>
</ul>
</XDSBanner>
);
diff --git a/packages/cli/templates/blocks/components/Banner/BannerSectionVariant.doc.mjs b/packages/cli/templates/blocks/components/Banner/BannerSectionVariant.doc.mjs
new file mode 100644
index 0000000000..aed935e904
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Banner/BannerSectionVariant.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Banner — Section Container',
+ description: 'Full-width section banner with no border-radius for page-level notifications.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Banner'],
+};
diff --git a/packages/cli/templates/blocks/components/Banner/BannerSectionVariant.tsx b/packages/cli/templates/blocks/components/Banner/BannerSectionVariant.tsx
new file mode 100644
index 0000000000..324d370452
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Banner/BannerSectionVariant.tsx
@@ -0,0 +1,14 @@
+'use client';
+
+import {XDSBanner} from '@xds/core/Banner';
+
+export default function BannerSectionVariant() {
+ return (
+ <XDSBanner
+ status="info"
+ title="System maintenance scheduled"
+ description="The system will be undergoing maintenance on Saturday from 2:00 AM to 6:00 AM UTC."
+ container="section"
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Banner/BannerSimple.tsx b/packages/cli/templates/blocks/components/Banner/BannerSimple.tsx
deleted file mode 100644
index f9d5666699..0000000000
--- a/packages/cli/templates/blocks/components/Banner/BannerSimple.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSBanner} from '@xds/core/Banner';
-
-export default function BannerSimple() {
- return <XDSBanner status="info" title="New update available" />;
-}
diff --git a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperative.doc.mjs b/packages/cli/templates/blocks/components/Banner/BannerWithActionButton.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperative.doc.mjs
rename to packages/cli/templates/blocks/components/Banner/BannerWithActionButton.doc.mjs
index a27f81ee46..3c54a1ba1e 100644
--- a/packages/cli/templates/blocks/components/AlertDialog/AlertDialogImperative.doc.mjs
+++ b/packages/cli/templates/blocks/components/Banner/BannerWithActionButton.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'AlertDialog — Imperative',
- description: 'Fire-and-forget alert dialog using the imperative hook API.',
+ name: 'Banner — With Action Button',
+ description: 'Banner with a call-to-action button in the end slot.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['AlertDialog'],
+ componentsUsed: ['Banner', 'Button'],
};
diff --git a/packages/cli/templates/blocks/components/Banner/BannerWithActionButton.tsx b/packages/cli/templates/blocks/components/Banner/BannerWithActionButton.tsx
new file mode 100644
index 0000000000..47de1df585
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Banner/BannerWithActionButton.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSBanner} from '@xds/core/Banner';
+import {XDSButton} from '@xds/core/Button';
+
+export default function BannerWithActionButton() {
+ return (
+ <XDSBanner
+ status="info"
+ title="New update available"
+ description="Version 2.0 is ready to install."
+ endContent={<XDSButton label="Update now" variant="primary" size="sm" />}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Banner/BannerSimple.doc.mjs b/packages/cli/templates/blocks/components/Banner/BannerWithDescription.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/Banner/BannerSimple.doc.mjs
rename to packages/cli/templates/blocks/components/Banner/BannerWithDescription.doc.mjs
index 9b90f197da..0108bcd60a 100644
--- a/packages/cli/templates/blocks/components/Banner/BannerSimple.doc.mjs
+++ b/packages/cli/templates/blocks/components/Banner/BannerWithDescription.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Banner — Simple',
- description: 'Simple info banner with only the colored header.',
+ name: 'Banner — With Description',
+ description: 'Info banner with a title and extended description text.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Banner'],
};
diff --git a/packages/cli/templates/blocks/components/Banner/BannerWithDescription.tsx b/packages/cli/templates/blocks/components/Banner/BannerWithDescription.tsx
new file mode 100644
index 0000000000..76b96850c1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Banner/BannerWithDescription.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSBanner} from '@xds/core/Banner';
+
+export default function BannerWithDescription() {
+ return (
+ <XDSBanner
+ status="info"
+ title="New update available"
+ description="A new version of the application is available. Update now to get the latest features and improvements."
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsBasic.tsx b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsBasic.tsx
deleted file mode 100644
index 936db2f363..0000000000
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsBasic.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-'use client';
-
-import {XDSBreadcrumbs, XDSBreadcrumbItem} from '@xds/core/Breadcrumbs';
-
-export default function BreadcrumbsBasic() {
- return (
- <XDSBreadcrumbs>
- <XDSBreadcrumbItem href="/">Home</XDSBreadcrumbItem>
- <XDSBreadcrumbItem href="/projects">Projects</XDSBreadcrumbItem>
- <XDSBreadcrumbItem isCurrent>My Project</XDSBreadcrumbItem>
- </XDSBreadcrumbs>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsItemWithIcon.doc.mjs b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsItemWithIcon.doc.mjs
rename to packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.doc.mjs
index 47267e2d20..c9d9c58f68 100644
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsItemWithIcon.doc.mjs
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Breadcrumbs — Item With Icon',
- description: 'Breadcrumb item with icon and click handler.',
+ name: 'Breadcrumbs — Custom Separator',
+ description:
+ 'Breadcrumbs trail using a custom separator character between items.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Breadcrumbs'],
};
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx
new file mode 100644
index 0000000000..7dc9c3edbe
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSBreadcrumbs, XDSBreadcrumbItem} from '@xds/core/Breadcrumbs';
+
+export default function BreadcrumbsCustomSeparator() {
+ return (
+ <XDSBreadcrumbs separator="›">
+ <XDSBreadcrumbItem href="/">Home</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem href="/docs">Docs</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem isCurrent>API Reference</XDSBreadcrumbItem>
+ </XDSBreadcrumbs>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsBasic.doc.mjs b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsBasic.doc.mjs
rename to packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.doc.mjs
index 1ced72229e..5cdc17ec76 100644
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Breadcrumbs — Basic',
- description: 'Basic breadcrumb trail with linked items and current page.',
+ name: 'Breadcrumbs — Deep Hierarchy',
+ description:
+ 'Breadcrumbs trail with five levels showing a deep navigation path.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Breadcrumbs'],
};
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.tsx b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.tsx
new file mode 100644
index 0000000000..907fabd7cd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.tsx
@@ -0,0 +1,19 @@
+'use client';
+
+import {XDSBreadcrumbs, XDSBreadcrumbItem} from '@xds/core/Breadcrumbs';
+
+export default function BreadcrumbsDeepHierarchy() {
+ return (
+ <XDSBreadcrumbs>
+ <XDSBreadcrumbItem href="/">Home</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem href="/products">Products</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem href="/products/electronics">
+ Electronics
+ </XDSBreadcrumbItem>
+ <XDSBreadcrumbItem href="/products/electronics/phones">
+ Phones
+ </XDSBreadcrumbItem>
+ <XDSBreadcrumbItem isCurrent>iPhone 15 Pro</XDSBreadcrumbItem>
+ </XDSBreadcrumbs>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsItemWithIcon.tsx b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsItemWithIcon.tsx
deleted file mode 100644
index bc961e01b4..0000000000
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsItemWithIcon.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-'use client';
-
-import {XDSBreadcrumbs, XDSBreadcrumbItem} from '@xds/core/Breadcrumbs';
-
-function CogIcon() {
- return (
- <svg
- width="14"
- height="14"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <circle cx="12" cy="12" r="3" />
- <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" />
- </svg>
- );
-}
-
-export default function BreadcrumbsItemWithIcon() {
- return (
- <XDSBreadcrumbs>
- <XDSBreadcrumbItem href="/">Home</XDSBreadcrumbItem>
- <XDSBreadcrumbItem href="/settings" startIcon={<CogIcon />}>
- Settings
- </XDSBreadcrumbItem>
- <XDSBreadcrumbItem isCurrent>General</XDSBreadcrumbItem>
- </XDSBreadcrumbs>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.doc.mjs b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.doc.mjs
index a0bd59a078..d6c5faece7 100644
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.doc.mjs
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.doc.mjs
@@ -2,8 +2,9 @@
export const doc = {
type: 'block',
name: 'Breadcrumbs — Supporting Variant',
- description: 'Smaller breadcrumbs with secondary text styling.',
+ description:
+ 'Breadcrumbs using the supporting variant with smaller, muted text.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Breadcrumbs'],
};
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx
index bcf97d8835..337f79273d 100644
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx
@@ -6,7 +6,8 @@ export default function BreadcrumbsSupportingVariant() {
return (
<XDSBreadcrumbs variant="supporting">
<XDSBreadcrumbItem href="/">Home</XDSBreadcrumbItem>
- <XDSBreadcrumbItem isCurrent>Page</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem href="/projects">Projects</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem isCurrent>My Project</XDSBreadcrumbItem>
</XDSBreadcrumbs>
);
}
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.doc.mjs b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.doc.mjs
index 5134df75ad..07887566d5 100644
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.doc.mjs
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Breadcrumbs — With Icons',
- description: 'Breadcrumbs with a leading icon on the home item.',
+ description: 'Breadcrumbs with leading icons on each navigation item.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Breadcrumbs'],
};
diff --git a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.tsx b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.tsx
index dc010d3071..26faec812f 100644
--- a/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.tsx
+++ b/packages/cli/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.tsx
@@ -5,13 +5,37 @@ import {XDSBreadcrumbs, XDSBreadcrumbItem} from '@xds/core/Breadcrumbs';
function HomeIcon() {
return (
<svg
- width="14"
- height="14"
+ width={16}
+ height={16}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
- strokeWidth="2">
- <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
+ strokeWidth={1.5}
+ aria-hidden="true">
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"
+ />
+ </svg>
+ );
+}
+
+function SettingsIcon() {
+ return (
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.5}
+ aria-hidden="true">
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93s.844.141 1.2-.058l.758-.454a1.125 1.125 0 0 1 1.37.17l.773.773c.4.4.48 1.01.17 1.37l-.454.758c-.2.356-.223.808-.058 1.2s.506.71.93.78l.894.149c.542.09.94.56.94 1.11v1.093c0 .55-.398 1.02-.94 1.11l-.894.149c-.424.07-.764.384-.93.78s-.141.844.058 1.2l.454.758a1.125 1.125 0 0 1-.17 1.37l-.773.773a1.125 1.125 0 0 1-1.37.17l-.758-.454c-.356-.2-.808-.223-1.2-.058s-.71.506-.78.93l-.149.894c-.09.542-.56.94-1.11.94h-1.093c-.55 0-1.02-.398-1.11-.94l-.149-.894a1.62 1.62 0 0 0-.78-.93 1.62 1.62 0 0 0-1.2.058l-.758.454a1.125 1.125 0 0 1-1.37-.17l-.773-.773a1.125 1.125 0 0 1-.17-1.37l.454-.758c.2-.356.223-.808.058-1.2a1.62 1.62 0 0 0-.93-.78l-.894-.149c-.542-.09-.94-.56-.94-1.11v-1.093c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.764-.384.93-.78s.141-.844-.058-1.2l-.454-.758a1.125 1.125 0 0 1 .17-1.37l.773-.773a1.125 1.125 0 0 1 1.37-.17l.758.454c.356.2.808.223 1.2.058s.71-.506.78-.93l.149-.894ZM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
+ />
</svg>
);
}
@@ -22,7 +46,10 @@ export default function BreadcrumbsWithIcons() {
<XDSBreadcrumbItem href="/" startIcon={<HomeIcon />}>
Home
</XDSBreadcrumbItem>
- <XDSBreadcrumbItem isCurrent>Settings</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem href="/settings" startIcon={<SettingsIcon />}>
+ Settings
+ </XDSBreadcrumbItem>
+ <XDSBreadcrumbItem isCurrent>Profile</XDSBreadcrumbItem>
</XDSBreadcrumbs>
);
}
diff --git a/packages/cli/templates/blocks/components/Button/ButtonBasic.tsx b/packages/cli/templates/blocks/components/Button/ButtonBasic.tsx
deleted file mode 100644
index 1d0bfd84b2..0000000000
--- a/packages/cli/templates/blocks/components/Button/ButtonBasic.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-
-export default function ButtonBasic() {
- return <XDSButton label="Click me" variant="primary" />;
-}
diff --git a/packages/cli/templates/blocks/components/Button/ButtonLinkButton.doc.mjs b/packages/cli/templates/blocks/components/Button/ButtonLinkButton.doc.mjs
new file mode 100644
index 0000000000..c4520e9518
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Button/ButtonLinkButton.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Button — Link Buttons',
+ description:
+ 'Buttons rendering as anchor elements when an href prop is provided.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Button'],
+};
diff --git a/packages/cli/templates/blocks/components/Button/ButtonLinkButton.tsx b/packages/cli/templates/blocks/components/Button/ButtonLinkButton.tsx
new file mode 100644
index 0000000000..08cab8fe85
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Button/ButtonLinkButton.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {XDSButton} from '@xds/core/Button';
+
+export default function ButtonLinkButton() {
+ return (
+ <div style={{display: 'flex', gap: 12, alignItems: 'center'}}>
+ <XDSButton
+ label="Visit Example"
+ href="https://example.com"
+ variant="primary"
+ />
+ <XDSButton
+ label="Open in new tab"
+ href="https://example.com"
+ target="_blank"
+ rel="noopener noreferrer"
+ variant="secondary"
+ />
+ <XDSButton
+ label="Ghost link"
+ href="https://example.com"
+ variant="ghost"
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Button/ButtonBasic.doc.mjs b/packages/cli/templates/blocks/components/Button/ButtonLoading.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/Button/ButtonBasic.doc.mjs
rename to packages/cli/templates/blocks/components/Button/ButtonLoading.doc.mjs
index 84e0e624c6..61027a0a08 100644
--- a/packages/cli/templates/blocks/components/Button/ButtonBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/Button/ButtonLoading.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Button — Basic',
- description: 'Primary button with a text label.',
+ name: 'Button — Loading State',
+ description: 'Buttons in loading state across all four variants.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Button'],
};
diff --git a/packages/cli/templates/blocks/components/Button/ButtonLoading.tsx b/packages/cli/templates/blocks/components/Button/ButtonLoading.tsx
new file mode 100644
index 0000000000..6d110b223b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Button/ButtonLoading.tsx
@@ -0,0 +1,14 @@
+'use client';
+
+import {XDSButton} from '@xds/core/Button';
+
+export default function ButtonLoading() {
+ return (
+ <div style={{display: 'flex', gap: 12}}>
+ <XDSButton label="Loading..." variant="primary" isLoading />
+ <XDSButton label="Loading..." variant="secondary" isLoading />
+ <XDSButton label="Loading..." variant="ghost" isLoading />
+ <XDSButton label="Loading..." variant="destructive" isLoading />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Button/ButtonWithIcon.doc.mjs b/packages/cli/templates/blocks/components/Button/ButtonSizeVariants.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/Button/ButtonWithIcon.doc.mjs
rename to packages/cli/templates/blocks/components/Button/ButtonSizeVariants.doc.mjs
index 369bd0ca16..e9c1db1918 100644
--- a/packages/cli/templates/blocks/components/Button/ButtonWithIcon.doc.mjs
+++ b/packages/cli/templates/blocks/components/Button/ButtonSizeVariants.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Button — With Icon',
- description: 'Button with a leading icon and text label.',
+ name: 'Button — Size Variants',
+ description: 'Primary buttons in small, medium, and large sizes side by side.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Button'],
};
diff --git a/packages/cli/templates/blocks/components/Button/ButtonSizeVariants.tsx b/packages/cli/templates/blocks/components/Button/ButtonSizeVariants.tsx
new file mode 100644
index 0000000000..6940f17d2c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Button/ButtonSizeVariants.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSButton} from '@xds/core/Button';
+
+export default function ButtonSizeVariants() {
+ return (
+ <div style={{display: 'flex', gap: 12, alignItems: 'center'}}>
+ <XDSButton label="Small" variant="primary" size="sm" />
+ <XDSButton label="Medium" variant="primary" size="md" />
+ <XDSButton label="Large" variant="primary" size="lg" />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Button/ButtonWithEndSlot.doc.mjs b/packages/cli/templates/blocks/components/Button/ButtonWithEndSlot.doc.mjs
new file mode 100644
index 0000000000..96257b3cb8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Button/ButtonWithEndSlot.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Button — With Badge End Slot',
+ description: 'Buttons with badge components rendered in the end slot.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Button', 'Badge'],
+};
diff --git a/packages/cli/templates/blocks/components/Button/ButtonWithEndSlot.tsx b/packages/cli/templates/blocks/components/Button/ButtonWithEndSlot.tsx
new file mode 100644
index 0000000000..ee0b538bd1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Button/ButtonWithEndSlot.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {XDSButton} from '@xds/core/Button';
+import {XDSBadge} from '@xds/core/Badge';
+
+export default function ButtonWithEndSlot() {
+ return (
+ <div style={{display: 'flex', gap: 12, alignItems: 'center'}}>
+ <XDSButton
+ label="Messages"
+ variant="primary"
+ endContent={<XDSBadge variant="info" label={3} />}
+ />
+ <XDSButton
+ label="Notifications"
+ variant="secondary"
+ endContent={<XDSBadge variant="neutral" label="New" />}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Button/ButtonWithIcon.tsx b/packages/cli/templates/blocks/components/Button/ButtonWithIcon.tsx
deleted file mode 100644
index c5ef347988..0000000000
--- a/packages/cli/templates/blocks/components/Button/ButtonWithIcon.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-
-function PencilIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" />
- </svg>
- );
-}
-
-export default function ButtonWithIcon() {
- return <XDSButton label="Edit" icon={<PencilIcon />} />;
-}
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarMinMaxBoundary.doc.mjs b/packages/cli/templates/blocks/components/Calendar/CalendarMinMaxBoundary.doc.mjs
new file mode 100644
index 0000000000..0c04271ab0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarMinMaxBoundary.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Calendar — Min/Max Boundaries',
+ description:
+ 'Calendar with min and max date boundaries restricting selectable dates.',
+ isReady: true,
+ aspectRatio: 1,
+ componentsUsed: ['Calendar'],
+};
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarMinMaxBoundary.tsx b/packages/cli/templates/blocks/components/Calendar/CalendarMinMaxBoundary.tsx
new file mode 100644
index 0000000000..56d864c137
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarMinMaxBoundary.tsx
@@ -0,0 +1,18 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCalendar, type ISODateString} from '@xds/core/Calendar';
+
+export default function CalendarMinMaxBoundary() {
+ const [value, setValue] = useState<ISODateString | undefined>(undefined);
+ return (
+ <XDSCalendar
+ mode="single"
+ min={'2026-01-10' as ISODateString}
+ max={'2026-03-20' as ISODateString}
+ value={value}
+ onChange={val => setValue(val)}
+ focusDate={'2026-01-01' as ISODateString}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarRangeSelection.doc.mjs b/packages/cli/templates/blocks/components/Calendar/CalendarRangeWithValue.doc.mjs
similarity index 66%
rename from packages/cli/templates/blocks/components/Calendar/CalendarRangeSelection.doc.mjs
rename to packages/cli/templates/blocks/components/Calendar/CalendarRangeWithValue.doc.mjs
index 834f5b51ba..b6593da44c 100644
--- a/packages/cli/templates/blocks/components/Calendar/CalendarRangeSelection.doc.mjs
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarRangeWithValue.doc.mjs
@@ -2,8 +2,9 @@
export const doc = {
type: 'block',
name: 'Calendar — Range Selection',
- description: 'Calendar with date range selection mode.',
+ description:
+ 'Calendar in range mode with a pre-selected start and end date.',
isReady: true,
- aspectRatio: 3 / 4,
+ aspectRatio: 1,
componentsUsed: ['Calendar'],
};
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarRangeSelection.tsx b/packages/cli/templates/blocks/components/Calendar/CalendarRangeWithValue.tsx
similarity index 59%
rename from packages/cli/templates/blocks/components/Calendar/CalendarRangeSelection.tsx
rename to packages/cli/templates/blocks/components/Calendar/CalendarRangeWithValue.tsx
index f9beb3c374..f750936e83 100644
--- a/packages/cli/templates/blocks/components/Calendar/CalendarRangeSelection.tsx
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarRangeWithValue.tsx
@@ -1,18 +1,19 @@
'use client';
-import {XDSCalendar, type DateRange} from '@xds/core/Calendar';
import {useState} from 'react';
+import {XDSCalendar, type DateRange} from '@xds/core/Calendar';
-export default function CalendarRangeSelection() {
+export default function CalendarRangeWithValue() {
const [value, setValue] = useState<DateRange>({
- start: '2026-01-28' as const,
- end: '2026-02-05' as const,
+ start: '2026-01-10',
+ end: '2026-01-20',
});
return (
<XDSCalendar
mode="range"
value={value}
- onChange={(range) => setValue(range)}
+ onChange={range => setValue(range)}
+ focusDate="2026-01-01"
/>
);
}
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarSingleDate.tsx b/packages/cli/templates/blocks/components/Calendar/CalendarSingleDate.tsx
deleted file mode 100644
index fc5a2ab2e7..0000000000
--- a/packages/cli/templates/blocks/components/Calendar/CalendarSingleDate.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSCalendar, type ISODateString} from '@xds/core/Calendar';
-import {useState} from 'react';
-
-export default function CalendarSingleDate() {
- const [value, setValue] = useState<ISODateString>('2026-01-28' as const);
- return (
- <XDSCalendar
- value={value}
- onChange={(newValue) => setValue(newValue)}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.doc.mjs b/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.doc.mjs
index a464934e86..3ff1509999 100644
--- a/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.doc.mjs
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Calendar — Two Months',
- description: 'Two-month calendar display with date constraints and Monday start.',
+ description: 'Calendar displaying two months side by side for easier date selection.',
isReady: true,
- aspectRatio: 3 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Calendar'],
};
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.tsx b/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.tsx
index ef44b2a4ce..f98a59f631 100644
--- a/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.tsx
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarTwoMonths.tsx
@@ -1,14 +1,17 @@
'use client';
-import {XDSCalendar} from '@xds/core/Calendar';
+import {useState} from 'react';
+import {XDSCalendar, type ISODateString} from '@xds/core/Calendar';
export default function CalendarTwoMonths() {
+ const [value, setValue] = useState<ISODateString | undefined>(undefined);
return (
<XDSCalendar
+ mode="single"
numberOfMonths={2}
- min="2026-01-01"
- max="2026-12-31"
- weekStartsOn={1}
+ value={value}
+ onChange={val => setValue(val)}
+ focusDate="2026-01-01"
/>
);
}
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarSingleDate.doc.mjs b/packages/cli/templates/blocks/components/Calendar/CalendarWeekdaysOnly.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/Calendar/CalendarSingleDate.doc.mjs
rename to packages/cli/templates/blocks/components/Calendar/CalendarWeekdaysOnly.doc.mjs
index 28731b43cd..c9d364511e 100644
--- a/packages/cli/templates/blocks/components/Calendar/CalendarSingleDate.doc.mjs
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarWeekdaysOnly.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Calendar — Single Date',
- description: 'Calendar with single date selection mode.',
+ name: 'Calendar — Weekdays Only',
+ description:
+ 'Calendar with a date constraint that disables weekend selection.',
isReady: true,
- aspectRatio: 3 / 4,
+ aspectRatio: 1,
componentsUsed: ['Calendar'],
};
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarWeekdaysOnly.tsx b/packages/cli/templates/blocks/components/Calendar/CalendarWeekdaysOnly.tsx
new file mode 100644
index 0000000000..46e9974df6
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarWeekdaysOnly.tsx
@@ -0,0 +1,23 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCalendar, type ISODateString} from '@xds/core/Calendar';
+
+export default function CalendarWeekdaysOnly() {
+ const [value, setValue] = useState<ISODateString | undefined>(undefined);
+
+ const isWeekday = (date: Date) => {
+ const day = date.getDay();
+ return day !== 0 && day !== 6;
+ };
+
+ return (
+ <XDSCalendar
+ mode="single"
+ dateConstraints={[isWeekday]}
+ value={value}
+ onChange={val => setValue(val)}
+ focusDate="2026-01-01"
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarWithSelectedDate.doc.mjs b/packages/cli/templates/blocks/components/Calendar/CalendarWithSelectedDate.doc.mjs
new file mode 100644
index 0000000000..e95b282bcd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarWithSelectedDate.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Calendar — Pre-selected Date',
+ description:
+ 'Single-date calendar initialized with a pre-selected date value.',
+ isReady: true,
+ aspectRatio: 1,
+ componentsUsed: ['Calendar'],
+};
diff --git a/packages/cli/templates/blocks/components/Calendar/CalendarWithSelectedDate.tsx b/packages/cli/templates/blocks/components/Calendar/CalendarWithSelectedDate.tsx
new file mode 100644
index 0000000000..0cc1dd552f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Calendar/CalendarWithSelectedDate.tsx
@@ -0,0 +1,16 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCalendar, type ISODateString} from '@xds/core/Calendar';
+
+export default function CalendarWithSelectedDate() {
+ const [value, setValue] = useState<ISODateString>('2026-01-15');
+ return (
+ <XDSCalendar
+ mode="single"
+ value={value}
+ onChange={val => setValue(val)}
+ focusDate="2026-01-01"
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Card/CardAccordion.doc.mjs b/packages/cli/templates/blocks/components/Card/CardAccordion.doc.mjs
deleted file mode 100644
index 9e5ff34d9c..0000000000
--- a/packages/cli/templates/blocks/components/Card/CardAccordion.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Card — Accordion',
- description: 'Accordion of collapsible cards using XDSCollapsibleGroup.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Card', 'Collapsible', 'Stack'],
-};
diff --git a/packages/cli/templates/blocks/components/Card/CardAccordion.tsx b/packages/cli/templates/blocks/components/Card/CardAccordion.tsx
deleted file mode 100644
index c540d30621..0000000000
--- a/packages/cli/templates/blocks/components/Card/CardAccordion.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {XDSCard} from '@xds/core/Card';
-import {XDSCollapsible, XDSCollapsibleGroup} from '@xds/core/Collapsible';
-import {XDSVStack} from '@xds/core/Stack';
-
-export default function CardAccordion() {
- return (
- <XDSCollapsibleGroup type="single" defaultValue="general">
- <XDSVStack gap={2}>
- <XDSCard>
- <XDSCollapsible trigger="General" value="general">
- <p>General settings content</p>
- </XDSCollapsible>
- </XDSCard>
- <XDSCard>
- <XDSCollapsible trigger="Advanced" value="advanced">
- <p>Advanced settings content</p>
- </XDSCollapsible>
- </XDSCard>
- </XDSVStack>
- </XDSCollapsibleGroup>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardBasicWithLayout.tsx b/packages/cli/templates/blocks/components/Card/CardBasicWithLayout.tsx
deleted file mode 100644
index ff96aa4867..0000000000
--- a/packages/cli/templates/blocks/components/Card/CardBasicWithLayout.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {XDSCard} from '@xds/core/Card';
-import {
- XDSLayout,
- XDSLayoutHeader,
- XDSLayoutContent,
- XDSLayoutFooter,
-} from '@xds/core/Layout';
-
-export default function CardBasicWithLayout() {
- return (
- <XDSCard width={400} height={300}>
- <XDSLayout
- header={<XDSLayoutHeader hasDivider>Title</XDSLayoutHeader>}
- content={<XDSLayoutContent>Content</XDSLayoutContent>}
- footer={<XDSLayoutFooter hasDivider>Actions</XDSLayoutFooter>}
- />
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardCallout.doc.mjs b/packages/cli/templates/blocks/components/Card/CardCallout.doc.mjs
new file mode 100644
index 0000000000..6e18adf6cb
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Card/CardCallout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Card — Callout Cards',
+ description:
+ 'Muted-variant cards used as callout or highlight areas for tips and warnings.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Card', 'Layout', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Card/CardCallout.tsx b/packages/cli/templates/blocks/components/Card/CardCallout.tsx
new file mode 100644
index 0000000000..74b5daf010
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Card/CardCallout.tsx
@@ -0,0 +1,30 @@
+'use client';
+
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSHeading} from '@xds/core/Text';
+
+export default function CardCallout() {
+ return (
+ <div style={{display: 'flex', gap: 24, flexWrap: 'wrap'}}>
+ <XDSCard width={350} variant="muted">
+ <XDSVStack gap={2}>
+ <XDSHeading level={3}>Tip</XDSHeading>
+ <p style={{margin: 0, fontSize: 14, color: '#666'}}>
+ Use the muted variant for callouts, tips, or highlighted
+ information. The muted background provides visual contrast without
+ needing a nested section.
+ </p>
+ </XDSVStack>
+ </XDSCard>
+ <XDSCard width={350} variant="muted">
+ <XDSVStack gap={2}>
+ <XDSHeading level={3}>Warning</XDSHeading>
+ <p style={{margin: 0, fontSize: 14, color: '#666'}}>
+ Muted cards work well for alerts and warnings too.
+ </p>
+ </XDSVStack>
+ </XDSCard>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Card/CardCollapsible.tsx b/packages/cli/templates/blocks/components/Card/CardCollapsible.tsx
deleted file mode 100644
index 4576b85237..0000000000
--- a/packages/cli/templates/blocks/components/Card/CardCollapsible.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSCard} from '@xds/core/Card';
-import {XDSCollapsible} from '@xds/core/Collapsible';
-
-export default function CardCollapsible() {
- return (
- <XDSCard>
- <XDSCollapsible trigger="Details">
- <p>This content can be collapsed</p>
- </XDSCollapsible>
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardColorVariant.tsx b/packages/cli/templates/blocks/components/Card/CardColorVariant.tsx
deleted file mode 100644
index 85fd6ec2e8..0000000000
--- a/packages/cli/templates/blocks/components/Card/CardColorVariant.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSCard} from '@xds/core/Card';
-
-export default function CardColorVariant() {
- return (
- <XDSCard variant="blue" width={300}>
- <p>Blue tinted card</p>
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardMutedBackground.tsx b/packages/cli/templates/blocks/components/Card/CardMutedBackground.tsx
deleted file mode 100644
index ff04ab019d..0000000000
--- a/packages/cli/templates/blocks/components/Card/CardMutedBackground.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSCard} from '@xds/core/Card';
-
-export default function CardMutedBackground() {
- return (
- <XDSCard variant="muted" width={300}>
- <p>De-emphasised card with wash background</p>
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardNestedCards.doc.mjs b/packages/cli/templates/blocks/components/Card/CardNestedCards.doc.mjs
new file mode 100644
index 0000000000..8d369d8acd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Card/CardNestedCards.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Card — Nested Cards',
+ description:
+ 'Parent card containing nested child cards that reset their own padding.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Card', 'Layout', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Card/CardNestedCards.tsx b/packages/cli/templates/blocks/components/Card/CardNestedCards.tsx
new file mode 100644
index 0000000000..7dcc4f6ed0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Card/CardNestedCards.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSHeading} from '@xds/core/Text';
+
+export default function CardNestedCards() {
+ return (
+ <XDSCard width={400}>
+ <XDSVStack gap={3}>
+ <XDSHeading level={3}>Parent Card</XDSHeading>
+ <XDSCard width="100%">
+ <p style={{margin: 0, fontSize: 14, color: '#666'}}>
+ Nested card resets container padding and gets its own padding.
+ </p>
+ </XDSCard>
+ <XDSCard width="100%">
+ <p style={{margin: 0, fontSize: 14, color: '#666'}}>
+ Another nested card with independent padding.
+ </p>
+ </XDSCard>
+ </XDSVStack>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Card/CardSimpleContent.tsx b/packages/cli/templates/blocks/components/Card/CardSimpleContent.tsx
deleted file mode 100644
index fc196b735d..0000000000
--- a/packages/cli/templates/blocks/components/Card/CardSimpleContent.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSCard} from '@xds/core/Card';
-
-export default function CardSimpleContent() {
- return (
- <XDSCard>
- <p>Card content with default padding</p>
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardWithInnerLayout.doc.mjs b/packages/cli/templates/blocks/components/Card/CardWithInnerLayout.doc.mjs
new file mode 100644
index 0000000000..e15ec6fe9c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Card/CardWithInnerLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Card — With Inner Layout',
+ description:
+ 'Card using XDSLayout with header, scrollable content, and footer with action buttons.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Card', 'Layout', 'Button', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Card/CardWithInnerLayout.tsx b/packages/cli/templates/blocks/components/Card/CardWithInnerLayout.tsx
new file mode 100644
index 0000000000..78e1706a26
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Card/CardWithInnerLayout.tsx
@@ -0,0 +1,42 @@
+'use client';
+
+import {XDSCard} from '@xds/core/Card';
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+import {XDSHeading} from '@xds/core/Text';
+
+export default function CardWithInnerLayout() {
+ return (
+ <XDSCard width={350}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <XDSHeading level={3}>Card with Layout</XDSHeading>
+ </XDSLayoutHeader>
+ }
+ content={
+ <XDSLayoutContent>
+ <p style={{margin: 0, fontSize: 14, color: '#666'}}>
+ When using XDSLayout inside a card, the layout manages its own
+ padding and provides structured header, content, and footer areas.
+ </p>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter hasDivider>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton label="Cancel" variant="secondary" />
+ <XDSButton label="Save" variant="primary" />
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Card/CardSimpleContent.doc.mjs b/packages/cli/templates/blocks/components/Card/CardWithSimpleContent.doc.mjs
similarity index 60%
rename from packages/cli/templates/blocks/components/Card/CardSimpleContent.doc.mjs
rename to packages/cli/templates/blocks/components/Card/CardWithSimpleContent.doc.mjs
index ca3dce98eb..8ec9cac304 100644
--- a/packages/cli/templates/blocks/components/Card/CardSimpleContent.doc.mjs
+++ b/packages/cli/templates/blocks/components/Card/CardWithSimpleContent.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Card — Simple Content',
- description: 'Card with simple text content and default padding.',
+ description: 'Card with a heading and body text using the layout stack.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Card'],
+ componentsUsed: ['Card', 'Layout', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/Card/CardWithSimpleContent.tsx b/packages/cli/templates/blocks/components/Card/CardWithSimpleContent.tsx
new file mode 100644
index 0000000000..1f93ade8b6
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Card/CardWithSimpleContent.tsx
@@ -0,0 +1,19 @@
+'use client';
+
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSHeading} from '@xds/core/Text';
+
+export default function CardWithSimpleContent() {
+ return (
+ <XDSCard width={320}>
+ <XDSVStack gap={2}>
+ <XDSHeading level={3}>Card Title</XDSHeading>
+ <p style={{margin: 0, fontSize: 14, color: '#666'}}>
+ This card contains simple content with a heading and body text. The
+ container padding is applied automatically.
+ </p>
+ </XDSVStack>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselBasic.doc.mjs b/packages/cli/templates/blocks/components/Carousel/CarouselBasic.doc.mjs
deleted file mode 100644
index 2f941e1163..0000000000
--- a/packages/cli/templates/blocks/components/Carousel/CarouselBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Carousel — Basic',
- description: 'Basic horizontal carousel with thumbnail items.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Carousel'],
-};
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselBasic.tsx b/packages/cli/templates/blocks/components/Carousel/CarouselBasic.tsx
deleted file mode 100644
index 5b047c31ad..0000000000
--- a/packages/cli/templates/blocks/components/Carousel/CarouselBasic.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-'use client';
-
-import {XDSCarousel} from '@xds/core/Carousel';
-
-export default function CarouselBasic() {
- return (
- <XDSCarousel gap={1}>
- <div style={{width: 200, height: 150, background: 'var(--color-accent-muted)', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center'}}>A</div>
- <div style={{width: 200, height: 150, background: 'var(--color-accent-muted)', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center'}}>B</div>
- <div style={{width: 200, height: 150, background: 'var(--color-accent-muted)', borderRadius: 8, display: 'flex', alignItems: 'center', justifyContent: 'center'}}>C</div>
- </XDSCarousel>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselWithSnap.doc.mjs b/packages/cli/templates/blocks/components/Carousel/CarouselCards.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/Carousel/CarouselWithSnap.doc.mjs
rename to packages/cli/templates/blocks/components/Carousel/CarouselCards.doc.mjs
index 1f2fdda805..d72cf37841 100644
--- a/packages/cli/templates/blocks/components/Carousel/CarouselWithSnap.doc.mjs
+++ b/packages/cli/templates/blocks/components/Carousel/CarouselCards.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Carousel — With Snap',
- description: 'Carousel with scroll-snap alignment and wider gap between cards.',
+ name: 'Carousel — Card Content',
+ description:
+ 'Horizontally scrollable carousel of card components with snap scrolling.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Carousel', 'Card'],
};
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselCards.tsx b/packages/cli/templates/blocks/components/Carousel/CarouselCards.tsx
new file mode 100644
index 0000000000..fbf3533197
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Carousel/CarouselCards.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {XDSCarousel} from '@xds/core/Carousel';
+import {XDSCard} from '@xds/core/Card';
+
+const CARDS = [
+ {id: 1, title: 'Design System', desc: 'Component library'},
+ {id: 2, title: 'Documentation', desc: 'API reference'},
+ {id: 3, title: 'Storybook', desc: 'Visual testing'},
+ {id: 4, title: 'Theme Config', desc: 'Token overrides'},
+ {id: 5, title: 'CLI Tools', desc: 'Code generation'},
+ {id: 6, title: 'Accessibility', desc: 'ARIA patterns'},
+];
+
+export default function CarouselCards() {
+ return (
+ <div style={{maxWidth: 500}}>
+ <XDSCarousel gap={2} hasSnap aria-label="Feature cards">
+ {CARDS.map(card => (
+ <XDSCard key={card.id} width={160}>
+ <p style={{margin: 0, fontSize: 14, fontWeight: 600}}>
+ {card.title}
+ </p>
+ <p style={{margin: '4px 0 0', fontSize: 12, color: '#666'}}>
+ {card.desc}
+ </p>
+ </XDSCard>
+ ))}
+ </XDSCarousel>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselColorSwatches.doc.mjs b/packages/cli/templates/blocks/components/Carousel/CarouselColorSwatches.doc.mjs
new file mode 100644
index 0000000000..9cee282abe
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Carousel/CarouselColorSwatches.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Carousel — Custom Content',
+ description:
+ 'Carousel with arbitrary content (color swatches) showing it works with any children.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Carousel'],
+};
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselColorSwatches.tsx b/packages/cli/templates/blocks/components/Carousel/CarouselColorSwatches.tsx
new file mode 100644
index 0000000000..8f67e320ab
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Carousel/CarouselColorSwatches.tsx
@@ -0,0 +1,40 @@
+'use client';
+
+import {XDSCarousel} from '@xds/core/Carousel';
+
+const COLORS = [
+ '#e74c3c',
+ '#e67e22',
+ '#f1c40f',
+ '#2ecc71',
+ '#1abc9c',
+ '#3498db',
+ '#9b59b6',
+ '#34495e',
+ '#e84393',
+ '#00cec9',
+ '#6c5ce7',
+ '#fdcb6e',
+];
+
+export default function CarouselColorSwatches() {
+ return (
+ <div style={{maxWidth: 360}}>
+ <XDSCarousel gap={1.5} aria-label="Color swatches">
+ {COLORS.map(color => (
+ <div
+ key={color}
+ style={{
+ width: 80,
+ height: 80,
+ borderRadius: 8,
+ backgroundColor: color,
+ flexShrink: 0,
+ }}
+ title={color}
+ />
+ ))}
+ </XDSCarousel>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselNoButtons.doc.mjs b/packages/cli/templates/blocks/components/Carousel/CarouselNoButtons.doc.mjs
deleted file mode 100644
index ca5509db0f..0000000000
--- a/packages/cli/templates/blocks/components/Carousel/CarouselNoButtons.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Carousel — No Buttons',
- description: 'Carousel without navigation buttons for a minimal photo gallery.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Carousel'],
-};
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselNoButtons.tsx b/packages/cli/templates/blocks/components/Carousel/CarouselNoButtons.tsx
deleted file mode 100644
index 0687c1779a..0000000000
--- a/packages/cli/templates/blocks/components/Carousel/CarouselNoButtons.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {XDSCarousel} from '@xds/core/Carousel';
-
-export default function CarouselNoButtons() {
- return (
- <XDSCarousel hasButtons={false} aria-label="Photo gallery">
- <img src="https://placehold.co/300x200" alt="Photo 1" style={{borderRadius: 8}} />
- <img src="https://placehold.co/300x200" alt="Photo 2" style={{borderRadius: 8}} />
- </XDSCarousel>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselScrollSnap.doc.mjs b/packages/cli/templates/blocks/components/Carousel/CarouselScrollSnap.doc.mjs
new file mode 100644
index 0000000000..52c2a4a6dd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Carousel/CarouselScrollSnap.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Carousel — Scroll Snap',
+ description:
+ 'Thumbnail carousel with scroll-snap enabled for precise item alignment.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Carousel', 'Thumbnail'],
+};
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselScrollSnap.tsx b/packages/cli/templates/blocks/components/Carousel/CarouselScrollSnap.tsx
new file mode 100644
index 0000000000..359c495bfe
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Carousel/CarouselScrollSnap.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {XDSCarousel} from '@xds/core/Carousel';
+import {XDSThumbnail} from '@xds/core/Thumbnail';
+
+const IMAGES = [
+ {id: 1, src: 'https://picsum.photos/id/1042/200/200', label: 'dark.jpg'},
+ {id: 2, src: 'https://picsum.photos/id/1043/200/200', label: 'light.jpg'},
+ {id: 3, src: 'https://picsum.photos/id/1044/200/200', label: 'warm.jpg'},
+ {id: 4, src: 'https://picsum.photos/id/1047/200/200', label: 'mixed.jpg'},
+ {id: 5, src: 'https://picsum.photos/id/1050/200/200', label: 'nature.jpg'},
+ {id: 6, src: 'https://picsum.photos/id/1055/200/200', label: 'city.jpg'},
+ {id: 7, src: 'https://picsum.photos/id/1060/200/200', label: 'ocean.jpg'},
+ {id: 8, src: 'https://picsum.photos/id/1069/200/200', label: 'forest.jpg'},
+];
+
+export default function CarouselScrollSnap() {
+ return (
+ <div style={{maxWidth: 400}}>
+ <XDSCarousel gap={2} hasSnap aria-label="Snapping gallery">
+ {IMAGES.map(img => (
+ <XDSThumbnail
+ key={img.id}
+ src={img.src}
+ alt={img.label}
+ label={img.label}
+ />
+ ))}
+ </XDSCarousel>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Carousel/CarouselWithSnap.tsx b/packages/cli/templates/blocks/components/Carousel/CarouselWithSnap.tsx
deleted file mode 100644
index 199787e087..0000000000
--- a/packages/cli/templates/blocks/components/Carousel/CarouselWithSnap.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client';
-
-import {XDSCarousel} from '@xds/core/Carousel';
-import {XDSCard} from '@xds/core/Card';
-
-export default function CarouselWithSnap() {
- return (
- <XDSCarousel gap={2} hasSnap>
- <XDSCard>Item 1</XDSCard>
- <XDSCard>Item 2</XDSCard>
- <XDSCard>Item 3</XDSCard>
- <XDSCard>Item 4</XDSCard>
- </XDSCarousel>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Center/CenterBothAxes.tsx b/packages/cli/templates/blocks/components/Center/CenterBothAxes.tsx
deleted file mode 100644
index c6877a07ab..0000000000
--- a/packages/cli/templates/blocks/components/Center/CenterBothAxes.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSCenter} from '@xds/core/Center';
-
-export default function CenterBothAxes() {
- return (
- <XDSCenter width={300} height={200}>
- <div>Centered content</div>
- </XDSCenter>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Center/CenterBothAxes.doc.mjs b/packages/cli/templates/blocks/components/Center/CenterFullSize.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/Center/CenterBothAxes.doc.mjs
rename to packages/cli/templates/blocks/components/Center/CenterFullSize.doc.mjs
index ee753e5141..be7efa3e66 100644
--- a/packages/cli/templates/blocks/components/Center/CenterBothAxes.doc.mjs
+++ b/packages/cli/templates/blocks/components/Center/CenterFullSize.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Center — Both Axes',
- description: 'Content centered on both horizontal and vertical axes.',
+ name: 'Center — Full Width Container',
+ description:
+ 'Content centered in a full-width container with a fixed height.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Center'],
};
diff --git a/packages/cli/templates/blocks/components/Center/CenterFullSize.tsx b/packages/cli/templates/blocks/components/Center/CenterFullSize.tsx
new file mode 100644
index 0000000000..3ba41fdfe1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Center/CenterFullSize.tsx
@@ -0,0 +1,19 @@
+'use client';
+
+import {XDSCenter} from '@xds/core/Center';
+
+export default function CenterFullSize() {
+ return (
+ <XDSCenter axis="both" width="100%" height={300}>
+ <div
+ style={{
+ padding: '16px 24px',
+ backgroundColor: '#e8f0fe',
+ borderRadius: 8,
+ fontWeight: 500,
+ }}>
+ Full Width, Fixed Height
+ </div>
+ </XDSCenter>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Center/CenterHorizontal.doc.mjs b/packages/cli/templates/blocks/components/Center/CenterHorizontal.doc.mjs
deleted file mode 100644
index a7d3bb5605..0000000000
--- a/packages/cli/templates/blocks/components/Center/CenterHorizontal.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Center — Horizontal',
- description: 'Content centered horizontally only.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Center'],
-};
diff --git a/packages/cli/templates/blocks/components/Center/CenterHorizontal.tsx b/packages/cli/templates/blocks/components/Center/CenterHorizontal.tsx
deleted file mode 100644
index d690e2fcf5..0000000000
--- a/packages/cli/templates/blocks/components/Center/CenterHorizontal.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import {XDSCenter} from '@xds/core/Center';
-
-export default function CenterHorizontal() {
- return (
- <XDSCenter axis="horizontal">
- <div
- style={{
- width: 120,
- height: 40,
- background: 'var(--color-accent-muted)',
- borderRadius: 8,
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'center',
- }}>
- Logo
- </div>
- </XDSCenter>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Center/CenterInline.doc.mjs b/packages/cli/templates/blocks/components/Center/CenterInline.doc.mjs
deleted file mode 100644
index 2307373059..0000000000
--- a/packages/cli/templates/blocks/components/Center/CenterInline.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Center — Inline',
- description: 'Inline centering for icons using inline-flex mode.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Center'],
-};
diff --git a/packages/cli/templates/blocks/components/Center/CenterInline.tsx b/packages/cli/templates/blocks/components/Center/CenterInline.tsx
deleted file mode 100644
index 1abf60e1a0..0000000000
--- a/packages/cli/templates/blocks/components/Center/CenterInline.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {XDSCenter} from '@xds/core/Center';
-
-function StarIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="currentColor"
- stroke="none">
- <path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" />
- </svg>
- );
-}
-
-export default function CenterInline() {
- return (
- <XDSCenter isInline>
- <StarIcon />
- </XDSCenter>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Center/CenterInlineCenter.doc.mjs b/packages/cli/templates/blocks/components/Center/CenterInlineCenter.doc.mjs
new file mode 100644
index 0000000000..6707c16def
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Center/CenterInlineCenter.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Center — Inline Centering',
+ description:
+ 'Inline-flex centering used to vertically align an icon within a line of text.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Center', 'Card', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Center/CenterInlineCenter.tsx b/packages/cli/templates/blocks/components/Center/CenterInlineCenter.tsx
new file mode 100644
index 0000000000..7c894f8be4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Center/CenterInlineCenter.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {XDSCenter} from '@xds/core/Center';
+import {XDSCard} from '@xds/core/Card';
+import {XDSText} from '@xds/core/Text';
+
+function CheckIcon() {
+ return (
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={2}>
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"
+ />
+ </svg>
+ );
+}
+
+export default function CenterInlineCenter() {
+ return (
+ <XDSCard>
+ <XDSText type="body">
+ Text with inline centered icon:{' '}
+ <XDSCenter isInline>
+ <CheckIcon />
+ </XDSCenter>{' '}
+ and more text after.
+ </XDSText>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Card/CardBasicWithLayout.doc.mjs b/packages/cli/templates/blocks/components/Center/CenterInsideACard.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/Card/CardBasicWithLayout.doc.mjs
rename to packages/cli/templates/blocks/components/Center/CenterInsideACard.doc.mjs
index c14f5d60a6..39b0bf8d2e 100644
--- a/packages/cli/templates/blocks/components/Card/CardBasicWithLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/Center/CenterInsideACard.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Card — Basic With Layout',
- description: 'Card with header, content, and footer using XDSLayout.',
+ name: 'Center — Inside a Card',
+ description: 'Content centered vertically and horizontally within a card.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Card', 'Layout'],
+ componentsUsed: ['Center', 'Card'],
};
diff --git a/packages/cli/templates/blocks/components/Center/CenterInsideACard.tsx b/packages/cli/templates/blocks/components/Center/CenterInsideACard.tsx
new file mode 100644
index 0000000000..9afa8c68aa
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Center/CenterInsideACard.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {XDSCenter} from '@xds/core/Center';
+import {XDSCard} from '@xds/core/Card';
+
+export default function CenterInsideACard() {
+ return (
+ <XDSCard>
+ <XDSCenter height={150}>
+ <div
+ style={{
+ padding: '16px 24px',
+ backgroundColor: '#e8f0fe',
+ borderRadius: 8,
+ fontWeight: 500,
+ }}>
+ Centered in Card
+ </div>
+ </XDSCenter>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Chat/ChatBasicConversation.doc.mjs b/packages/cli/templates/blocks/components/Chat/ChatBasicConversation.doc.mjs
deleted file mode 100644
index c81e0d8734..0000000000
--- a/packages/cli/templates/blocks/components/Chat/ChatBasicConversation.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Chat — Basic Conversation',
- description: 'Basic conversation with assistant and user messages.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Chat', 'Avatar'],
-};
diff --git a/packages/cli/templates/blocks/components/Chat/ChatBasicConversation.tsx b/packages/cli/templates/blocks/components/Chat/ChatBasicConversation.tsx
deleted file mode 100644
index 724e9a32c7..0000000000
--- a/packages/cli/templates/blocks/components/Chat/ChatBasicConversation.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {XDSAvatar} from '@xds/core/Avatar';
-import {
- XDSChatMessage,
- XDSChatMessageBubble,
- XDSChatMessageList,
-} from '@xds/core/Chat';
-
-export default function ChatBasicConversation() {
- return (
- <XDSChatMessageList>
- <XDSChatMessage
- sender="assistant"
- name="Navi"
- avatar={<XDSAvatar name="Navi" size="small" />}>
- <XDSChatMessageBubble>Hello! How can I help?</XDSChatMessageBubble>
- </XDSChatMessage>
- <XDSChatMessage sender="user" name="Cindy">
- <XDSChatMessageBubble>What's the status?</XDSChatMessageBubble>
- </XDSChatMessage>
- </XDSChatMessageList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Chat/ChatMessengerConversation.doc.mjs b/packages/cli/templates/blocks/components/Chat/ChatMessengerConversation.doc.mjs
new file mode 100644
index 0000000000..ee5da98cb0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatMessengerConversation.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Chat — Messenger Conversation',
+ description:
+ 'Messenger-style chat with avatars, grouped bubbles, system messages, and timestamps.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Chat', 'Avatar', 'Timestamp'],
+};
diff --git a/packages/cli/templates/blocks/components/Chat/ChatMessengerConversation.tsx b/packages/cli/templates/blocks/components/Chat/ChatMessengerConversation.tsx
new file mode 100644
index 0000000000..2005b99f74
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatMessengerConversation.tsx
@@ -0,0 +1,86 @@
+'use client';
+
+import {
+ XDSChatMessageList,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+ XDSChatMessageMetadata,
+ XDSChatSystemMessage,
+} from '@xds/core/Chat';
+import {XDSAvatar} from '@xds/core/Avatar';
+import {XDSTimestamp} from '@xds/core/Timestamp';
+
+const nameStyle = {
+ fontSize: 12,
+ fontWeight: 600,
+ color: '#666',
+ lineHeight: '16px',
+};
+
+export default function ChatMessengerConversation() {
+ return (
+ <div style={{height: 500, display: 'flex', flexDirection: 'column'}}>
+ <XDSChatMessageList>
+ <XDSChatSystemMessage variant="divider">Today</XDSChatSystemMessage>
+
+ <XDSChatMessage
+ sender="assistant"
+ avatar={<XDSAvatar name="Navi" size="small" />}>
+ <XDSChatMessageBubble
+ name={<span style={nameStyle}>Navi</span>}
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:30:00" format="time" />
+ }
+ />
+ }>
+ Hey! I looked at the PR and left a few comments on the density
+ styles.
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage
+ sender="user"
+ avatar={<XDSAvatar name="Cindy" size="small" />}>
+ <XDSChatMessageBubble
+ group="first"
+ name={<span style={nameStyle}>Cindy</span>}>
+ Thanks! I'll take a look.
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble
+ group="last"
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:31:00" format="time" />
+ }
+ status="read"
+ />
+ }>
+ Should be quick to fix.
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage
+ sender="assistant"
+ avatar={<XDSAvatar name="Navi" size="small" />}>
+ <XDSChatMessageBubble
+ name={<span style={nameStyle}>Navi</span>}
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:32:00" format="time" />
+ }
+ />
+ }>
+ Sounds good. The main thing is the compact radius — it should use
+ the container token, not the page token.
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatSystemMessage>Cindy liked a message</XDSChatSystemMessage>
+ </XDSChatMessageList>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Chat/ChatMixedContent.doc.mjs b/packages/cli/templates/blocks/components/Chat/ChatMixedContent.doc.mjs
new file mode 100644
index 0000000000..1dac70bf75
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatMixedContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Chat — Mixed Content',
+ description:
+ 'AI chat with multiple bubble variants, code blocks, file tokens, system messages, and markdown.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Chat', 'Markdown', 'Token', 'Stack', 'CodeBlock'],
+};
diff --git a/packages/cli/templates/blocks/components/Chat/ChatMixedContent.tsx b/packages/cli/templates/blocks/components/Chat/ChatMixedContent.tsx
new file mode 100644
index 0000000000..288a077199
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatMixedContent.tsx
@@ -0,0 +1,82 @@
+'use client';
+
+import {
+ XDSChatMessageList,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+ XDSChatSystemMessage,
+} from '@xds/core/Chat';
+import {XDSMarkdown} from '@xds/core/Markdown';
+import {XDSToken} from '@xds/core/Token';
+import {XDSHStack} from '@xds/core/Stack';
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+export default function ChatMixedContent() {
+ return (
+ <div style={{height: 600, display: 'flex', flexDirection: 'column'}}>
+ <XDSChatMessageList>
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ Show me the component files and explain the architecture
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="assistant">
+ <XDSChatMessageBubble>
+ Sure! Here's an overview of the component architecture.
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble variant="ghost">
+ <XDSMarkdown density="compact">{`The system uses a **compound component** pattern with three layers:
+
+1. **MessageList** — scrollable container with auto-scroll
+2. **Message** — layout wrapper with sender context
+3. **Bubble** — styled content container`}</XDSMarkdown>
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble variant="ghost">
+ <XDSMarkdown density="compact">Here are the files:</XDSMarkdown>
+ <XDSHStack gap={2} wrap="wrap">
+ <XDSToken label="Button.tsx" />
+ <XDSToken label="Card.tsx" />
+ <XDSToken label="Dialog.tsx" />
+ </XDSHStack>
+ <XDSCodeBlock
+ code={
+ "export * from './Button';\nexport * from './Card';\nexport * from './Dialog';"
+ }
+ language="typescript"
+ />
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble>
+ Let me know which one to open — I can walk through the
+ implementation.
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>Open Button.tsx</XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatSystemMessage>Navi opened Button.tsx</XDSChatSystemMessage>
+
+ <XDSChatMessage sender="assistant">
+ <XDSChatMessageBubble variant="ghost">
+ <XDSCodeBlock
+ code={`export function XDSButton({ label, variant = 'primary' }) {
+ return (
+ <button className={styles[variant]}>
+ {label}
+ </button>
+ );
+}`}
+ language="tsx"
+ />
+ <XDSMarkdown density="compact">
+ The Button reads variant from props and maps it to the matching
+ style.
+ </XDSMarkdown>
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ </XDSChatMessageList>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Chat/ChatMultiBubbleGrouping.doc.mjs b/packages/cli/templates/blocks/components/Chat/ChatMultiBubbleGrouping.doc.mjs
new file mode 100644
index 0000000000..a31304a822
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatMultiBubbleGrouping.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Chat — Multi-Bubble Grouping',
+ description:
+ 'Consecutive messages grouped with first/middle/last bubble shapes, timestamps, and delivery status.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Chat', 'Avatar', 'Timestamp'],
+};
diff --git a/packages/cli/templates/blocks/components/Chat/ChatMultiBubbleGrouping.tsx b/packages/cli/templates/blocks/components/Chat/ChatMultiBubbleGrouping.tsx
new file mode 100644
index 0000000000..c575878225
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatMultiBubbleGrouping.tsx
@@ -0,0 +1,76 @@
+'use client';
+
+import {
+ XDSChatMessageList,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+ XDSChatMessageMetadata,
+} from '@xds/core/Chat';
+import {XDSAvatar} from '@xds/core/Avatar';
+import {XDSTimestamp} from '@xds/core/Timestamp';
+
+export default function ChatMultiBubbleGrouping() {
+ return (
+ <div style={{height: 500, display: 'flex', flexDirection: 'column'}}>
+ <XDSChatMessageList>
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble group="first">
+ Hey, can you review my PR?
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble group="middle">
+ It's the one for the chat components
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble
+ group="last"
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:31:00" format="time" />
+ }
+ status="delivered"
+ />
+ }>
+ Link: github.com/xds/pull/1180
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage
+ sender="assistant"
+ avatar={<XDSAvatar name="Navi" size="small" />}>
+ <XDSChatMessageBubble group="first">
+ Sure, looking at it now!
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble group="middle">
+ The compound pattern looks solid. A few minor comments on the
+ density styles.
+ </XDSChatMessageBubble>
+ <XDSChatMessageBubble
+ group="last"
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:33:00" format="time" />
+ }
+ />
+ }>
+ I'll leave them as review comments.
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:34:00" format="time" />
+ }
+ status="sending"
+ />
+ }>
+ Thanks, will address those
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ </XDSChatMessageList>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Chat/ChatSimpleConversation.doc.mjs b/packages/cli/templates/blocks/components/Chat/ChatSimpleConversation.doc.mjs
new file mode 100644
index 0000000000..bd84a3bf09
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatSimpleConversation.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Chat — Simple Conversation',
+ description:
+ 'Basic user/assistant exchange with markdown response, timestamps, and message metadata.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Chat', 'Markdown', 'Timestamp'],
+};
diff --git a/packages/cli/templates/blocks/components/Chat/ChatSimpleConversation.tsx b/packages/cli/templates/blocks/components/Chat/ChatSimpleConversation.tsx
new file mode 100644
index 0000000000..6c3b1611eb
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Chat/ChatSimpleConversation.tsx
@@ -0,0 +1,47 @@
+'use client';
+
+import {
+ XDSChatMessageList,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+ XDSChatMessageMetadata,
+} from '@xds/core/Chat';
+import {XDSMarkdown} from '@xds/core/Markdown';
+import {XDSTimestamp} from '@xds/core/Timestamp';
+
+export default function ChatSimpleConversation() {
+ return (
+ <XDSChatMessageList>
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:30:00" format="time" />
+ }
+ status="read"
+ />
+ }>
+ How should I handle state management in a React app?
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ <XDSChatMessage sender="assistant">
+ <XDSMarkdown density="compact">{`For most cases, **React's built-in state** is sufficient:
+
+- \`useState\` for local component state
+- \`useReducer\` for complex state logic
+- \`useContext\` for shared state across a subtree
+
+For **server state**, use a library like **TanStack Query** or **SWR** — they handle caching, revalidation, and loading states out of the box.
+
+Avoid global state managers unless you have a genuine need for cross-cutting state.`}</XDSMarkdown>
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:30:30" format="time" />
+ }
+ footer={<span>Claude Opus 4.6</span>}
+ />
+ </XDSChatMessage>
+ </XDSChatMessageList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Chat/ChatSystemMessageWithDivider.doc.mjs b/packages/cli/templates/blocks/components/Chat/ChatSystemMessageWithDivider.doc.mjs
deleted file mode 100644
index af9a140b18..0000000000
--- a/packages/cli/templates/blocks/components/Chat/ChatSystemMessageWithDivider.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Chat — System Message With Divider',
- description: 'System message with divider variant for date separators.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Chat'],
-};
diff --git a/packages/cli/templates/blocks/components/Chat/ChatSystemMessageWithDivider.tsx b/packages/cli/templates/blocks/components/Chat/ChatSystemMessageWithDivider.tsx
deleted file mode 100644
index 58ccc02635..0000000000
--- a/packages/cli/templates/blocks/components/Chat/ChatSystemMessageWithDivider.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSChatSystemMessage} from '@xds/core/Chat';
-
-export default function ChatSystemMessageWithDivider() {
- return <XDSChatSystemMessage variant="divider">Today</XDSChatSystemMessage>;
-}
diff --git a/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithAttachments.doc.mjs b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithAttachments.doc.mjs
new file mode 100644
index 0000000000..ec2fad29c7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithAttachments.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatComposer — With Attachments',
+ description:
+ 'Chat composer with removable file attachment tokens and a context progress bar.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatComposer', 'Token', 'ProgressBar'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithAttachments.tsx b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithAttachments.tsx
new file mode 100644
index 0000000000..d40471bab1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithAttachments.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {
+ XDSChatComposer,
+ XDSChatComposerAttachments,
+} from '@xds/core/Chat';
+import {XDSToken} from '@xds/core/Token';
+import {XDSProgressBar} from '@xds/core/ProgressBar';
+
+export default function ChatComposerComposerWithAttachments() {
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ attachments={
+ <XDSChatComposerAttachments>
+ <XDSToken label="report.pdf" onRemove={() => {}} />
+ <XDSToken label="data.csv" onRemove={() => {}} />
+ </XDSChatComposerAttachments>
+ }
+ headerContext={
+ <XDSProgressBar label="Context window" value={3} isLabelHidden />
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithError.doc.mjs b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithError.doc.mjs
new file mode 100644
index 0000000000..ad7bed7b17
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithError.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatComposer — Error Status',
+ description:
+ 'Chat composer displaying an error status message below the input.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatComposer'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithError.tsx b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithError.tsx
new file mode 100644
index 0000000000..be835ea202
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerComposerWithError.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSChatComposer} from '@xds/core/Chat';
+
+export default function ChatComposerComposerWithError() {
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ status={{
+ type: 'error',
+ message: 'Failed to send message. Please try again.',
+ }}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatComposer/ChatComposerFullFeaturedComposer.doc.mjs b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerFullFeaturedComposer.doc.mjs
new file mode 100644
index 0000000000..ee83bad011
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerFullFeaturedComposer.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatComposer — Full Featured',
+ description:
+ 'Chat composer with attachment tokens, context progress bar, and footer action buttons.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatComposer', 'Token', 'Button', 'ProgressBar'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatComposer/ChatComposerFullFeaturedComposer.tsx b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerFullFeaturedComposer.tsx
new file mode 100644
index 0000000000..19dbd183f6
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerFullFeaturedComposer.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {
+ XDSChatComposer,
+ XDSChatComposerAttachments,
+} from '@xds/core/Chat';
+import {XDSToken} from '@xds/core/Token';
+import {XDSButton} from '@xds/core/Button';
+import {XDSProgressBar} from '@xds/core/ProgressBar';
+
+export default function ChatComposerFullFeaturedComposer() {
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ placeholder="Ask me anything..."
+ attachments={
+ <XDSChatComposerAttachments>
+ <XDSToken label="design-spec.pdf" onRemove={() => {}} />
+ </XDSChatComposerAttachments>
+ }
+ headerContext={
+ <XDSProgressBar label="Context window" value={3} isLabelHidden />
+ }
+ footerActions={
+ <>
+ <XDSButton label="Auto" variant="ghost" size="md" />
+ <XDSButton label="Settings" variant="ghost" size="md" />
+ </>
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Section/SectionWashVariant.doc.mjs b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerSimpleComposer.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/Section/SectionWashVariant.doc.mjs
rename to packages/cli/templates/blocks/components/ChatComposer/ChatComposerSimpleComposer.doc.mjs
index 3f59d49bb7..ceee89daab 100644
--- a/packages/cli/templates/blocks/components/Section/SectionWashVariant.doc.mjs
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerSimpleComposer.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Section — Wash Variant',
- description: 'Section container with a wash background variant.',
+ name: 'ChatComposer — Simple',
+ description:
+ 'Minimal chat composer with a placeholder and submit handler.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Section', 'Layout'],
+ componentsUsed: ['ChatComposer'],
};
diff --git a/packages/cli/templates/blocks/components/ChatComposer/ChatComposerSimpleComposer.tsx b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerSimpleComposer.tsx
new file mode 100644
index 0000000000..985819a831
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposer/ChatComposerSimpleComposer.tsx
@@ -0,0 +1,12 @@
+'use client';
+
+import {XDSChatComposer} from '@xds/core/Chat';
+
+export default function ChatComposerSimpleComposer() {
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ placeholder="Type a message..."
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputControlledInput.doc.mjs b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputControlledInput.doc.mjs
new file mode 100644
index 0000000000..d8ddaf777b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputControlledInput.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatComposerInput — Controlled',
+ description:
+ 'Controlled chat input with live value display, showing two-way binding between composer and input.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatComposer', 'ChatComposerInput'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputControlledInput.tsx b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputControlledInput.tsx
new file mode 100644
index 0000000000..706d1f5dad
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputControlledInput.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSChatComposer, XDSChatComposerInput} from '@xds/core/Chat';
+
+export default function ChatComposerInputControlledInput() {
+ const [value, setValue] = useState('');
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
+ <XDSChatComposer
+ onSubmit={() => setValue('')}
+ value={value}
+ onChange={setValue}
+ input={
+ <XDSChatComposerInput
+ value={value}
+ onChange={setValue}
+ placeholder="Type a message..."
+ />
+ }
+ />
+ <div style={{fontSize: 12, fontFamily: 'monospace', color: '#888'}}>
+ Value: {JSON.stringify(value)}
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.doc.mjs b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.doc.mjs
new file mode 100644
index 0000000000..5250e1afac
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatComposerInput — Mention Trigger',
+ description:
+ 'Chat input with @ mention trigger that shows a typeahead menu with user names and roles.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatComposer', 'ChatComposerInput', 'Typeahead'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx
new file mode 100644
index 0000000000..34c7eca16d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx
@@ -0,0 +1,59 @@
+'use client';
+
+import {useState} from 'react';
+import {
+ XDSChatComposer,
+ XDSChatComposerInput,
+ type XDSChatComposerTrigger,
+} from '@xds/core/Chat';
+import {createStaticSource} from '@xds/core/Typeahead';
+import {XDSTypeaheadItem} from '@xds/core/Typeahead';
+import type {XDSSearchableItem} from '@xds/core/Typeahead';
+
+const USERS: XDSSearchableItem<{role: string}>[] = [
+ {id: 'cindy', label: 'Cindy Zhang', auxiliaryData: {role: 'Design Systems'}},
+ {id: 'alex', label: 'Alex Johnson', auxiliaryData: {role: 'Frontend'}},
+ {id: 'sam', label: 'Sam Rivera', auxiliaryData: {role: 'Backend'}},
+ {id: 'jordan', label: 'Jordan Lee', auxiliaryData: {role: 'Product'}},
+];
+
+const userSource = createStaticSource(USERS);
+
+export default function ChatComposerInputMentionTrigger() {
+ const [value, setValue] = useState('');
+
+ const mentionTrigger: XDSChatComposerTrigger = {
+ character: '@',
+ searchSource: userSource,
+ renderItem: item => (
+ <XDSTypeaheadItem
+ item={item}
+ description={(item.auxiliaryData as {role: string})?.role}
+ />
+ ),
+ onSelect: item => ({
+ value: `@${item.id}`,
+ label: item.label,
+ variant: 'blue' as const,
+ }),
+ };
+
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
+ <XDSChatComposer
+ onSubmit={() => setValue('')}
+ input={
+ <XDSChatComposerInput
+ value={value}
+ onChange={setValue}
+ triggers={[mentionTrigger]}
+ placeholder="Type @ to mention someone..."
+ />
+ }
+ />
+ <div style={{fontSize: 12, fontFamily: 'monospace', color: '#888'}}>
+ Value: {JSON.stringify(value)}
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputSlashCommands.doc.mjs b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputSlashCommands.doc.mjs
new file mode 100644
index 0000000000..f5c486601b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputSlashCommands.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatComposerInput — Slash Commands',
+ description:
+ 'Chat input with / command trigger that shows a typeahead menu with command descriptions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatComposer', 'ChatComposerInput', 'Typeahead'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputSlashCommands.tsx b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputSlashCommands.tsx
new file mode 100644
index 0000000000..9125c23332
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatComposerInput/ChatComposerInputSlashCommands.tsx
@@ -0,0 +1,50 @@
+'use client';
+
+import {
+ XDSChatComposer,
+ XDSChatComposerInput,
+ type XDSChatComposerTrigger,
+} from '@xds/core/Chat';
+import {createStaticSource} from '@xds/core/Typeahead';
+import {XDSTypeaheadItem} from '@xds/core/Typeahead';
+import type {XDSSearchableItem} from '@xds/core/Typeahead';
+
+const COMMANDS: XDSSearchableItem<{description: string}>[] = [
+ {id: 'summarize', label: 'summarize', auxiliaryData: {description: 'Summarize the conversation'}},
+ {id: 'translate', label: 'translate', auxiliaryData: {description: 'Translate text to another language'}},
+ {id: 'search', label: 'search', auxiliaryData: {description: 'Search the web or documents'}},
+ {id: 'code', label: 'code', auxiliaryData: {description: 'Generate or explain code'}},
+ {id: 'help', label: 'help', auxiliaryData: {description: 'Show available commands'}},
+];
+
+const commandSource = createStaticSource(COMMANDS);
+
+export default function ChatComposerInputSlashCommands() {
+ const commandTrigger: XDSChatComposerTrigger = {
+ character: '/',
+ searchSource: commandSource,
+ renderItem: item => (
+ <XDSTypeaheadItem
+ item={item}
+ description={(item.auxiliaryData as {description: string})?.description}
+ />
+ ),
+ onSelect: item => ({
+ value: `/${item.label}`,
+ label: `/${item.label}`,
+ variant: 'yellow' as const,
+ }),
+ };
+
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ input={
+ <XDSChatComposerInput
+ triggers={[commandTrigger]}
+ placeholder="Type / for commands..."
+ />
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationInComposer.doc.mjs b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationInComposer.doc.mjs
new file mode 100644
index 0000000000..bc4005b313
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationInComposer.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatDictation — In Composer',
+ description:
+ 'Dictation button placed in the sendActions slot of a chat composer.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatDictation', 'ChatComposer'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationInComposer.tsx b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationInComposer.tsx
new file mode 100644
index 0000000000..e34b3ee004
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationInComposer.tsx
@@ -0,0 +1,33 @@
+'use client';
+
+import {
+ XDSChatDictationButton,
+ XDSChatComposer,
+} from '@xds/core/Chat';
+import type {UseSpeechRecognitionReturn} from '@xds/core/Chat';
+
+const noop = () => {};
+
+const idleDictation: UseSpeechRecognitionReturn = {
+ volume: 0,
+ rawBands: [0, 0, 0, 0, 0],
+ bands: [0, 0, 0, 0, 0],
+ isSupported: true,
+ isListening: false,
+ isSpeaking: false,
+ interimTranscript: '',
+ start: noop,
+ stop: noop,
+ abort: noop,
+ toggle: noop,
+};
+
+export default function ChatDictationDictationInComposer() {
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ placeholder="Type or tap the mic to dictate..."
+ sendActions={<XDSChatDictationButton dictation={idleDictation} />}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationStates.doc.mjs b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationStates.doc.mjs
new file mode 100644
index 0000000000..bcd547e1df
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationStates.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatDictation — States',
+ description:
+ 'Dictation button in idle, listening, and speaking states side by side.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatDictation'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationStates.tsx b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationStates.tsx
new file mode 100644
index 0000000000..64bd858f69
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatDictation/ChatDictationDictationStates.tsx
@@ -0,0 +1,67 @@
+'use client';
+
+import {XDSChatDictationButton} from '@xds/core/Chat';
+import type {UseSpeechRecognitionReturn} from '@xds/core/Chat';
+
+const noop = () => {};
+
+const idle: UseSpeechRecognitionReturn = {
+ volume: 0,
+ rawBands: [0, 0, 0, 0, 0],
+ bands: [0, 0, 0, 0, 0],
+ isSupported: true,
+ isListening: false,
+ isSpeaking: false,
+ interimTranscript: '',
+ start: noop,
+ stop: noop,
+ abort: noop,
+ toggle: noop,
+};
+
+const listening: UseSpeechRecognitionReturn = {
+ volume: 0.05,
+ rawBands: [0.08, 0.06, 0.04, 0.02, 0.01],
+ bands: [0.08, 0.06, 0.04, 0.02, 0.01],
+ isSupported: true,
+ isListening: true,
+ isSpeaking: false,
+ interimTranscript: '',
+ start: noop,
+ stop: noop,
+ abort: noop,
+ toggle: noop,
+};
+
+const speaking: UseSpeechRecognitionReturn = {
+ volume: 0.12,
+ rawBands: [0.15, 0.12, 0.08, 0.05, 0.02],
+ bands: [0.15, 0.12, 0.08, 0.05, 0.02],
+ isSupported: true,
+ isListening: true,
+ isSpeaking: true,
+ interimTranscript: 'hello world',
+ start: noop,
+ stop: noop,
+ abort: noop,
+ toggle: noop,
+};
+
+export default function ChatDictationDictationStates() {
+ return (
+ <div style={{display: 'flex', gap: 24, alignItems: 'center'}}>
+ <div style={{display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 8}}>
+ <XDSChatDictationButton dictation={idle} />
+ <span style={{fontSize: 12, color: '#888'}}>Idle</span>
+ </div>
+ <div style={{display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 8}}>
+ <XDSChatDictationButton dictation={listening} />
+ <span style={{fontSize: 12, color: '#888'}}>Listening</span>
+ </div>
+ <div style={{display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 8}}>
+ <XDSChatDictationButton dictation={speaking} />
+ <span style={{fontSize: 12, color: '#888'}}>Speaking</span>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutEmptyStateChat.doc.mjs b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutEmptyStateChat.doc.mjs
new file mode 100644
index 0000000000..7a6e56c6e7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutEmptyStateChat.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatLayout — Empty State',
+ description:
+ 'Chat layout showing an empty state placeholder with a docked composer below.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatLayout', 'ChatComposer', 'EmptyState'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutEmptyStateChat.tsx b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutEmptyStateChat.tsx
new file mode 100644
index 0000000000..1d971d8561
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutEmptyStateChat.tsx
@@ -0,0 +1,26 @@
+'use client';
+
+import {XDSChatLayout, XDSChatComposer} from '@xds/core/Chat';
+import {XDSEmptyState} from '@xds/core/EmptyState';
+
+export default function ChatLayoutEmptyStateChat() {
+ return (
+ <div style={{height: '100vh', display: 'flex', flexDirection: 'column'}}>
+ <XDSChatLayout
+ composer={
+ <XDSChatComposer
+ onSubmit={() => {}}
+ placeholder="Start a conversation\u2026"
+ />
+ }
+ emptyState={
+ <XDSEmptyState
+ title="No messages yet"
+ description="Start a conversation by typing below."
+ />
+ }>
+ {[]}
+ </XDSChatLayout>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutFullAIChat.doc.mjs b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutFullAIChat.doc.mjs
new file mode 100644
index 0000000000..e74cc60f96
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutFullAIChat.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatLayout — Full AI Chat',
+ description:
+ 'Full-page AI chat layout with message list, tool call results, code blocks, and a docked composer.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatLayout', 'Chat', 'ChatComposer', 'ChatToolCalls', 'Markdown', 'CodeBlock', 'Timestamp', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutFullAIChat.tsx b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutFullAIChat.tsx
new file mode 100644
index 0000000000..34230519fc
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutFullAIChat.tsx
@@ -0,0 +1,122 @@
+'use client';
+
+import {
+ XDSChatLayout,
+ XDSChatMessageList,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+ XDSChatMessageMetadata,
+ XDSChatSystemMessage,
+ XDSChatComposer,
+ XDSChatToolCalls,
+} from '@xds/core/Chat';
+import {XDSMarkdown} from '@xds/core/Markdown';
+import {XDSTimestamp} from '@xds/core/Timestamp';
+import {XDSButton} from '@xds/core/Button';
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+export default function ChatLayoutFullAIChat() {
+ return (
+ <div style={{height: '100vh', display: 'flex', flexDirection: 'column'}}>
+ <XDSChatLayout
+ composer={
+ <XDSChatComposer
+ onSubmit={() => {}}
+ placeholder="Ask about the codebase..."
+ footerActions={
+ <XDSButton label="Claude Opus" variant="ghost" size="md" />
+ }
+ />
+ }>
+ <XDSChatMessageList>
+ <XDSChatSystemMessage variant="divider">Today</XDSChatSystemMessage>
+
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:30:00" format="time" />
+ }
+ status="read"
+ />
+ }>
+ Can you review the Button component and fix the focus ring?
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="assistant">
+ <XDSMarkdown density="compact">
+ I'll read the Button component and check the focus styles.
+ </XDSMarkdown>
+ <XDSChatToolCalls
+ calls={[
+ {
+ key: '1',
+ name: 'read',
+ target: 'XDSButton.tsx',
+ status: 'complete',
+ duration: '45ms',
+ node: 'xds',
+ },
+ {
+ key: '2',
+ name: 'edit',
+ target: 'XDSButton.tsx',
+ status: 'complete',
+ duration: '120ms',
+ node: 'xds',
+ additions: 8,
+ deletions: 2,
+ resultDetail: (
+ <XDSCodeBlock
+ code={`:focus-visible {\n outline: 2px solid var(--color-ring-focus);\n outline-offset: 2px;\n}`}
+ language="css"
+ />
+ ),
+ },
+ {
+ key: '3',
+ name: 'bash',
+ target: 'yarn test',
+ status: 'complete',
+ duration: '6.1s',
+ node: 'xds',
+ resultDetail: (
+ <XDSCodeBlock
+ code={`$ yarn test\n✓ 24 tests passed (3 suites)`}
+ language="bash"
+ />
+ ),
+ },
+ ]}
+ />
+ <XDSMarkdown density="compact">{`Added a \`:focus-visible\` style with a 2px solid outline and 2px offset. All 24 Button tests pass.
+
+The focus ring meets **WCAG 2.4.7** requirements and uses the theme's focus color token.`}</XDSMarkdown>
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:31:00" format="time" />
+ }
+ footer={<span>Claude Opus 4.6</span>}
+ />
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble
+ metadata={
+ <XDSChatMessageMetadata
+ timestamp={
+ <XDSTimestamp value="2026-03-15T14:35:00" format="time" />
+ }
+ status="read"
+ />
+ }>
+ Nice, can you also check the Card component?
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ </XDSChatMessageList>
+ </XDSChatLayout>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.doc.mjs b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.doc.mjs
new file mode 100644
index 0000000000..25c848e858
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatLayout — Panel View',
+ description:
+ 'Narrow sidebar chat layout in a constrained container, suitable for side panels.',
+ isReady: true,
+ aspectRatio: 3 / 4,
+ componentsUsed: ['ChatLayout', 'Chat', 'ChatComposer', 'Markdown'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx
new file mode 100644
index 0000000000..5de817228d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx
@@ -0,0 +1,60 @@
+'use client';
+
+import {
+ XDSChatLayout,
+ XDSChatMessageList,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+ XDSChatSystemMessage,
+ XDSChatComposer,
+} from '@xds/core/Chat';
+import {XDSMarkdown} from '@xds/core/Markdown';
+
+export default function ChatLayoutPanelChat() {
+ return (
+ <div
+ style={{
+ width: 400,
+ height: 600,
+ border: '1px solid #ccc',
+ borderRadius: 8,
+ overflow: 'hidden',
+ }}>
+ <XDSChatLayout
+ composer={
+ <XDSChatComposer
+ onSubmit={() => {}}
+ placeholder="Ask something..."
+ />
+ }>
+ <XDSChatMessageList>
+ <XDSChatSystemMessage variant="divider">Today</XDSChatSystemMessage>
+
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ Can you review the Button component and fix the focus ring?
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="assistant">
+ <XDSMarkdown density="compact">{`I'll check the Button component now.
+
+Found the issue — the border radius was hardcoded. Replaced with the theme token.`}</XDSMarkdown>
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ Nice, can you also check the Card component?
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+
+ <XDSChatMessage sender="assistant">
+ <XDSMarkdown density="compact">{`Checking the component now.
+
+Found the issue — the border radius was hardcoded. Replaced with the theme token.`}</XDSMarkdown>
+ </XDSChatMessage>
+ </XDSChatMessageList>
+ </XDSChatLayout>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMixedVariantTokens.doc.mjs b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMixedVariantTokens.doc.mjs
new file mode 100644
index 0000000000..323c0136cc
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMixedVariantTokens.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatTokenizedText — Mixed Variants',
+ description:
+ 'Message with tokens using different color variants for mentions, bugs, and features.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatTokenizedText', 'Chat'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMixedVariantTokens.tsx b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMixedVariantTokens.tsx
new file mode 100644
index 0000000000..ec45b1c373
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMixedVariantTokens.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {
+ XDSChatTokenizedText,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+} from '@xds/core/Chat';
+
+const tokens = [
+ {value: '@cindy', label: '@Cindy', variant: 'blue' as const},
+ {value: '#bug', label: '#bug', variant: 'red' as const},
+ {value: '#feat', label: '#feature', variant: 'green' as const},
+];
+
+export default function ChatTokenizedTextMixedVariantTokens() {
+ return (
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ <XDSChatTokenizedText tokens={tokens}>
+ @cindy filed #bug and #feat for the sprint
+ </XDSChatTokenizedText>
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMultipleMentions.doc.mjs b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMultipleMentions.doc.mjs
new file mode 100644
index 0000000000..9404756a9c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMultipleMentions.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatTokenizedText — Multiple Mentions',
+ description:
+ 'Message with multiple @mention tokens resolved to display names inline.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatTokenizedText', 'Chat'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMultipleMentions.tsx b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMultipleMentions.tsx
new file mode 100644
index 0000000000..8cfcf31696
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextMultipleMentions.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {
+ XDSChatTokenizedText,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+} from '@xds/core/Chat';
+
+const tokens = [
+ {value: '@cindy', label: '@Cindy Zhang', variant: 'blue' as const},
+ {value: '@navi', label: '@Navi', variant: 'blue' as const},
+ {value: '@alex', label: '@Alex Rivera', variant: 'blue' as const},
+];
+
+export default function ChatTokenizedTextMultipleMentions() {
+ return (
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ <XDSChatTokenizedText tokens={tokens}>
+ @cindy and @alex can @navi help with the review?
+ </XDSChatTokenizedText>
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextSingleMention.doc.mjs b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextSingleMention.doc.mjs
new file mode 100644
index 0000000000..0d3a8bc305
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextSingleMention.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatTokenizedText — Single Mention',
+ description:
+ 'Message with a single @mention token highlighted inline.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatTokenizedText', 'Chat'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextSingleMention.tsx b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextSingleMention.tsx
new file mode 100644
index 0000000000..fe7a98516f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatTokenizedText/ChatTokenizedTextSingleMention.tsx
@@ -0,0 +1,23 @@
+'use client';
+
+import {
+ XDSChatTokenizedText,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+} from '@xds/core/Chat';
+
+const tokens = [
+ {value: '@cindy', label: '@Cindy Zhang', variant: 'blue' as const},
+];
+
+export default function ChatTokenizedTextSingleMention() {
+ return (
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ <XDSChatTokenizedText tokens={tokens}>
+ Hey @cindy can you review this?
+ </XDSChatTokenizedText>
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsInteractiveToolCalls.doc.mjs b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsInteractiveToolCalls.doc.mjs
new file mode 100644
index 0000000000..cc75914256
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsInteractiveToolCalls.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatToolCalls — Interactive',
+ description:
+ 'Tool calls with expandable result details showing diffs and test output in code blocks.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatToolCalls', 'CodeBlock'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsInteractiveToolCalls.tsx b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsInteractiveToolCalls.tsx
new file mode 100644
index 0000000000..c2a92451b5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsInteractiveToolCalls.tsx
@@ -0,0 +1,68 @@
+'use client';
+
+import {XDSChatToolCalls} from '@xds/core/Chat';
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+const editDiff = `--- a/packages/core/src/Button/XDSButton.tsx
++++ b/packages/core/src/Button/XDSButton.tsx
+@@ -55,7 +55,7 @@
+- borderRadius: 'var(--button-radius)',
++ borderRadius: 'var(--button-radius, var(--radius-element))',
+@@ -93,6 +93,10 @@
++ focusVisible: {
++ outline: '2px solid var(--color-ring-focus)',
++ outlineOffset: '2px',
++ },`;
+
+const testOutput = `$ yarn test
+ PASS packages/core/src/Button/XDSButton.test.tsx
+ PASS packages/core/src/Chat/XDSChatToolCalls.test.tsx
+
+Test Suites: 7 passed, 7 total
+Tests: 67 passed, 67 total
+Time: 6.1s`;
+
+export default function ChatToolCallsInteractiveToolCalls() {
+ return (
+ <XDSChatToolCalls
+ calls={[
+ {
+ name: 'edit',
+ target: 'XDSButton.tsx',
+ status: 'complete',
+ duration: '85ms',
+ node: 'cli:devvm',
+ additions: 12,
+ deletions: 3,
+ resultDetail: (
+ <XDSCodeBlock
+ code={editDiff}
+ language="typescript"
+ maxHeight="50vh"
+ />
+ ),
+ },
+ {
+ name: 'bash',
+ target: 'yarn test',
+ status: 'complete',
+ duration: '6.1s',
+ node: 'cli:devvm',
+ resultDetail: (
+ <XDSCodeBlock
+ code={testOutput}
+ language="bash"
+ maxHeight="50vh"
+ />
+ ),
+ },
+ {
+ name: 'web_search',
+ target: 'CSS anchor positioning',
+ status: 'complete',
+ duration: '1.8s',
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsMultipleToolCalls.doc.mjs b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsMultipleToolCalls.doc.mjs
new file mode 100644
index 0000000000..b4f860c55e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsMultipleToolCalls.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatToolCalls — Multiple Calls',
+ description:
+ 'Collapsible group of completed tool calls with duration and diff stats.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatToolCalls'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsMultipleToolCalls.tsx b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsMultipleToolCalls.tsx
new file mode 100644
index 0000000000..8b06a1c731
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsMultipleToolCalls.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {XDSChatToolCalls} from '@xds/core/Chat';
+
+export default function ChatToolCallsMultipleToolCalls() {
+ return (
+ <XDSChatToolCalls
+ calls={[
+ {
+ name: 'bash',
+ target: 'git diff --stat',
+ status: 'complete',
+ duration: '340ms',
+ },
+ {
+ name: 'read',
+ target: 'src/Button.tsx',
+ status: 'complete',
+ duration: '45ms',
+ },
+ {
+ name: 'edit',
+ target: 'src/Button.tsx',
+ status: 'complete',
+ duration: '120ms',
+ additions: 12,
+ deletions: 3,
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithErrors.doc.mjs b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithErrors.doc.mjs
new file mode 100644
index 0000000000..574a4a2287
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithErrors.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatToolCalls — With Errors',
+ description:
+ 'Tool call group with a failed test run showing error output in a code block detail.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatToolCalls', 'CodeBlock'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithErrors.tsx b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithErrors.tsx
new file mode 100644
index 0000000000..b99e50a593
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithErrors.tsx
@@ -0,0 +1,54 @@
+'use client';
+
+import {XDSChatToolCalls} from '@xds/core/Chat';
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+const errorOutput = `$ yarn test
+ PASS packages/core/src/Chat/XDSChatReasoning.test.tsx (7 tests)
+ FAIL packages/core/src/Chat/XDSChatToolCalls.test.tsx
+
+ ● XDSChatToolCalls > renders group header for multiple calls
+
+ ReferenceError: hasError is not defined
+
+Test Suites: 1 failed, 6 passed, 7 total
+Tests: 4 failed, 63 passed, 67 total
+Time: 6.84s`;
+
+export default function ChatToolCallsToolCallsWithErrors() {
+ return (
+ <XDSChatToolCalls
+ calls={[
+ {
+ name: 'bash',
+ target: 'yarn build',
+ status: 'complete',
+ duration: '8s',
+ node: 'cli:devvm',
+ },
+ {
+ name: 'read',
+ target: 'XDSChatToolCalls.tsx',
+ status: 'complete',
+ duration: '15ms',
+ node: 'cli:devvm',
+ },
+ {
+ name: 'bash',
+ target: 'yarn test',
+ status: 'error',
+ duration: '6.8s',
+ node: 'cli:devvm',
+ errorMessage: '4 tests failed',
+ resultDetail: (
+ <XDSCodeBlock
+ code={errorOutput}
+ language="bash"
+ maxHeight="50vh"
+ />
+ ),
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithNodes.doc.mjs b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithNodes.doc.mjs
new file mode 100644
index 0000000000..ccaf64fa7b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithNodes.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ChatToolCalls — With Nodes',
+ description:
+ 'Tool calls with node badges showing which sandbox or environment ran each tool.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ChatToolCalls'],
+};
diff --git a/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithNodes.tsx b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithNodes.tsx
new file mode 100644
index 0000000000..246753112a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ChatToolCalls/ChatToolCallsToolCallsWithNodes.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import {XDSChatToolCalls} from '@xds/core/Chat';
+
+export default function ChatToolCallsToolCallsWithNodes() {
+ return (
+ <XDSChatToolCalls
+ calls={[
+ {
+ name: 'bash',
+ target: 'yarn test',
+ status: 'complete',
+ duration: '4.2s',
+ node: 'cli:devvm',
+ },
+ {
+ name: 'bash',
+ target: 'yarn build',
+ status: 'complete',
+ duration: '12s',
+ node: 'cli:devvm',
+ },
+ {
+ name: 'read',
+ target: 'README.md',
+ status: 'complete',
+ duration: '30ms',
+ node: 'workspace',
+ },
+ {
+ name: 'web_search',
+ target: 'CSS anchor positioning',
+ status: 'complete',
+ duration: '1.8s',
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputAsyncAction.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputAsyncAction.tsx
deleted file mode 100644
index c21b310d48..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputAsyncAction.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
-import {useState} from 'react';
-
-export default function CheckboxInputAsyncAction() {
- const [enabled, setEnabled] = useState(false);
- return (
- <XDSCheckboxInput
- label="Enable feature"
- value={enabled}
- onChange={setEnabled}
- onChangeAction={async () => {
- await new Promise((resolve) => setTimeout(resolve, 1000));
- }}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputBasic.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputBasic.tsx
deleted file mode 100644
index 786860d7d5..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputBasic.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client';
-
-import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
-import {useState} from 'react';
-
-export default function CheckboxInputBasic() {
- const [accepted, setAccepted] = useState(false);
- return (
- <XDSCheckboxInput
- label="Accept terms and conditions"
- value={accepted}
- onChange={setAccepted}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputBasic.doc.mjs b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabledCheckbox.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputBasic.doc.mjs
rename to packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabledCheckbox.doc.mjs
index 5fda5af1b7..7f50f9ebcf 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabledCheckbox.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxInput — Basic',
- description: 'Basic checkbox for toggling a boolean value.',
+ name: 'CheckboxInput — Disabled Checkbox',
+ description:
+ 'Disabled checkbox with a description explaining why the option is unavailable.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxInput'],
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabled.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabledCheckbox.tsx
similarity index 51%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabled.tsx
rename to packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabledCheckbox.tsx
index ce8fad4b08..12c5f26259 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabled.tsx
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabledCheckbox.tsx
@@ -1,14 +1,16 @@
'use client';
+import {useState} from 'react';
import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
-export default function CheckboxInputDisabled() {
+export default function CheckboxInputDisabledCheckbox() {
+ const [value, setValue] = useState<boolean | 'indeterminate'>(false);
return (
<XDSCheckboxInput
label="Premium feature"
description="Upgrade to enable this option"
- value={false}
- onChange={() => {}}
+ value={value}
+ onChange={setValue}
isDisabled
/>
);
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputHiddenLabel.doc.mjs b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputHiddenLabel.doc.mjs
deleted file mode 100644
index 25eefd598e..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputHiddenLabel.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'CheckboxInput — Hidden Label',
- description: 'Checkbox with a visually hidden label for compact layouts.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['CheckboxInput'],
-};
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputHiddenLabel.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputHiddenLabel.tsx
deleted file mode 100644
index a4e9fa506d..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputHiddenLabel.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
-import {useState} from 'react';
-
-export default function CheckboxInputHiddenLabel() {
- const [selected, setSelected] = useState(false);
- return (
- <XDSCheckboxInput
- label="Select row"
- isLabelHidden
- value={selected}
- onChange={setSelected}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminate.doc.mjs b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminate.doc.mjs
deleted file mode 100644
index b91dbd5344..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminate.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'CheckboxInput — Indeterminate',
- description: 'Checkbox with indeterminate state for select-all patterns.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['CheckboxInput'],
-};
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabled.doc.mjs b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminateState.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabled.doc.mjs
rename to packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminateState.doc.mjs
index a808115c8b..ddc88ee6eb 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputDisabled.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminateState.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxInput — Disabled',
- description: 'Disabled checkbox with description explaining the restriction.',
+ name: 'CheckboxInput — Indeterminate State',
+ description:
+ 'Checkbox in the indeterminate state, useful for "select all" patterns with partial selection.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxInput'],
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminate.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminateState.tsx
similarity index 68%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminate.tsx
rename to packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminateState.tsx
index 5daa71220c..45b79085b8 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminate.tsx
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputIndeterminateState.tsx
@@ -1,15 +1,16 @@
'use client';
-import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
import {useState} from 'react';
+import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
-export default function CheckboxInputIndeterminate() {
+export default function CheckboxInputIndeterminateState() {
const [value, setValue] = useState<boolean | 'indeterminate'>('indeterminate');
return (
<XDSCheckboxInput
label="Select all items"
+ description="Some items are selected"
value={value}
- onChange={(checked) => setValue(checked)}
+ onChange={setValue}
/>
);
}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputSmallSize.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputSmallSize.tsx
deleted file mode 100644
index 3785f951d8..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputSmallSize.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
-import {useState} from 'react';
-
-export default function CheckboxInputSmallSize() {
- const [checked, setChecked] = useState(false);
- return (
- <XDSCheckboxInput
- label="Compact checkbox"
- value={checked}
- onChange={setChecked}
- size="sm"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputAsyncAction.doc.mjs b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputStatusVariations.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputAsyncAction.doc.mjs
rename to packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputStatusVariations.doc.mjs
index c030385c3e..277cc1749f 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputAsyncAction.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputStatusVariations.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxInput — Async Action',
- description: 'Checkbox with async action that shows a loading spinner while pending.',
+ name: 'CheckboxInput — Status Variations',
+ description:
+ 'Multiple checkboxes showing error, warning, and success status messages.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxInput'],
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputStatusVariations.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputStatusVariations.tsx
new file mode 100644
index 0000000000..3469cc2789
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputStatusVariations.tsx
@@ -0,0 +1,33 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
+
+export default function CheckboxInputStatusVariations() {
+ const [value1, setValue1] = useState<boolean | 'indeterminate'>(false);
+ const [value2, setValue2] = useState<boolean | 'indeterminate'>(true);
+ const [value3, setValue3] = useState<boolean | 'indeterminate'>(true);
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 24, maxWidth: 400}}>
+ <XDSCheckboxInput
+ label="Accept terms and conditions"
+ value={value1}
+ onChange={setValue1}
+ status={{type: 'error', message: 'You must accept the terms to continue'}}
+ />
+ <XDSCheckboxInput
+ label="Share usage data"
+ description="Help us improve by sharing anonymous usage statistics"
+ value={value2}
+ onChange={setValue2}
+ status={{type: 'warning', message: 'This data may be shared with partners'}}
+ />
+ <XDSCheckboxInput
+ label="Email verified"
+ value={value3}
+ onChange={setValue3}
+ status={{type: 'success', message: 'Your email has been verified'}}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.doc.mjs b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.doc.mjs
index 4fe15dabc0..1f9b744bfd 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'CheckboxInput — With Description',
- description: 'Checkbox with descriptive helper text below the label.',
+ description:
+ 'Checkbox with a descriptive helper text below the label.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxInput'],
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.tsx
index 338ecce50c..f77a1f68a0 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.tsx
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithDescription.tsx
@@ -1,16 +1,16 @@
'use client';
-import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
import {useState} from 'react';
+import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
export default function CheckboxInputWithDescription() {
- const [subscribed, setSubscribed] = useState(false);
+ const [value, setValue] = useState<boolean | 'indeterminate'>(false);
return (
<XDSCheckboxInput
label="Subscribe to newsletter"
- description="Receive weekly updates about new features"
- value={subscribed}
- onChange={setSubscribed}
+ description="Receive weekly updates about new features and announcements."
+ value={value}
+ onChange={setValue}
/>
);
}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputSmallSize.doc.mjs b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithErrorStatus.doc.mjs
similarity index 61%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputSmallSize.doc.mjs
rename to packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithErrorStatus.doc.mjs
index 949fc8161c..f03e6ed0d6 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputSmallSize.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithErrorStatus.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxInput — Small Size',
- description: 'Compact checkbox using the sm size variant.',
+ name: 'CheckboxInput — With Error Status',
+ description:
+ 'Checkbox displaying a validation error message.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxInput'],
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithError.tsx b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithErrorStatus.tsx
similarity index 51%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithError.tsx
rename to packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithErrorStatus.tsx
index a2ac46ce88..668a4bbb06 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithError.tsx
+++ b/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithErrorStatus.tsx
@@ -1,15 +1,15 @@
'use client';
-import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
import {useState} from 'react';
+import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
-export default function CheckboxInputWithError() {
- const [accepted, setAccepted] = useState(false);
+export default function CheckboxInputWithErrorStatus() {
+ const [value, setValue] = useState<boolean | 'indeterminate'>(false);
return (
<XDSCheckboxInput
- label="Accept terms"
- value={accepted}
- onChange={setAccepted}
+ label="Accept terms and conditions"
+ value={value}
+ onChange={setValue}
status={{type: 'error', message: 'You must accept the terms to continue'}}
/>
);
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListBasicCollectionMode.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListBasicCollectionMode.tsx
deleted file mode 100644
index e162073581..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListBasicCollectionMode.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
-
-export default function CheckboxListBasicCollectionMode() {
- const [selected, setSelected] = useState<string[]>([]);
-
- return (
- <XDSCheckboxList label="Notifications" value={selected} onChange={setSelected}>
- <XDSCheckboxListItem label="Email" value="email" />
- <XDSCheckboxListItem label="SMS" value="sms" />
- <XDSCheckboxListItem label="Push" value="push" />
- </XDSCheckboxList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDisabledGroup.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDisabledGroup.tsx
deleted file mode 100644
index 39903e36bc..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDisabledGroup.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
-
-export default function CheckboxListDisabledGroup() {
- return (
- <XDSCheckboxList
- label="Locked selections"
- value={['email']}
- onChange={() => {}}
- isDisabled>
- <XDSCheckboxListItem label="Email" value="email" />
- <XDSCheckboxListItem label="SMS" value="sms" />
- </XDSCheckboxList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListBasicCollectionMode.doc.mjs b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDynamicItems.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/CheckboxList/CheckboxListBasicCollectionMode.doc.mjs
rename to packages/cli/templates/blocks/components/CheckboxList/CheckboxListDynamicItems.doc.mjs
index 0f2a46bb8d..0ad4e6352e 100644
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListBasicCollectionMode.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDynamicItems.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxList — Basic Collection Mode',
- description: 'Checkbox group with parent-managed state for multi-value selection.',
+ name: 'CheckboxList — Dynamic Items',
+ description:
+ 'Checkbox list rendered from an array of data with pre-selected defaults.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxList'],
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDynamicItems.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDynamicItems.tsx
new file mode 100644
index 0000000000..afa0d83fee
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDynamicItems.tsx
@@ -0,0 +1,26 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
+
+const frameworks = [
+ {id: 'react', label: 'React'},
+ {id: 'vue', label: 'Vue'},
+ {id: 'angular', label: 'Angular'},
+ {id: 'svelte', label: 'Svelte'},
+];
+
+export default function CheckboxListDynamicItems() {
+ const [value, setValue] = useState<string[]>(['react']);
+ return (
+ <XDSCheckboxList label="Frameworks" value={value} onChange={setValue}>
+ {frameworks.map(item => (
+ <XDSCheckboxListItem
+ key={item.id}
+ label={item.label}
+ value={item.id}
+ />
+ ))}
+ </XDSCheckboxList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListInsideCard.doc.mjs b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListInsideCard.doc.mjs
new file mode 100644
index 0000000000..6d190b744a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListInsideCard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CheckboxList — Inside Card',
+ description:
+ 'Checkbox list inside a card with mixed item states including a disabled option.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CheckboxList', 'Card'],
+};
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListInsideCard.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListInsideCard.tsx
new file mode 100644
index 0000000000..db50c51f0f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListInsideCard.tsx
@@ -0,0 +1,28 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
+import {XDSCard} from '@xds/core/Card';
+
+export default function CheckboxListInsideCard() {
+ const [selected, setSelected] = useState<string[]>(['email']);
+ return (
+ <div style={{maxWidth: 400}}>
+ <XDSCard>
+ <XDSCheckboxList
+ label="Notifications"
+ description="Choose how to be notified"
+ value={selected}
+ onChange={setSelected}>
+ <XDSCheckboxListItem
+ value="email"
+ label="Email"
+ description="Weekly digest"
+ />
+ <XDSCheckboxListItem value="push" label="Push notifications" />
+ <XDSCheckboxListItem value="sms" label="SMS" isDisabled />
+ </XDSCheckboxList>
+ </XDSCard>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithStatus.doc.mjs b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithStatus.doc.mjs
rename to packages/cli/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.doc.mjs
index e6ac061238..ecf970a958 100644
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithStatus.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxList — With Status',
- description: 'Checkbox group displaying an error validation message.',
+ name: 'CheckboxList — Select All With Indeterminate',
+ description:
+ 'Checkbox list with a "select all" item that shows indeterminate state for partial selection.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxList'],
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.tsx
new file mode 100644
index 0000000000..9d0a82f039
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.tsx
@@ -0,0 +1,44 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
+
+const allItems = ['email', 'sms', 'push'];
+
+export default function CheckboxListSelectAllPattern() {
+ const [selected, setSelected] = useState<string[]>(['email']);
+
+ const allChecked = allItems.every(item => selected.includes(item));
+ const noneChecked = selected.length === 0;
+ const selectAllState = allChecked
+ ? true
+ : noneChecked
+ ? false
+ : ('indeterminate' as const);
+
+ const handleSelectAll = (checked: boolean) => {
+ setSelected(checked ? [...allItems] : []);
+ };
+
+ return (
+ <XDSCheckboxList label="Notifications" hasDividers>
+ <XDSCheckboxListItem
+ label="Select all"
+ isChecked={selectAllState}
+ onCheck={handleSelectAll}
+ />
+ {allItems.map(item => (
+ <XDSCheckboxListItem
+ key={item}
+ label={item.charAt(0).toUpperCase() + item.slice(1)}
+ isChecked={selected.includes(item)}
+ onCheck={checked => {
+ setSelected(prev =>
+ checked ? [...prev, item] : prev.filter(v => v !== item),
+ );
+ }}
+ />
+ ))}
+ </XDSCheckboxList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListStandaloneMode.doc.mjs b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListStandaloneMode.doc.mjs
deleted file mode 100644
index b701ba1522..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListStandaloneMode.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'CheckboxList — Standalone Mode',
- description: 'Individual checkbox items with independent state inside a list.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['CheckboxList', 'List'],
-};
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListStandaloneMode.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListStandaloneMode.tsx
deleted file mode 100644
index 727481994b..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListStandaloneMode.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSCheckboxListItem} from '@xds/core/CheckboxList';
-import {XDSList} from '@xds/core/List';
-
-export default function CheckboxListStandaloneMode() {
- const [accepted, setAccepted] = useState(false);
- const [subscribed, setSubscribed] = useState(false);
-
- return (
- <XDSList>
- <XDSCheckboxListItem
- label="Accept terms"
- isChecked={accepted}
- onCheck={setAccepted}
- />
- <XDSCheckboxListItem
- label="Subscribe to newsletter"
- isChecked={subscribed}
- onCheck={setSubscribed}
- />
- </XDSList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.doc.mjs b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.doc.mjs
index a4ffa96dda..4f2aac4211 100644
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'CheckboxList — With Descriptions',
- description: 'Checkbox group with secondary text and dividers between items.',
+ description:
+ 'Checkbox list with item descriptions and dividers for a notification preferences form.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxList'],
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.tsx
index 8c706da6c0..a6a66a137f 100644
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.tsx
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithDescriptions.tsx
@@ -4,13 +4,13 @@ import {useState} from 'react';
import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
export default function CheckboxListWithDescriptions() {
- const [selected, setSelected] = useState<string[]>([]);
-
+ const [value, setValue] = useState<string[]>([]);
return (
<XDSCheckboxList
- label="Preferences"
- value={selected}
- onChange={setSelected}
+ label="Notification preferences"
+ description="Choose how you would like to be notified"
+ value={value}
+ onChange={setValue}
hasDividers>
<XDSCheckboxListItem
label="Email"
@@ -22,6 +22,11 @@ export default function CheckboxListWithDescriptions() {
value="sms"
description="Standard messaging rates apply"
/>
+ <XDSCheckboxListItem
+ label="Push notification"
+ value="push"
+ description="Instant alerts on your device"
+ />
</XDSCheckboxList>
);
}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDisabledGroup.doc.mjs b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithEndContent.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/CheckboxList/CheckboxListDisabledGroup.doc.mjs
rename to packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithEndContent.doc.mjs
index f00f66fb87..ca5d0b0a06 100644
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListDisabledGroup.doc.mjs
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithEndContent.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxList — Disabled Group',
- description: 'Checkbox group with all items disabled.',
+ name: 'CheckboxList — With End Content',
+ description:
+ 'Checkbox list items with pricing labels as end content for an add-on selection pattern.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CheckboxList'],
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithEndContent.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithEndContent.tsx
new file mode 100644
index 0000000000..dbbeecf24e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithEndContent.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
+
+export default function CheckboxListWithEndContent() {
+ const [value, setValue] = useState<string[]>(['free']);
+ return (
+ <XDSCheckboxList
+ label="Add-on packages"
+ value={value}
+ onChange={setValue}
+ hasDividers>
+ <XDSCheckboxListItem
+ label="Free tier"
+ value="free"
+ description="Basic features included"
+ endContent={<span style={{color: '#0D8626'}}>$0/mo</span>}
+ />
+ <XDSCheckboxListItem
+ label="Pro tier"
+ value="pro"
+ description="Advanced features"
+ endContent={<span style={{color: '#0064E0'}}>$9/mo</span>}
+ />
+ <XDSCheckboxListItem
+ label="Enterprise"
+ value="enterprise"
+ description="Custom solutions"
+ endContent={<span style={{color: '#5B08D8'}}>Custom</span>}
+ />
+ </XDSCheckboxList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithStatus.tsx b/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithStatus.tsx
deleted file mode 100644
index 68726c79b2..0000000000
--- a/packages/cli/templates/blocks/components/CheckboxList/CheckboxListWithStatus.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
-
-export default function CheckboxListWithStatus() {
- const [selected, setSelected] = useState<string[]>([]);
-
- return (
- <XDSCheckboxList
- label="Required selections"
- value={selected}
- onChange={setSelected}
- status={{type: 'error', message: 'Please select at least one option'}}>
- <XDSCheckboxListItem label="Option A" value="a" />
- <XDSCheckboxListItem label="Option B" value="b" />
- </XDSCheckboxList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Code/CodeAcrossTextSizes.doc.mjs b/packages/cli/templates/blocks/components/Code/CodeAcrossTextSizes.doc.mjs
new file mode 100644
index 0000000000..8c396e6516
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Code/CodeAcrossTextSizes.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Code — Across Text Sizes',
+ description:
+ 'Inline code rendered inside heading, body, detail, and label text to show size adaptation.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Code', 'Text', 'Stack'],
+};
diff --git a/packages/cli/templates/blocks/components/Code/CodeAcrossTextSizes.tsx b/packages/cli/templates/blocks/components/Code/CodeAcrossTextSizes.tsx
new file mode 100644
index 0000000000..9580328272
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Code/CodeAcrossTextSizes.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {XDSCode} from '@xds/core/CodeBlock';
+import {XDSText} from '@xds/core/Text';
+import {XDSHeading} from '@xds/core/Text';
+import {XDSVStack} from '@xds/core/Stack';
+
+export default function CodeAcrossTextSizes() {
+ return (
+ <XDSVStack gap={3}>
+ <XDSHeading level={3}>
+ Heading with <XDSCode>inline code</XDSCode>
+ </XDSHeading>
+ <XDSText type="body">
+ Body text with <XDSCode>inline code</XDSCode>
+ </XDSText>
+ <XDSText type="supporting">
+ Supporting text with <XDSCode>inline code</XDSCode>
+ </XDSText>
+ <XDSText type="label">
+ Label text with <XDSCode>inline code</XDSCode>
+ </XDSText>
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithError.doc.mjs b/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithError.doc.mjs
rename to packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.doc.mjs
index 44e72c2d66..cadbb7edf5 100644
--- a/packages/cli/templates/blocks/components/CheckboxInput/CheckboxInputWithError.doc.mjs
+++ b/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CheckboxInput — With Error',
- description: 'Checkbox displaying an error validation message.',
+ name: 'Code — Inline In Paragraph',
+ description:
+ 'Inline code snippets mixed within a paragraph of body text.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['CheckboxInput'],
+ componentsUsed: ['Code', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.tsx b/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.tsx
new file mode 100644
index 0000000000..7fdf2be9ac
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Code/CodeInlineInParagraph.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSCode} from '@xds/core/CodeBlock';
+import {XDSText} from '@xds/core/Text';
+
+export default function CodeInlineInParagraph() {
+ return (
+ <XDSText type="body">
+ Use <XDSCode>useState</XDSCode> for local state and{' '}
+ <XDSCode>useEffect</XDSCode> for side effects. If you need shared state
+ across components, consider <XDSCode>useContext</XDSCode> or a state
+ management library.
+ </XDSText>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Code/CodeInstructionalText.doc.mjs b/packages/cli/templates/blocks/components/Code/CodeInstructionalText.doc.mjs
new file mode 100644
index 0000000000..65e46b0dd3
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Code/CodeInstructionalText.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Code — Instructional Text',
+ description:
+ 'Step-by-step instructions with inline code for installation and usage.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Code', 'Text', 'Stack'],
+};
diff --git a/packages/cli/templates/blocks/components/Code/CodeInstructionalText.tsx b/packages/cli/templates/blocks/components/Code/CodeInstructionalText.tsx
new file mode 100644
index 0000000000..d635fa234c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Code/CodeInstructionalText.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {XDSCode} from '@xds/core/CodeBlock';
+import {XDSText} from '@xds/core/Text';
+import {XDSVStack} from '@xds/core/Stack';
+
+export default function CodeInstructionalText() {
+ return (
+ <XDSVStack gap={4}>
+ <XDSText type="body">
+ Install the package with <XDSCode>npm install @xds/core</XDSCode>, then
+ import the component:
+ </XDSText>
+ <XDSText type="body">
+ Add <XDSCode>{'<XDSButton label="Save">Save</XDSButton>'}</XDSCode> to
+ your JSX. The <XDSCode>label</XDSCode> prop is required for
+ accessibility.
+ </XDSText>
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Code/CodeVariousContent.doc.mjs b/packages/cli/templates/blocks/components/Code/CodeVariousContent.doc.mjs
new file mode 100644
index 0000000000..4316efe089
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Code/CodeVariousContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Code — Various Content Types',
+ description:
+ 'Inline code used for variables, commands, CSS properties, file paths, and keyboard shortcuts.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Code', 'Text', 'Stack'],
+};
diff --git a/packages/cli/templates/blocks/components/Code/CodeVariousContent.tsx b/packages/cli/templates/blocks/components/Code/CodeVariousContent.tsx
new file mode 100644
index 0000000000..56ebd7658c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Code/CodeVariousContent.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {XDSCode} from '@xds/core/CodeBlock';
+import {XDSText} from '@xds/core/Text';
+import {XDSVStack} from '@xds/core/Stack';
+
+export default function CodeVariousContent() {
+ return (
+ <XDSVStack gap={3}>
+ <XDSText type="body">
+ Variable: <XDSCode>const count = 0</XDSCode>
+ </XDSText>
+ <XDSText type="body">
+ Terminal: <XDSCode>yarn build --watch</XDSCode>
+ </XDSText>
+ <XDSText type="body">
+ CSS property: <XDSCode>border-radius: 8px</XDSCode>
+ </XDSText>
+ <XDSText type="body">
+ File path: <XDSCode>packages/core/src/CodeBlock/XDSCode.tsx</XDSCode>
+ </XDSText>
+ <XDSText type="body">
+ Keyboard shortcut: <XDSCode>Ctrl+Shift+P</XDSCode>
+ </XDSText>
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockTypeScriptWithLineNumbers.doc.mjs b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/CodeBlock/CodeBlockTypeScriptWithLineNumbers.doc.mjs
rename to packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.doc.mjs
index 616a76d6f7..6ff34315dc 100644
--- a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockTypeScriptWithLineNumbers.doc.mjs
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'CodeBlock — TypeScript With Line Numbers',
- description: 'Syntax-highlighted TypeScript code block with line numbers and title.',
+ name: 'CodeBlock — Bash Command',
+ description:
+ 'Minimal single-line bash command with a copy button.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['CodeBlock'],
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx
new file mode 100644
index 0000000000..c4a57b8d15
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockBashCommand.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+export default function CodeBlockBashCommand() {
+ return (
+ <XDSCodeBlock
+ code="npm install @xds/core"
+ language="bash"
+ hasCopyButton
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockHighlightedLines.doc.mjs b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockHighlightedLines.doc.mjs
new file mode 100644
index 0000000000..6d954c3f15
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockHighlightedLines.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CodeBlock — Highlighted Lines',
+ description:
+ 'Code block with specific lines highlighted to draw attention to a function.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CodeBlock'],
+};
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockHighlightedLines.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockHighlightedLines.tsx
new file mode 100644
index 0000000000..74f9e0f9aa
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockHighlightedLines.tsx
@@ -0,0 +1,41 @@
+'use client';
+
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+const code = `import {useState, useEffect} from 'react';
+
+interface User {
+ id: string;
+ name: string;
+ email: string;
+}
+
+async function fetchUser(id: string): Promise<User> {
+ const response = await fetch(\`/api/users/\${id}\`);
+ if (!response.ok) {
+ throw new Error(\`HTTP \${response.status}\`);
+ }
+ return response.json();
+}
+
+export function useUser(id: string) {
+ const [user, setUser] = useState<User | null>(null);
+
+ useEffect(() => {
+ fetchUser(id).then(setUser);
+ }, [id]);
+
+ return user;
+}`;
+
+export default function CodeBlockHighlightedLines() {
+ return (
+ <XDSCodeBlock
+ code={code}
+ language="typescript"
+ title="useUser.ts"
+ hasLineNumbers
+ highlightLines={[9, 10, 11, 12, 13]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockInlineCodeInText.doc.mjs b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockInlineCodeInText.doc.mjs
deleted file mode 100644
index 760235d048..0000000000
--- a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockInlineCodeInText.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'CodeBlock — Inline Code In Text',
- description: 'Inline code element styled with monospace font inside prose text.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['CodeBlock', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockInlineCodeInText.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockInlineCodeInText.tsx
deleted file mode 100644
index 10a26c40b4..0000000000
--- a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockInlineCodeInText.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {XDSCode} from '@xds/core/CodeBlock';
-import {XDSText} from '@xds/core/Text';
-
-export default function CodeBlockInlineCodeInText() {
- return (
- <XDSText type="body">
- Use <XDSCode>const</XDSCode> for block-scoped declarations.
- </XDSText>
- );
-}
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.doc.mjs b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.doc.mjs
new file mode 100644
index 0000000000..d159d8ae80
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CodeBlock — JSON Configuration',
+ description:
+ 'Code block displaying a JSON configuration file with line numbers.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CodeBlock'],
+};
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx
new file mode 100644
index 0000000000..1904182eff
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockJSONConfig.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+const code = `{
+ "name": "@xds/core",
+ "version": "0.0.5",
+ "dependencies": {
+ "@stylexjs/stylex": "^0.17.5",
+ "react": "^19.0.0"
+ },
+ "scripts": {
+ "build": "tsup",
+ "test": "vitest"
+ }
+}`;
+
+export default function CodeBlockJSONConfig() {
+ return (
+ <XDSCodeBlock
+ code={code}
+ language="json"
+ title="package.json"
+ hasLineNumbers
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockPythonScript.doc.mjs b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockPythonScript.doc.mjs
new file mode 100644
index 0000000000..d3111c6122
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockPythonScript.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CodeBlock — Python Script',
+ description:
+ 'Python code block with highlighted dataclass definition and line numbers.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CodeBlock'],
+};
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockPythonScript.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockPythonScript.tsx
new file mode 100644
index 0000000000..12e9535e48
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockPythonScript.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+const code = `#!/usr/bin/env python3
+"""Data processing pipeline."""
+
+from dataclasses import dataclass
+from typing import List, Optional
+
+@dataclass
+class Config:
+ input_path: str
+ output_path: str
+ batch_size: int = 100
+
+def process(config: Config) -> None:
+ """Process data according to config."""
+ print(f"Processing {config.input_path}")
+ # TODO: implement pipeline
+ pass
+
+if __name__ == "__main__":
+ cfg = Config("input.csv", "output.csv")
+ process(cfg)`;
+
+export default function CodeBlockPythonScript() {
+ return (
+ <XDSCodeBlock
+ code={code}
+ language="python"
+ title="pipeline.py"
+ hasLineNumbers
+ highlightLines={[7, 8, 9, 10, 11]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockScrollableBlock.doc.mjs b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockScrollableBlock.doc.mjs
new file mode 100644
index 0000000000..ec4c670ef8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockScrollableBlock.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CodeBlock — Scrollable Block',
+ description:
+ 'Code block with a max height constraint that enables vertical scrolling.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CodeBlock'],
+};
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockScrollableBlock.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockScrollableBlock.tsx
new file mode 100644
index 0000000000..d987788566
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockScrollableBlock.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+const code = Array.from(
+ {length: 50},
+ (_, i) => `const line${i + 1} = ${i + 1};`,
+).join('\n');
+
+export default function CodeBlockScrollableBlock() {
+ return (
+ <XDSCodeBlock
+ code={code}
+ language="typescript"
+ title="many-lines.ts"
+ hasLineNumbers
+ maxHeight={200}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockTypeScriptWithLineNumbers.tsx b/packages/cli/templates/blocks/components/CodeBlock/CodeBlockTypeScriptWithLineNumbers.tsx
deleted file mode 100644
index 6e179db5b8..0000000000
--- a/packages/cli/templates/blocks/components/CodeBlock/CodeBlockTypeScriptWithLineNumbers.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSCodeBlock} from '@xds/core/CodeBlock';
-
-export default function CodeBlockTypeScriptWithLineNumbers() {
- return (
- <XDSCodeBlock
- code={`function greet(name: string) { return name; }`}
- language="typescript"
- hasLineNumbers
- title="greet.ts"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleControlledAccordion.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleControlledAccordion.doc.mjs
new file mode 100644
index 0000000000..271a111751
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleControlledAccordion.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Collapsible — Controlled Accordion',
+ description:
+ 'Accordion with externally controlled open state that displays which section is active.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Collapsible', 'Card', 'Layout'],
+};
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleControlledAccordion.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleControlledAccordion.tsx
new file mode 100644
index 0000000000..ff573e4aa9
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleControlledAccordion.tsx
@@ -0,0 +1,36 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSCollapsible, XDSCollapsibleGroup} from '@xds/core/Collapsible';
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function CollapsibleControlledAccordion() {
+ const [open, setOpen] = useState<string | string[]>('section1');
+ return (
+ <div>
+ <p style={{fontSize: 14, color: '#65676B', margin: '0 0 12px'}}>
+ Currently open: <strong>{String(open) || '(none)'}</strong>
+ </p>
+ <XDSCollapsibleGroup type="single" value={open} onChange={setOpen}>
+ <XDSVStack gap={2}>
+ <XDSCard>
+ <XDSCollapsible trigger="Section 1" value="section1">
+ <p style={{margin: 0}}>Content for section 1.</p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="Section 2" value="section2">
+ <p style={{margin: 0}}>Content for section 2.</p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="Section 3" value="section3">
+ <p style={{margin: 0}}>Content for section 3.</p>
+ </XDSCollapsible>
+ </XDSCard>
+ </XDSVStack>
+ </XDSCollapsibleGroup>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleFAQPage.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleFAQPage.doc.mjs
new file mode 100644
index 0000000000..97e9f68738
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleFAQPage.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Collapsible — FAQ Page',
+ description:
+ 'Frequently asked questions layout using single-mode accordion with card-wrapped sections.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Collapsible', 'Card', 'Layout'],
+};
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleFAQPage.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleFAQPage.tsx
new file mode 100644
index 0000000000..5a4e81a258
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleFAQPage.tsx
@@ -0,0 +1,47 @@
+'use client';
+
+import {XDSCollapsible, XDSCollapsibleGroup} from '@xds/core/Collapsible';
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function CollapsibleFAQPage() {
+ return (
+ <XDSCollapsibleGroup type="single">
+ <XDSVStack gap={2}>
+ <XDSCard>
+ <XDSCollapsible trigger="How do I reset my password?" value="q1">
+ <p style={{margin: 0}}>
+ Go to Settings &rarr; Security &rarr; Change Password. You'll
+ receive a confirmation email.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="Can I change my username?" value="q2">
+ <p style={{margin: 0}}>
+ Usernames can be changed once every 30 days from your profile
+ settings.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="How do I delete my account?" value="q3">
+ <p style={{margin: 0}}>
+ Account deletion is permanent. Go to Settings &rarr; Account
+ &rarr; Delete Account. Your data will be removed within 30 days.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible
+ trigger="What payment methods are accepted?"
+ value="q4">
+ <p style={{margin: 0}}>
+ We accept Visa, Mastercard, American Express, and PayPal.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ </XDSVStack>
+ </XDSCollapsibleGroup>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleAccordion.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleAccordion.doc.mjs
new file mode 100644
index 0000000000..2526113132
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleAccordion.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Collapsible — Multiple Accordion',
+ description:
+ 'Accordion group in multiple mode allowing several sections to be open simultaneously.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Collapsible', 'Card', 'Layout'],
+};
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleAccordion.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleAccordion.tsx
new file mode 100644
index 0000000000..1d99873a11
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleAccordion.tsx
@@ -0,0 +1,35 @@
+'use client';
+
+import {XDSCollapsible, XDSCollapsibleGroup} from '@xds/core/Collapsible';
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function CollapsibleMultipleAccordion() {
+ return (
+ <XDSCollapsibleGroup type="multiple" defaultValue={['faq1', 'faq3']}>
+ <XDSVStack gap={2}>
+ <XDSCard>
+ <XDSCollapsible trigger="What is XDS?" value="faq1">
+ <p style={{margin: 0}}>
+ XDS is a design system for building internal tools and products.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="How do I install it?" value="faq2">
+ <p style={{margin: 0}}>
+ Run <code>npm install @xds/core</code> to get started.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="Is it open source?" value="faq3">
+ <p style={{margin: 0}}>
+ Yes! XDS is open source and available on GitHub.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ </XDSVStack>
+ </XDSCollapsibleGroup>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleMode.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleMode.doc.mjs
deleted file mode 100644
index 798ece287f..0000000000
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleMode.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Collapsible — Multiple Mode',
- description: 'Coordinated group where multiple sections can be open simultaneously.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Card', 'Collapsible', 'Stack'],
-};
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleMode.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleMode.tsx
deleted file mode 100644
index f3aa0b9652..0000000000
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleMultipleMode.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {XDSCollapsible, XDSCollapsibleGroup} from '@xds/core/Collapsible';
-import {XDSCard} from '@xds/core/Card';
-import {XDSVStack} from '@xds/core/Stack';
-
-export default function CollapsibleMultipleMode() {
- return (
- <XDSCollapsibleGroup type="multiple" defaultValue={['s1', 's2']}>
- <XDSVStack gap={2}>
- <XDSCard>
- <XDSCollapsible trigger="Section 1" value="s1">
- <p>First section content.</p>
- </XDSCollapsible>
- </XDSCard>
- <XDSCard>
- <XDSCollapsible trigger="Section 2" value="s2">
- <p>Second section content.</p>
- </XDSCollapsible>
- </XDSCard>
- </XDSVStack>
- </XDSCollapsibleGroup>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithLayout.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleAccordion.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/Collapsible/CollapsibleWithLayout.doc.mjs
rename to packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleAccordion.doc.mjs
index f3c7072ded..9c0d38e8ba 100644
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleAccordion.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Collapsible — With Layout',
- description: 'Collapsible section with structured Layout content and footer.',
+ name: 'Collapsible — Single Accordion',
+ description:
+ 'Accordion group in single mode where only one section can be open at a time.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Collapsible', 'Card', 'Layout'],
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleAccordion.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleAccordion.tsx
new file mode 100644
index 0000000000..f808bbb515
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleAccordion.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {XDSCollapsible, XDSCollapsibleGroup} from '@xds/core/Collapsible';
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function CollapsibleSingleAccordion() {
+ return (
+ <XDSCollapsibleGroup type="single" defaultValue="general">
+ <XDSVStack gap={2}>
+ <XDSCard>
+ <XDSCollapsible trigger="General Settings" value="general">
+ <p style={{margin: 0}}>
+ Configure your general preferences including language, timezone,
+ and display options.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="Privacy Settings" value="privacy">
+ <p style={{margin: 0}}>
+ Manage who can see your profile, activity, and personal
+ information.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ <XDSCard>
+ <XDSCollapsible trigger="Notification Settings" value="notifications">
+ <p style={{margin: 0}}>
+ Choose which notifications you receive and how they are delivered.
+ </p>
+ </XDSCollapsible>
+ </XDSCard>
+ </XDSVStack>
+ </XDSCollapsibleGroup>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleModeAccordion.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleModeAccordion.doc.mjs
deleted file mode 100644
index b0d045cbcc..0000000000
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleModeAccordion.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Collapsible — Single Mode Accordion',
- description: 'Coordinated group where only one section can be open at a time.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Card', 'Collapsible', 'Stack'],
-};
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleModeAccordion.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleModeAccordion.tsx
deleted file mode 100644
index 4845635339..0000000000
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleSingleModeAccordion.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {XDSCollapsible, XDSCollapsibleGroup} from '@xds/core/Collapsible';
-import {XDSCard} from '@xds/core/Card';
-import {XDSVStack} from '@xds/core/Stack';
-
-export default function CollapsibleSingleModeAccordion() {
- return (
- <XDSCollapsibleGroup type="single" defaultValue="general">
- <XDSVStack gap={2}>
- <XDSCard>
- <XDSCollapsible trigger="General Settings" value="general">
- <p>General settings content goes here.</p>
- </XDSCollapsible>
- </XDSCard>
- <XDSCard>
- <XDSCollapsible trigger="Advanced Settings" value="advanced">
- <p>Advanced settings content goes here.</p>
- </XDSCollapsible>
- </XDSCard>
- </XDSVStack>
- </XDSCollapsibleGroup>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleStandalone.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleStandalone.doc.mjs
deleted file mode 100644
index 99c9097846..0000000000
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleStandalone.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Collapsible — Standalone',
- description: 'A controlled collapsible section inside a card.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Collapsible', 'Card'],
-};
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleStandalone.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleStandalone.tsx
deleted file mode 100644
index cefde58a75..0000000000
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleStandalone.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSCollapsible} from '@xds/core/Collapsible';
-import {XDSCard} from '@xds/core/Card';
-
-export default function CollapsibleStandalone() {
- const [open, setOpen] = useState(true);
-
- return (
- <XDSCard>
- <XDSCollapsible trigger="Settings" isOpen={open} onOpenChange={setOpen}>
- <p>Controlled externally</p>
- </XDSCollapsible>
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithLayout.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithLayout.tsx
deleted file mode 100644
index 609b90ebb5..0000000000
--- a/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithLayout.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {XDSCollapsible} from '@xds/core/Collapsible';
-import {XDSCard} from '@xds/core/Card';
-import {XDSLayout, XDSLayoutContent, XDSLayoutFooter} from '@xds/core/Layout';
-
-export default function CollapsibleWithLayout() {
- return (
- <XDSCard>
- <XDSCollapsible trigger="Report Details" value="report">
- <XDSLayout
- content={<XDSLayoutContent>Report body</XDSLayoutContent>}
- footer={<XDSLayoutFooter hasDivider>Actions</XDSLayoutFooter>}
- />
- </XDSCollapsible>
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithoutCard.doc.mjs b/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithoutCard.doc.mjs
new file mode 100644
index 0000000000..f28e152188
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithoutCard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Collapsible — Without Card',
+ description:
+ 'Standalone collapsible sections used without card wrappers.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Collapsible', 'Layout'],
+};
diff --git a/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithoutCard.tsx b/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithoutCard.tsx
new file mode 100644
index 0000000000..dd1b4ef0bc
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Collapsible/CollapsibleWithoutCard.tsx
@@ -0,0 +1,19 @@
+'use client';
+
+import {XDSCollapsible} from '@xds/core/Collapsible';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function CollapsibleWithoutCard() {
+ return (
+ <XDSVStack gap={2}>
+ <XDSCollapsible trigger="Show more details">
+ <p style={{margin: 0}}>
+ XDSCollapsible works anywhere — it doesn't require a card wrapper.
+ </p>
+ </XDSCollapsible>
+ <XDSCollapsible trigger="Another section" defaultIsOpen={false}>
+ <p style={{margin: 0}}>This section starts collapsed.</p>
+ </XDSCollapsible>
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAsyncSearch.doc.mjs b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAsyncSearch.doc.mjs
new file mode 100644
index 0000000000..f53ba57e2f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAsyncSearch.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CommandPalette — Async Search',
+ description:
+ 'Server-side search with loading spinner and custom empty states.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CommandPalette', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAsyncSearch.tsx b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAsyncSearch.tsx
new file mode 100644
index 0000000000..e8554f6a40
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAsyncSearch.tsx
@@ -0,0 +1,46 @@
+'use client';
+
+import {useState, useMemo} from 'react';
+import {XDSCommandPalette, XDSCommandPaletteInput} from '@xds/core/CommandPalette';
+import {XDSButton} from '@xds/core/Button';
+import type {XDSSearchSource} from '@xds/core/Typeahead';
+
+const allFiles = [
+ {id: 'readme', label: 'README.md'},
+ {id: 'package', label: 'package.json'},
+ {id: 'tsconfig', label: 'tsconfig.json'},
+ {id: 'index', label: 'src/index.ts'},
+ {id: 'app', label: 'src/App.tsx'},
+];
+
+export default function CommandPaletteAsyncSearch() {
+ const [isOpen, setIsOpen] = useState(false);
+ const source = useMemo<XDSSearchSource>(
+ () => ({
+ async search(query: string) {
+ await new Promise(r => setTimeout(r, 400));
+ return allFiles.filter(f =>
+ f.label.toLowerCase().includes(query.toLowerCase()),
+ );
+ },
+ bootstrap() {
+ return [];
+ },
+ }),
+ [],
+ );
+
+ return (
+ <>
+ <XDSButton label="Open File Search" onClick={() => setIsOpen(true)} />
+ <XDSCommandPalette
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ searchSource={source}
+ input={<XDSCommandPaletteInput placeholder="Search files..." />}
+ emptyBootstrapText="Type a filename to search"
+ emptySearchText="No files found"
+ />
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAutoGrouped.doc.mjs b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAutoGrouped.doc.mjs
new file mode 100644
index 0000000000..08b532598f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAutoGrouped.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CommandPalette — Auto Grouped',
+ description:
+ 'Command palette with items automatically grouped via auxiliaryData.group.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CommandPalette', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAutoGrouped.tsx b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAutoGrouped.tsx
new file mode 100644
index 0000000000..edcb445d97
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteAutoGrouped.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {useState, useMemo} from 'react';
+import {XDSCommandPalette} from '@xds/core/CommandPalette';
+import {XDSButton} from '@xds/core/Button';
+import {createStaticSource} from '@xds/core/Typeahead';
+
+export default function CommandPaletteAutoGrouped() {
+ const [isOpen, setIsOpen] = useState(false);
+ const source = useMemo(
+ () =>
+ createStaticSource([
+ {id: 'home', label: 'Home', auxiliaryData: {group: 'Navigation'}},
+ {
+ id: 'settings',
+ label: 'Settings',
+ auxiliaryData: {group: 'Navigation'},
+ },
+ {
+ id: 'profile',
+ label: 'Profile',
+ auxiliaryData: {group: 'Navigation'},
+ },
+ {
+ id: 'new-file',
+ label: 'New File',
+ auxiliaryData: {group: 'Actions'},
+ },
+ {id: 'save', label: 'Save', auxiliaryData: {group: 'Actions'}},
+ {id: 'export', label: 'Export', auxiliaryData: {group: 'Actions'}},
+ ]),
+ [],
+ );
+
+ return (
+ <>
+ <XDSButton label="Open Grouped" onClick={() => setIsOpen(true)} />
+ <XDSCommandPalette
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ searchSource={source}
+ />
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteCustomFooter.doc.mjs b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteCustomFooter.doc.mjs
new file mode 100644
index 0000000000..974c2a5341
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteCustomFooter.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CommandPalette — Custom Footer',
+ description: 'Command palette with a custom footer tip message.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CommandPalette', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteCustomFooter.tsx b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteCustomFooter.tsx
new file mode 100644
index 0000000000..bfc5cf989c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteCustomFooter.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {useState, useMemo} from 'react';
+import {
+ XDSCommandPalette,
+ XDSCommandPaletteFooter,
+} from '@xds/core/CommandPalette';
+import {XDSButton} from '@xds/core/Button';
+import {createStaticSource} from '@xds/core/Typeahead';
+
+export default function CommandPaletteCustomFooter() {
+ const [isOpen, setIsOpen] = useState(false);
+ const source = useMemo(
+ () =>
+ createStaticSource([
+ {id: 'home', label: 'Home'},
+ {id: 'settings', label: 'Settings'},
+ ]),
+ [],
+ );
+
+ return (
+ <>
+ <XDSButton label="Open" onClick={() => setIsOpen(true)} />
+ <XDSCommandPalette
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ searchSource={source}
+ footer={
+ <XDSCommandPaletteFooter>
+ <span>Pro tip: use ⌘K to open anywhere</span>
+ </XDSCommandPaletteFooter>
+ }
+ />
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteGroupedItems.doc.mjs b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteGroupedItems.doc.mjs
deleted file mode 100644
index d90a99564e..0000000000
--- a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteGroupedItems.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'CommandPalette — Grouped Items',
- description: 'Command palette with auto-grouped items and custom item rendering.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Button', 'CommandPalette', 'Typeahead'],
-};
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteGroupedItems.tsx b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteGroupedItems.tsx
deleted file mode 100644
index 874d2aeee5..0000000000
--- a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteGroupedItems.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSCommandPalette} from '@xds/core/CommandPalette';
-import {createStaticSource} from '@xds/core/Typeahead';
-import {XDSButton} from '@xds/core/Button';
-
-const source = createStaticSource([
- {id: 'new-file', label: 'New File', auxiliaryData: {group: 'Files'}},
- {id: 'open-file', label: 'Open File', auxiliaryData: {group: 'Files'}},
- {id: 'preferences', label: 'Preferences', auxiliaryData: {group: 'Settings'}},
- {id: 'shortcuts', label: 'Keyboard Shortcuts', auxiliaryData: {group: 'Settings'}},
-]);
-
-export default function CommandPaletteGroupedItems() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <>
- <XDSButton label="Open Grouped Palette" onClick={() => setIsOpen(true)} />
- <XDSCommandPalette
- isOpen={isOpen}
- onOpenChange={setIsOpen}
- searchSource={source}
- />
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPalettePickerMode.doc.mjs b/packages/cli/templates/blocks/components/CommandPalette/CommandPalettePickerMode.doc.mjs
new file mode 100644
index 0000000000..00a7bf8d33
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPalettePickerMode.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CommandPalette — Picker Mode',
+ description:
+ 'Single-value picker with persistent selection and check indicator.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CommandPalette', 'Button', 'Icon'],
+};
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPalettePickerMode.tsx b/packages/cli/templates/blocks/components/CommandPalette/CommandPalettePickerMode.tsx
new file mode 100644
index 0000000000..878860d545
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPalettePickerMode.tsx
@@ -0,0 +1,44 @@
+'use client';
+
+import {useState, useMemo} from 'react';
+import {XDSCommandPalette} from '@xds/core/CommandPalette';
+import {XDSButton} from '@xds/core/Button';
+import {XDSIcon} from '@xds/core/Icon';
+import {createStaticSource} from '@xds/core/Typeahead';
+
+export default function CommandPalettePickerMode() {
+ const [isOpen, setIsOpen] = useState(false);
+ const [theme, setTheme] = useState('light');
+ const source = useMemo(
+ () =>
+ createStaticSource([
+ {id: 'light', label: 'Light'},
+ {id: 'dark', label: 'Dark'},
+ {id: 'system', label: 'System'},
+ ]),
+ [],
+ );
+
+ return (
+ <>
+ <XDSButton label={`Theme: ${theme}`} onClick={() => setIsOpen(true)} />
+ <XDSCommandPalette
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ searchSource={source}
+ value={theme}
+ onValueChange={v => {
+ setTheme(v);
+ setIsOpen(false);
+ }}
+ renderItem={(item, isSelected) => (
+ <span
+ style={{display: 'flex', alignItems: 'center', gap: 8, flex: 1}}>
+ <span style={{flex: 1}}>{item.label}</span>
+ {isSelected && <XDSIcon icon="check" size="sm" />}
+ </span>
+ )}
+ />
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteRichItems.doc.mjs b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteRichItems.doc.mjs
new file mode 100644
index 0000000000..db82189546
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteRichItems.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'CommandPalette — Rich Items',
+ description:
+ 'Custom item rendering with icons, keyboard shortcuts, and keyword search.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['CommandPalette', 'Button', 'Icon'],
+};
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteRichItems.tsx b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteRichItems.tsx
new file mode 100644
index 0000000000..a715af18b5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteRichItems.tsx
@@ -0,0 +1,72 @@
+'use client';
+
+import {useState, useMemo} from 'react';
+import {XDSCommandPalette} from '@xds/core/CommandPalette';
+import {XDSButton} from '@xds/core/Button';
+import {createStaticSource} from '@xds/core/Typeahead';
+import type {XDSSearchableItem} from '@xds/core/Typeahead';
+
+type RichCommand = XDSSearchableItem<{
+ group?: string;
+ shortcut?: string;
+}>;
+
+const commands: RichCommand[] = [
+ {
+ id: 'dashboard',
+ label: 'Go to Dashboard',
+ auxiliaryData: {group: 'Navigation'},
+ },
+ {
+ id: 'settings',
+ label: 'Open Settings',
+ auxiliaryData: {group: 'Navigation', shortcut: '⌘,'},
+ },
+ {
+ id: 'profile',
+ label: 'View Profile',
+ auxiliaryData: {group: 'Navigation'},
+ },
+ {
+ id: 'dark-mode',
+ label: 'Toggle Dark Mode',
+ auxiliaryData: {group: 'Actions'},
+ },
+ {
+ id: 'new-file',
+ label: 'Create New File',
+ auxiliaryData: {group: 'Actions', shortcut: '⌘N'},
+ },
+ {
+ id: 'search',
+ label: 'Search Files',
+ auxiliaryData: {group: 'Actions', shortcut: '⌘P'},
+ },
+];
+
+export default function CommandPaletteRichItems() {
+ const [isOpen, setIsOpen] = useState(false);
+ const source = useMemo(() => createStaticSource(commands), []);
+
+ return (
+ <>
+ <XDSButton label="Open Rich Palette" onClick={() => setIsOpen(true)} />
+ <XDSCommandPalette
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ searchSource={source}
+ renderItem={(item: RichCommand) => (
+ <span
+ style={{display: 'flex', alignItems: 'center', gap: 8, flex: 1}}>
+ <span style={{flex: 1}}>{item.label}</span>
+ {item.auxiliaryData?.shortcut && (
+ <span style={{fontSize: 12, opacity: 0.5}}>
+ {item.auxiliaryData.shortcut}
+ </span>
+ )}
+ </span>
+ )}
+ />
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteStaticSource.doc.mjs b/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteStaticSource.doc.mjs
deleted file mode 100644
index 01d38ea562..0000000000
--- a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteStaticSource.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'CommandPalette — Static Source',
- description: 'Command palette with a static list of searchable items.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Button', 'CommandPalette', 'Typeahead'],
-};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputBasic.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputBasic.doc.mjs
deleted file mode 100644
index 8cbe24904a..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'DateInput — Basic',
- description: 'Simple date input with text entry and calendar popover.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Calendar', 'DateInput'],
-};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputBasic.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputBasic.tsx
deleted file mode 100644
index 9054661383..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputBasic.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDateInput} from '@xds/core/DateInput';
-import type {ISODateString} from '@xds/core/Calendar';
-
-export default function DateInputBasic() {
- const [date, setDate] = useState<ISODateString | undefined>(undefined);
-
- return <XDSDateInput label="Event date" value={date} onChange={setDate} />;
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardCollapsible.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputClearable.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/Card/CardCollapsible.doc.mjs
rename to packages/cli/templates/blocks/components/DateInput/DateInputClearable.doc.mjs
index 103137ba6d..0ebf674831 100644
--- a/packages/cli/templates/blocks/components/Card/CardCollapsible.doc.mjs
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputClearable.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Card — Collapsible',
- description: 'Card with collapsible content section.',
+ name: 'DateInput — Clearable',
+ description: 'Date input with a clear button to reset the selected value.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Card', 'Collapsible'],
+ componentsUsed: ['DateInput'],
};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputClearable.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputClearable.tsx
new file mode 100644
index 0000000000..31ddc8cc25
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputClearable.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDateInput} from '@xds/core/DateInput';
+
+type DateString = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
+
+export default function DateInputClearable() {
+ const [value, setValue] = useState<DateString | undefined>('2026-04-06' as DateString);
+
+ return (
+ <XDSDateInput
+ label="Event date"
+ placeholder="Select a date"
+ value={value}
+ onChange={setValue}
+ hasClear
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Table/TableChildrenMode.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputDateRange.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/Table/TableChildrenMode.doc.mjs
rename to packages/cli/templates/blocks/components/DateInput/DateInputDateRange.doc.mjs
index 89b878cbb8..034c8569ab 100644
--- a/packages/cli/templates/blocks/components/Table/TableChildrenMode.doc.mjs
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputDateRange.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Table — Children mode',
- description: 'Children mode',
+ name: 'DateInput — Date Range',
+ description: 'Date input constrained to a min/max date range.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Avatar', 'Badge', 'Layout', 'Table', 'Text'],
+ componentsUsed: ['DateInput'],
};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputDateRange.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputDateRange.tsx
new file mode 100644
index 0000000000..cfac25ca9b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputDateRange.tsx
@@ -0,0 +1,23 @@
+'use client';
+
+import {useState} from 'react';
+
+type DateString = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
+
+import {XDSDateInput} from '@xds/core/DateInput';
+
+export default function DateInputDateRange() {
+ const [value, setValue] = useState<DateString | undefined>(undefined);
+
+ return (
+ <XDSDateInput
+ label="Booking date"
+ min="2026-01-15"
+ max="2026-02-15"
+ description="Available dates: Jan 15 – Feb 15, 2026"
+ placeholder="Select a booking date"
+ value={value}
+ onChange={setValue}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutAppShellWithSidebar.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputPrefilledDate.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/Layout/LayoutAppShellWithSidebar.doc.mjs
rename to packages/cli/templates/blocks/components/DateInput/DateInputPrefilledDate.doc.mjs
index 1b19dbee50..3a65b8249c 100644
--- a/packages/cli/templates/blocks/components/Layout/LayoutAppShellWithSidebar.doc.mjs
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputPrefilledDate.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Layout — App Shell With Sidebar',
- description: 'App shell layout with a navigation sidebar panel.',
+ name: 'DateInput — Prefilled Date',
+ description: 'Date input initialized with a pre-selected value.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Layout'],
+ componentsUsed: ['DateInput'],
};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputPrefilledDate.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputPrefilledDate.tsx
new file mode 100644
index 0000000000..7bf0f16ca0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputPrefilledDate.tsx
@@ -0,0 +1,12 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDateInput} from '@xds/core/DateInput';
+
+type DateString = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
+
+export default function DateInputPrefilledDate() {
+ const [value, setValue] = useState<DateString | undefined>('2026-01-25' as DateString);
+
+ return <XDSDateInput label="Event date" value={value} onChange={setValue} />;
+}
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputTwoMonthCalendar.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputTwoMonthCalendar.doc.mjs
deleted file mode 100644
index 2110f355dd..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputTwoMonthCalendar.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'DateInput — Two-Month Calendar',
- description: 'Date input displaying two months simultaneously in the calendar popover.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Calendar', 'DateInput'],
-};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputTwoMonthCalendar.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputTwoMonthCalendar.tsx
deleted file mode 100644
index fef9ad415d..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputTwoMonthCalendar.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDateInput} from '@xds/core/DateInput';
-import type {ISODateString} from '@xds/core/Calendar';
-
-export default function DateInputTwoMonthCalendar() {
- const [date, setDate] = useState<ISODateString | undefined>(undefined);
-
- return (
- <XDSDateInput
- label="Check-in date"
- value={date}
- onChange={setDate}
- numberOfMonths={2}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithConstraints.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputWithConstraints.doc.mjs
deleted file mode 100644
index 554e90b473..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputWithConstraints.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'DateInput — With Constraints',
- description: 'Date input restricted to a min/max date range with custom placeholder.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Calendar', 'DateInput'],
-};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithConstraints.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputWithConstraints.tsx
deleted file mode 100644
index f7e93936b2..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputWithConstraints.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDateInput} from '@xds/core/DateInput';
-import type {ISODateString} from '@xds/core/Calendar';
-
-export default function DateInputWithConstraints() {
- const [date, setDate] = useState<ISODateString | undefined>(undefined);
-
- return (
- <XDSDateInput
- label="Departure date"
- value={date}
- onChange={setDate}
- min={'2026-01-01' as const}
- max={'2026-12-31' as const}
- placeholder="Pick a date"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Card/CardColorVariant.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputWithDescription.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/Card/CardColorVariant.doc.mjs
rename to packages/cli/templates/blocks/components/DateInput/DateInputWithDescription.doc.mjs
index f31ee9c03b..fc4eb5181f 100644
--- a/packages/cli/templates/blocks/components/Card/CardColorVariant.doc.mjs
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputWithDescription.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Card — Color Variant',
- description: 'Card with a non-semantic blue background color.',
+ name: 'DateInput — With Description',
+ description: 'Date input with a helper description below the label.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Card'],
+ componentsUsed: ['DateInput'],
};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithDescription.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputWithDescription.tsx
new file mode 100644
index 0000000000..ca0cad1256
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputWithDescription.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {useState} from 'react';
+
+type DateString = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
+
+import {XDSDateInput} from '@xds/core/DateInput';
+
+export default function DateInputWithDescription() {
+ const [value, setValue] = useState<DateString | undefined>(undefined);
+
+ return (
+ <XDSDateInput
+ label="Birthday"
+ description="Enter your date of birth"
+ placeholder="Select your birthday"
+ value={value}
+ onChange={setValue}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithDescriptionAndRequired.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputWithDescriptionAndRequired.doc.mjs
deleted file mode 100644
index 9b66425226..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputWithDescriptionAndRequired.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'DateInput — With Description And Required',
- description: 'Required date input with helper description text below the label.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Calendar', 'DateInput'],
-};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithDescriptionAndRequired.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputWithDescriptionAndRequired.tsx
deleted file mode 100644
index e4d70978df..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputWithDescriptionAndRequired.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDateInput} from '@xds/core/DateInput';
-import type {ISODateString} from '@xds/core/Calendar';
-
-export default function DateInputWithDescriptionAndRequired() {
- const [date, setDate] = useState<ISODateString | undefined>(undefined);
-
- return (
- <XDSDateInput
- label="Due date"
- description="When should this task be completed?"
- isRequired
- value={date}
- onChange={setDate}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithErrorStatus.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputWithErrorStatus.tsx
deleted file mode 100644
index 91fd77f521..0000000000
--- a/packages/cli/templates/blocks/components/DateInput/DateInputWithErrorStatus.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDateInput} from '@xds/core/DateInput';
-import type {ISODateString} from '@xds/core/Calendar';
-
-export default function DateInputWithErrorStatus() {
- const [date, setDate] = useState<ISODateString | undefined>(undefined);
-
- return (
- <XDSDateInput
- label="Event date"
- value={date}
- onChange={setDate}
- status={{
- type: 'error',
- message: 'This date is not available',
- }}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithErrorStatus.doc.mjs b/packages/cli/templates/blocks/components/DateInput/DateInputWithValidation.doc.mjs
similarity index 71%
rename from packages/cli/templates/blocks/components/DateInput/DateInputWithErrorStatus.doc.mjs
rename to packages/cli/templates/blocks/components/DateInput/DateInputWithValidation.doc.mjs
index 090ebba5fe..3b0c91fb9a 100644
--- a/packages/cli/templates/blocks/components/DateInput/DateInputWithErrorStatus.doc.mjs
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputWithValidation.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'DateInput — With Error Status',
+ name: 'DateInput — With Validation',
description: 'Date input displaying an error validation message.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Calendar', 'DateInput'],
+ componentsUsed: ['DateInput'],
};
diff --git a/packages/cli/templates/blocks/components/DateInput/DateInputWithValidation.tsx b/packages/cli/templates/blocks/components/DateInput/DateInputWithValidation.tsx
new file mode 100644
index 0000000000..921f3b2b5b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DateInput/DateInputWithValidation.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDateInput} from '@xds/core/DateInput';
+
+type DateString = `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
+
+export default function DateInputWithValidation() {
+ const [value, setValue] = useState<DateString | undefined>('2026-01-25' as DateString);
+
+ return (
+ <XDSDateInput
+ label="Event date"
+ value={value}
+ onChange={setValue}
+ status={{
+ type: 'error',
+ message: 'This date is not available',
+ }}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogBasicWithLayout.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogBasicWithLayout.doc.mjs
deleted file mode 100644
index b2a73f70b5..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogBasicWithLayout.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Dialog — Basic With Layout',
- description: 'Modal dialog with header, content, and footer action buttons.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Dialog', 'Layout', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogBasicWithLayout.tsx b/packages/cli/templates/blocks/components/Dialog/DialogBasicWithLayout.tsx
deleted file mode 100644
index 65bf55d4cb..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogBasicWithLayout.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDialog} from '@xds/core/Dialog';
-import {
- XDSLayout,
- XDSLayoutHeader,
- XDSLayoutContent,
- XDSLayoutFooter,
-} from '@xds/core/Layout';
-import {XDSButton} from '@xds/core/Button';
-
-export default function DialogBasicWithLayout() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <>
- <XDSButton label="Open Dialog" onClick={() => setIsOpen(true)} />
-
- <XDSDialog isOpen={isOpen} onOpenChange={open => setIsOpen(open)}>
- <XDSLayout
- header={<XDSLayoutHeader hasDivider>Title</XDSLayoutHeader>}
- content={<XDSLayoutContent>Content goes here</XDSLayoutContent>}
- footer={
- <XDSLayoutFooter hasDivider>
- <XDSButton
- label="Cancel"
- variant="secondary"
- onClick={() => setIsOpen(false)}
- />
- <XDSButton
- label="Confirm"
- variant="primary"
- onClick={() => setIsOpen(false)}
- />
- </XDSLayoutFooter>
- }
- />
- </XDSDialog>
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverSiblingModeWithAnchorRef.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogConfirmationDialog.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/Popover/PopoverSiblingModeWithAnchorRef.doc.mjs
rename to packages/cli/templates/blocks/components/Dialog/DialogConfirmationDialog.doc.mjs
index 2dc8849d89..93dcec5af5 100644
--- a/packages/cli/templates/blocks/components/Popover/PopoverSiblingModeWithAnchorRef.doc.mjs
+++ b/packages/cli/templates/blocks/components/Dialog/DialogConfirmationDialog.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Popover — Sibling Mode With Anchor Ref',
- description: 'Popover attached to an external trigger element via anchorRef.',
+ name: 'Dialog — Confirmation Dialog',
+ description:
+ 'Destructive action confirmation with cancel and delete buttons.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Popover', 'Button'],
+ componentsUsed: ['Dialog', 'Layout', 'Button', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogConfirmationDialog.tsx b/packages/cli/templates/blocks/components/Dialog/DialogConfirmationDialog.tsx
new file mode 100644
index 0000000000..0c55c97344
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogConfirmationDialog.tsx
@@ -0,0 +1,75 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';
+import {
+ XDSLayout,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+import {XDSText} from '@xds/core/Text';
+
+export default function DialogConfirmationDialog() {
+ const [isOpen, setIsOpen] = useState(false);
+ const [deleted, setDeleted] = useState(false);
+
+ const handleDelete = () => {
+ setDeleted(true);
+ setIsOpen(false);
+ };
+
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
+ <XDSButton
+ label="Delete Item"
+ variant="destructive"
+ onClick={() => setIsOpen(true)}
+ />
+ {deleted && (
+ <XDSText type="body" color="primary">
+ Item deleted (demo)
+ </XDSText>
+ )}
+ <XDSDialog
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ width={350}
+ purpose="form">
+ <XDSLayout
+ header={
+ <XDSDialogHeader
+ title="Confirm Delete"
+ onOpenChange={setIsOpen}
+ />
+ }
+ content={
+ <XDSLayoutContent>
+ <XDSText type="body">
+ Are you sure you want to delete this item? This action cannot be
+ undone.
+ </XDSText>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton
+ label="Cancel"
+ variant="secondary"
+ onClick={() => setIsOpen(false)}
+ />
+ <XDSButton
+ label="Delete"
+ variant="destructive"
+ onClick={handleDelete}
+ />
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSDialog>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogFormDialog.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogFormDialog.doc.mjs
new file mode 100644
index 0000000000..b36f544dbb
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogFormDialog.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Dialog — Form Dialog',
+ description:
+ 'Form-purpose dialog that prevents backdrop dismissal to protect unsaved data.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Dialog', 'Layout', 'Button', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogFormDialog.tsx b/packages/cli/templates/blocks/components/Dialog/DialogFormDialog.tsx
new file mode 100644
index 0000000000..48706e8ea2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogFormDialog.tsx
@@ -0,0 +1,65 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';
+import {
+ XDSLayout,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+import {XDSText} from '@xds/core/Text';
+
+export default function DialogFormDialog() {
+ const [isOpen, setIsOpen] = useState(false);
+
+ return (
+ <>
+ <XDSButton
+ label="Open Form Modal"
+ variant="secondary"
+ onClick={() => setIsOpen(true)}
+ />
+ <XDSDialog
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ purpose="form"
+ width={500}>
+ <XDSLayout
+ header={
+ <XDSDialogHeader
+ title="Edit Profile"
+ onOpenChange={setIsOpen}
+ />
+ }
+ content={
+ <XDSLayoutContent>
+ <XDSText type="body">
+ This modal uses purpose=&quot;form&quot;. Clicking outside
+ won&apos;t close it to prevent accidental data loss, but you can
+ still press Escape.
+ </XDSText>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton
+ label="Cancel"
+ variant="secondary"
+ onClick={() => setIsOpen(false)}
+ />
+ <XDSButton
+ label="Save"
+ variant="primary"
+ onClick={() => setIsOpen(false)}
+ />
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSDialog>
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogFullscreenDialog.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogFullscreenDialog.doc.mjs
new file mode 100644
index 0000000000..2649d318bf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogFullscreenDialog.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Dialog — Fullscreen Dialog',
+ description: 'Full-viewport dialog variant with scrollable content.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Dialog', 'Layout', 'Button', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogFullscreenDialog.tsx b/packages/cli/templates/blocks/components/Dialog/DialogFullscreenDialog.tsx
new file mode 100644
index 0000000000..95aba60ebe
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogFullscreenDialog.tsx
@@ -0,0 +1,65 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';
+import {
+ XDSLayout,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+import {XDSText} from '@xds/core/Text';
+
+export default function DialogFullscreenDialog() {
+ const [isOpen, setIsOpen] = useState(false);
+
+ return (
+ <>
+ <XDSButton
+ label="Open Fullscreen Modal"
+ variant="secondary"
+ onClick={() => setIsOpen(true)}
+ />
+ <XDSDialog isOpen={isOpen} onOpenChange={setIsOpen} variant="fullscreen">
+ <XDSLayout
+ header={
+ <XDSDialogHeader
+ title="Fullscreen Modal"
+ onOpenChange={setIsOpen}
+ />
+ }
+ content={
+ <XDSLayoutContent>
+ <div
+ style={{display: 'flex', flexDirection: 'column', gap: 12}}>
+ <XDSText type="body">
+ This modal takes up the entire viewport. The width, maxHeight,
+ and position props are ignored in fullscreen mode.
+ </XDSText>
+ {Array.from({length: 10}, (_, i) => (
+ <XDSText type="body" key={i}>
+ {i + 1}. Lorem ipsum dolor sit amet, consectetur adipiscing
+ elit. Sed do eiusmod tempor incididunt ut labore et dolore
+ magna aliqua.
+ </XDSText>
+ ))}
+ </div>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter>
+ <XDSHStack hAlign="end">
+ <XDSButton
+ label="Close"
+ variant="primary"
+ onClick={() => setIsOpen(false)}
+ />
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSDialog>
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogFullscreenVariant.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogFullscreenVariant.doc.mjs
deleted file mode 100644
index a11ea0fddf..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogFullscreenVariant.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Dialog — Fullscreen Variant',
- description: 'Full-viewport dialog with header, content, and footer.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Dialog', 'Layout', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogFullscreenVariant.tsx b/packages/cli/templates/blocks/components/Dialog/DialogFullscreenVariant.tsx
deleted file mode 100644
index c311c6213f..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogFullscreenVariant.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDialog} from '@xds/core/Dialog';
-import {
- XDSLayout,
- XDSLayoutHeader,
- XDSLayoutContent,
- XDSLayoutFooter,
-} from '@xds/core/Layout';
-import {XDSButton} from '@xds/core/Button';
-
-export default function DialogFullscreenVariant() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <>
- <XDSButton label="Open Fullscreen" onClick={() => setIsOpen(true)} />
-
- <XDSDialog
- isOpen={isOpen}
- onOpenChange={open => setIsOpen(open)}
- variant="fullscreen">
- <XDSLayout
- header={
- <XDSLayoutHeader hasDivider>Full-screen title</XDSLayoutHeader>
- }
- content={<XDSLayoutContent>Content goes here</XDSLayoutContent>}
- footer={
- <XDSLayoutFooter hasDivider>
- <XDSButton label="Close" onClick={() => setIsOpen(false)} />
- </XDSLayoutFooter>
- }
- />
- </XDSDialog>
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogHeaderWithCloseButton.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogHeaderWithCloseButton.doc.mjs
deleted file mode 100644
index e67cccd909..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogHeaderWithCloseButton.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Dialog — Header With Close Button',
- description: 'Dialog header with title, subtitle, and a close button.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Dialog', 'Layout', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogHeaderWithCloseButton.tsx b/packages/cli/templates/blocks/components/Dialog/DialogHeaderWithCloseButton.tsx
deleted file mode 100644
index 1a7b0af8f6..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogHeaderWithCloseButton.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';
-import {XDSLayoutContent} from '@xds/core/Layout';
-import {XDSButton} from '@xds/core/Button';
-
-export default function DialogHeaderWithCloseButton() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <>
- <XDSButton label="Open Dialog" onClick={() => setIsOpen(true)} />
-
- <XDSDialog isOpen={isOpen} onOpenChange={open => setIsOpen(open)}>
- <XDSDialogHeader
- title="Confirm Action"
- subtitle="This cannot be undone"
- onOpenChange={open => setIsOpen(open)}
- />
- <XDSLayoutContent>Dialog body content here.</XDSLayoutContent>
- </XDSDialog>
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogRequiredPurpose.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogRequiredPurpose.doc.mjs
deleted file mode 100644
index 425bb1366c..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogRequiredPurpose.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Dialog — Required Purpose',
- description: 'Non-dismissible dialog that requires an explicit user action to close.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Dialog', 'Layout', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogRequiredPurpose.tsx b/packages/cli/templates/blocks/components/Dialog/DialogRequiredPurpose.tsx
deleted file mode 100644
index 0db4b0d8c7..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogRequiredPurpose.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDialog} from '@xds/core/Dialog';
-import {XDSLayout, XDSLayoutContent, XDSLayoutFooter} from '@xds/core/Layout';
-import {XDSButton} from '@xds/core/Button';
-
-export default function DialogRequiredPurpose() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <>
- <XDSButton label="Open Required Dialog" onClick={() => setIsOpen(true)} />
-
- <XDSDialog
- isOpen={isOpen}
- onOpenChange={open => setIsOpen(open)}
- purpose="required">
- <XDSLayout
- content={
- <XDSLayoutContent>
- You must take an explicit action to close this dialog.
- </XDSLayoutContent>
- }
- footer={
- <XDSLayoutFooter hasDivider>
- <XDSButton
- label="Acknowledge"
- variant="primary"
- onClick={() => setIsOpen(false)}
- />
- </XDSLayoutFooter>
- }
- />
- </XDSDialog>
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogScrollingContent.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogScrollingContent.doc.mjs
new file mode 100644
index 0000000000..0274ccfba2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogScrollingContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Dialog — Scrolling Content',
+ description:
+ 'Dialog with constrained max height and scrollable body content.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Dialog', 'Layout', 'Button', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogScrollingContent.tsx b/packages/cli/templates/blocks/components/Dialog/DialogScrollingContent.tsx
new file mode 100644
index 0000000000..b75801b402
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogScrollingContent.tsx
@@ -0,0 +1,68 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';
+import {
+ XDSLayout,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+import {XDSText} from '@xds/core/Text';
+
+export default function DialogScrollingContent() {
+ const [isOpen, setIsOpen] = useState(false);
+
+ return (
+ <>
+ <XDSButton
+ label="Open Scrolling Modal"
+ variant="secondary"
+ onClick={() => setIsOpen(true)}
+ />
+ <XDSDialog isOpen={isOpen} onOpenChange={setIsOpen} maxHeight="50vh">
+ <XDSLayout
+ header={
+ <XDSDialogHeader
+ title="Terms and Conditions"
+ onOpenChange={setIsOpen}
+ />
+ }
+ content={
+ <XDSLayoutContent>
+ <div
+ style={{display: 'flex', flexDirection: 'column', gap: 12}}>
+ {Array.from({length: 20}, (_, i) => (
+ <XDSText type="body" key={i}>
+ {i + 1}. Lorem ipsum dolor sit amet, consectetur adipiscing
+ elit. Sed do eiusmod tempor incididunt ut labore et dolore
+ magna aliqua. Ut enim ad minim veniam, quis nostrud
+ exercitation ullamco laboris nisi ut aliquip ex ea commodo
+ consequat.
+ </XDSText>
+ ))}
+ </div>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton
+ label="Decline"
+ variant="secondary"
+ onClick={() => setIsOpen(false)}
+ />
+ <XDSButton
+ label="Accept"
+ variant="primary"
+ onClick={() => setIsOpen(false)}
+ />
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSDialog>
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogStaticPosition.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogStaticPosition.doc.mjs
deleted file mode 100644
index bd03cbb160..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogStaticPosition.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Dialog — Static Position',
- description: 'Dialog positioned at a fixed location instead of centered.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Dialog', 'Button', 'Layout'],
-};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogStaticPosition.tsx b/packages/cli/templates/blocks/components/Dialog/DialogStaticPosition.tsx
deleted file mode 100644
index be1dd9bb8c..0000000000
--- a/packages/cli/templates/blocks/components/Dialog/DialogStaticPosition.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDialog} from '@xds/core/Dialog';
-import {XDSButton} from '@xds/core/Button';
-import {XDSLayoutContent} from '@xds/core/Layout';
-
-export default function DialogStaticPosition() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <>
- <XDSButton label="Open Positioned Dialog" onClick={() => setIsOpen(true)} />
-
- <XDSDialog
- isOpen={isOpen}
- onOpenChange={open => setIsOpen(open)}
- position={{top: 100, right: 20}}>
- <XDSLayoutContent>
- <p>Dialog positioned at a static location.</p>
- <XDSButton label="Close" onClick={() => setIsOpen(false)} />
- </XDSLayoutContent>
- </XDSDialog>
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogWithSubtitle.doc.mjs b/packages/cli/templates/blocks/components/Dialog/DialogWithSubtitle.doc.mjs
new file mode 100644
index 0000000000..a85cc0e06e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogWithSubtitle.doc.mjs
@@ -0,0 +1,9 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Dialog — With Subtitle',
+ description: 'Modal dialog with a title and subtitle in the header.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Dialog', 'Layout', 'Button', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Dialog/DialogWithSubtitle.tsx b/packages/cli/templates/blocks/components/Dialog/DialogWithSubtitle.tsx
new file mode 100644
index 0000000000..278d375262
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Dialog/DialogWithSubtitle.tsx
@@ -0,0 +1,61 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';
+import {
+ XDSLayout,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+import {XDSText} from '@xds/core/Text';
+
+export default function DialogWithSubtitle() {
+ const [isOpen, setIsOpen] = useState(false);
+
+ return (
+ <>
+ <XDSButton
+ label="Open Modal with Subtitle"
+ variant="secondary"
+ onClick={() => setIsOpen(true)}
+ />
+ <XDSDialog isOpen={isOpen} onOpenChange={setIsOpen}>
+ <XDSLayout
+ header={
+ <XDSDialogHeader
+ title="Edit User Profile"
+ subtitle="Make changes to your account settings"
+ onOpenChange={setIsOpen}
+ />
+ }
+ content={
+ <XDSLayoutContent>
+ <XDSText type="body">
+ The subtitle appears below the title in smaller, secondary text.
+ It provides additional context about the dialog&apos;s purpose.
+ </XDSText>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton
+ label="Cancel"
+ variant="secondary"
+ onClick={() => setIsOpen(false)}
+ />
+ <XDSButton
+ label="Save Changes"
+ variant="primary"
+ onClick={() => setIsOpen(false)}
+ />
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSDialog>
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Divider/DividerBasic.tsx b/packages/cli/templates/blocks/components/Divider/DividerBasic.tsx
deleted file mode 100644
index 61d4b1ab6b..0000000000
--- a/packages/cli/templates/blocks/components/Divider/DividerBasic.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSDivider} from '@xds/core/Divider';
-
-export default function DividerBasic() {
- return <XDSDivider />;
-}
diff --git a/packages/cli/templates/blocks/components/Divider/DividerFullBleed.doc.mjs b/packages/cli/templates/blocks/components/Divider/DividerFullBleed.doc.mjs
index 9336069f46..3dd8bb3c8b 100644
--- a/packages/cli/templates/blocks/components/Divider/DividerFullBleed.doc.mjs
+++ b/packages/cli/templates/blocks/components/Divider/DividerFullBleed.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Divider — Full Bleed',
- description: 'Divider extending to container edges with negative margins.',
+ description: 'Full-bleed divider that extends past container padding.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Divider'],
};
diff --git a/packages/cli/templates/blocks/components/Divider/DividerFullBleed.tsx b/packages/cli/templates/blocks/components/Divider/DividerFullBleed.tsx
index fc5d8896f7..c0c98d7871 100644
--- a/packages/cli/templates/blocks/components/Divider/DividerFullBleed.tsx
+++ b/packages/cli/templates/blocks/components/Divider/DividerFullBleed.tsx
@@ -1,7 +1,24 @@
'use client';
import {XDSDivider} from '@xds/core/Divider';
+import {XDSCard} from '@xds/core/Card';
+import {XDSSection} from '@xds/core/Section';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
export default function DividerFullBleed() {
- return <XDSDivider isFullBleed />;
+ return (
+ <XDSSection variant="wash">
+ <XDSCard>
+ <XDSVStack gap={3}>
+ <XDSText type="label">Full bleed divider</XDSText>
+ <XDSText type="body">
+ The divider extends to container edges, ignoring padding.
+ </XDSText>
+ <XDSDivider isFullBleed />
+ <XDSText type="body">Content below the divider.</XDSText>
+ </XDSVStack>
+ </XDSCard>
+ </XDSSection>
+ );
}
diff --git a/packages/cli/templates/blocks/components/Divider/DividerBasic.doc.mjs b/packages/cli/templates/blocks/components/Divider/DividerInCard.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/Divider/DividerBasic.doc.mjs
rename to packages/cli/templates/blocks/components/Divider/DividerInCard.doc.mjs
index 4cff99ed26..f7e6fbba01 100644
--- a/packages/cli/templates/blocks/components/Divider/DividerBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/Divider/DividerInCard.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Divider — Basic',
- description: 'A simple horizontal divider line.',
+ name: 'Divider — In Card',
+ description:
+ 'Multiple dividers within a card to separate title, body, and details.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Divider'],
};
diff --git a/packages/cli/templates/blocks/components/Divider/DividerInCard.tsx b/packages/cli/templates/blocks/components/Divider/DividerInCard.tsx
new file mode 100644
index 0000000000..e8b33b7b1d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Divider/DividerInCard.tsx
@@ -0,0 +1,28 @@
+'use client';
+
+import {XDSDivider} from '@xds/core/Divider';
+import {XDSCard} from '@xds/core/Card';
+import {XDSSection} from '@xds/core/Section';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
+
+export default function DividerInCard() {
+ return (
+ <XDSSection variant="wash">
+ <XDSCard>
+ <XDSVStack gap={3}>
+ <XDSText type="label">Card Title</XDSText>
+ <XDSDivider />
+ <XDSText type="body">
+ This demonstrates how a divider can be used to separate content
+ sections within a card or panel.
+ </XDSText>
+ <XDSDivider label="More Info" />
+ <XDSText type="supporting">
+ Additional details can appear below a labeled divider.
+ </XDSText>
+ </XDSVStack>
+ </XDSCard>
+ </XDSSection>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Divider/DividerStrongVariant.doc.mjs b/packages/cli/templates/blocks/components/Divider/DividerStrongVariant.doc.mjs
deleted file mode 100644
index 991cfba25d..0000000000
--- a/packages/cli/templates/blocks/components/Divider/DividerStrongVariant.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Divider — Strong Variant',
- description: 'Divider with stronger visual weight for emphasis.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Divider'],
-};
diff --git a/packages/cli/templates/blocks/components/Divider/DividerStrongVariant.tsx b/packages/cli/templates/blocks/components/Divider/DividerStrongVariant.tsx
deleted file mode 100644
index 7d911b4b3c..0000000000
--- a/packages/cli/templates/blocks/components/Divider/DividerStrongVariant.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSDivider} from '@xds/core/Divider';
-
-export default function DividerStrongVariant() {
- return <XDSDivider variant="strong" />;
-}
diff --git a/packages/cli/templates/blocks/components/Divider/DividerVertical.doc.mjs b/packages/cli/templates/blocks/components/Divider/DividerVertical.doc.mjs
index 070c29e139..fc9dfe3706 100644
--- a/packages/cli/templates/blocks/components/Divider/DividerVertical.doc.mjs
+++ b/packages/cli/templates/blocks/components/Divider/DividerVertical.doc.mjs
@@ -4,6 +4,6 @@ export const doc = {
name: 'Divider — Vertical',
description: 'Vertical divider separating side-by-side content.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Divider'],
};
diff --git a/packages/cli/templates/blocks/components/Divider/DividerVertical.tsx b/packages/cli/templates/blocks/components/Divider/DividerVertical.tsx
index db66d8c7b9..728823324f 100644
--- a/packages/cli/templates/blocks/components/Divider/DividerVertical.tsx
+++ b/packages/cli/templates/blocks/components/Divider/DividerVertical.tsx
@@ -1,13 +1,21 @@
'use client';
import {XDSDivider} from '@xds/core/Divider';
+import {XDSCard} from '@xds/core/Card';
+import {XDSSection} from '@xds/core/Section';
+import {XDSHStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
export default function DividerVertical() {
return (
- <div style={{display: 'flex', height: 100, alignItems: 'center'}}>
- <span>Left</span>
- <XDSDivider orientation="vertical" />
- <span>Right</span>
- </div>
+ <XDSSection variant="wash">
+ <XDSCard height={200}>
+ <XDSHStack gap={4} style={{height: '100%'}}>
+ <XDSText type="body">Left content</XDSText>
+ <XDSDivider orientation="vertical" />
+ <XDSText type="body">Right content</XDSText>
+ </XDSHStack>
+ </XDSCard>
+ </XDSSection>
);
}
diff --git a/packages/cli/templates/blocks/components/Divider/DividerWithLabel.doc.mjs b/packages/cli/templates/blocks/components/Divider/DividerWithLabel.doc.mjs
index 17e36c3042..f321796c0e 100644
--- a/packages/cli/templates/blocks/components/Divider/DividerWithLabel.doc.mjs
+++ b/packages/cli/templates/blocks/components/Divider/DividerWithLabel.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Divider — With Label',
- description: 'Divider with a centered text label.',
+ description: 'Horizontal divider with a centered text label.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['Divider'],
};
diff --git a/packages/cli/templates/blocks/components/Divider/DividerWithLabel.tsx b/packages/cli/templates/blocks/components/Divider/DividerWithLabel.tsx
index aba2a468b3..59d87a1155 100644
--- a/packages/cli/templates/blocks/components/Divider/DividerWithLabel.tsx
+++ b/packages/cli/templates/blocks/components/Divider/DividerWithLabel.tsx
@@ -1,7 +1,21 @@
'use client';
import {XDSDivider} from '@xds/core/Divider';
+import {XDSCard} from '@xds/core/Card';
+import {XDSSection} from '@xds/core/Section';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
export default function DividerWithLabel() {
- return <XDSDivider label="or" />;
+ return (
+ <XDSSection variant="wash">
+ <XDSCard>
+ <XDSVStack gap={3}>
+ <XDSText type="body">Content above</XDSText>
+ <XDSDivider label="or" />
+ <XDSText type="body">Content below</XDSText>
+ </XDSVStack>
+ </XDSCard>
+ </XDSSection>
+ );
}
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuBasicUsage.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuBasicUsage.tsx
deleted file mode 100644
index 768350536c..0000000000
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuBasicUsage.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client';
-
-import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
-
-export default function DropdownMenuBasicUsage() {
- return (
- <XDSDropdownMenu
- button={{label: 'Actions'}}
- items={[
- {label: 'Edit', onClick: () => console.log('edit')},
- {label: 'Delete', onClick: () => console.log('delete')},
- ]}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuCompoundMode.doc.mjs b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuCompoundMode.doc.mjs
new file mode 100644
index 0000000000..6202cacd0e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuCompoundMode.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'DropdownMenu — Compound Mode',
+ description:
+ 'Compound-component pattern using JSX children instead of an items array.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['DropdownMenu', 'Divider'],
+};
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuCompoundMode.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuCompoundMode.tsx
new file mode 100644
index 0000000000..9bf11a0a49
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuCompoundMode.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSDropdownMenu, XDSDropdownMenuItem} from '@xds/core/DropdownMenu';
+import {XDSDivider} from '@xds/core/Divider';
+
+export default function DropdownMenuCompoundMode() {
+ return (
+ <XDSDropdownMenu button={{label: 'Actions'}}>
+ <XDSDropdownMenuItem label="Edit" onClick={() => {}} />
+ <XDSDropdownMenuItem label="Duplicate" onClick={() => {}} />
+ <XDSDivider />
+ <XDSDropdownMenuItem label="Delete" onClick={() => {}} />
+ </XDSDropdownMenu>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuControlledMode.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuControlledMode.tsx
deleted file mode 100644
index cac8c1a51a..0000000000
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuControlledMode.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
-
-export default function DropdownMenuControlledMode() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <XDSDropdownMenu
- button={{label: 'Options'}}
- items={[
- {label: 'Settings', onClick: () => console.log('settings')},
- {label: 'Help', onClick: () => console.log('help')},
- {label: 'Sign out', onClick: () => console.log('signout')},
- ]}
- isMenuOpen={isOpen}
- onOpenChange={setIsOpen}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuControlledMode.doc.mjs b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuControlledMode.doc.mjs
rename to packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.doc.mjs
index f4952912a3..c716c9bbc3 100644
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuControlledMode.doc.mjs
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'DropdownMenu — Controlled Mode',
- description: 'Dropdown menu with externally controlled open state.',
+ name: 'DropdownMenu — No Chevron',
+ description:
+ 'Dropdown trigger without a chevron indicator, styled as a sort toggle.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['DropdownMenu'],
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.tsx
new file mode 100644
index 0000000000..8b94686ea7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
+
+export default function DropdownMenuNoChevron() {
+ return (
+ <XDSDropdownMenu
+ button={{label: 'Sort by: Name', variant: 'ghost'}}
+ hasChevron={false}
+ items={[
+ {label: 'Name', onClick: () => {}},
+ {label: 'Date', onClick: () => {}},
+ {label: 'Size', onClick: () => {}},
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuBasicUsage.doc.mjs b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDisabledItems.doc.mjs
similarity index 61%
rename from packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuBasicUsage.doc.mjs
rename to packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDisabledItems.doc.mjs
index 4b21ed1f3f..cd3d9d37c4 100644
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuBasicUsage.doc.mjs
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDisabledItems.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'DropdownMenu — Basic Usage',
- description: 'Simple dropdown menu with actionable text items.',
+ name: 'DropdownMenu — With Disabled Items',
+ description: 'Dropdown menu with selectively disabled menu items.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['DropdownMenu'],
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDisabledItems.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDisabledItems.tsx
new file mode 100644
index 0000000000..7a49f27fd0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDisabledItems.tsx
@@ -0,0 +1,16 @@
+'use client';
+
+import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
+
+export default function DropdownMenuWithDisabledItems() {
+ return (
+ <XDSDropdownMenu
+ button={{label: 'Actions'}}
+ items={[
+ {label: 'Edit', onClick: () => {}},
+ {label: 'Duplicate', onClick: () => {}},
+ {label: 'Delete (disabled)', isDisabled: true},
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.doc.mjs b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.doc.mjs
index 23d23263fd..237680ddae 100644
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.doc.mjs
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.doc.mjs
@@ -2,7 +2,7 @@
export const doc = {
type: 'block',
name: 'DropdownMenu — With Dividers',
- description: 'Dropdown menu with visual dividers separating item groups.',
+ description: 'Dropdown menu with divider lines separating action groups.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['DropdownMenu'],
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.tsx
index 531b1acefe..c5ae016869 100644
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.tsx
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithDividers.tsx
@@ -7,9 +7,10 @@ export default function DropdownMenuWithDividers() {
<XDSDropdownMenu
button={{label: 'Actions'}}
items={[
- {label: 'Edit', onClick: () => console.log('edit')},
+ {label: 'Edit', onClick: () => {}},
+ {label: 'Duplicate', onClick: () => {}},
{type: 'divider'},
- {label: 'Delete', onClick: () => console.log('delete')},
+ {label: 'Delete', onClick: () => {}},
]}
/>
);
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithIcons.doc.mjs b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithIcons.doc.mjs
deleted file mode 100644
index 92b342f2ec..0000000000
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithIcons.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'DropdownMenu — With Icons',
- description: 'Dropdown menu items with leading icons.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['DropdownMenu'],
-};
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithIcons.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithIcons.tsx
deleted file mode 100644
index 239503647d..0000000000
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithIcons.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-'use client';
-
-import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
-
-function PencilIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" />
- </svg>
- );
-}
-
-function TrashIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <polyline points="3 6 5 6 21 6" />
- <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
- </svg>
- );
-}
-
-export default function DropdownMenuWithIcons() {
- return (
- <XDSDropdownMenu
- button={{label: 'Actions'}}
- items={[
- {label: 'Edit', icon: PencilIcon, onClick: () => console.log('edit')},
- {label: 'Delete', icon: TrashIcon, onClick: () => console.log('delete')},
- ]}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.doc.mjs b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.doc.mjs
index f6abb6e98c..aca35ffdc1 100644
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.doc.mjs
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.doc.mjs
@@ -2,7 +2,7 @@
export const doc = {
type: 'block',
name: 'DropdownMenu — With Sections',
- description: 'Dropdown menu with labeled item groups and a disabled item.',
+ description: 'Dropdown menu with titled sections grouping related actions.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['DropdownMenu'],
diff --git a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.tsx b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.tsx
index 24f7c329a8..bfa1e0416d 100644
--- a/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.tsx
+++ b/packages/cli/templates/blocks/components/DropdownMenu/DropdownMenuWithSections.tsx
@@ -11,16 +11,16 @@ export default function DropdownMenuWithSections() {
type: 'section',
title: 'Create',
items: [
- {label: 'New File', onClick: () => console.log('new file')},
- {label: 'New Folder', onClick: () => console.log('new folder')},
+ {label: 'New File', onClick: () => {}},
+ {label: 'New Folder', onClick: () => {}},
],
},
{
type: 'section',
- title: 'Manage',
+ title: 'Share',
items: [
- {label: 'Rename', onClick: () => console.log('rename')},
- {label: 'Delete', isDisabled: true},
+ {label: 'Share', onClick: () => {}},
+ {label: 'Archive', onClick: () => {}},
],
},
]}
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompact.doc.mjs b/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompact.doc.mjs
new file mode 100644
index 0000000000..afe19425d4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompact.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'EmptyState — Compact',
+ description:
+ 'Compact empty state with reduced spacing and action buttons for inline use',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['EmptyState', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompact.tsx b/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompact.tsx
new file mode 100644
index 0000000000..52ad40e133
--- /dev/null
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompact.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {XDSEmptyState} from '@xds/core/EmptyState';
+import {XDSButton} from '@xds/core/Button';
+
+export default function EmptyStateCompact() {
+ return (
+ <XDSEmptyState
+ title="No data"
+ description="Add some data to get started."
+ actions={
+ <>
+ <XDSButton label="Import" variant="secondary" />
+ <XDSButton label="Add item" variant="primary" />
+ </>
+ }
+ isCompact
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompactVariant.doc.mjs b/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompactVariant.doc.mjs
deleted file mode 100644
index 54b15b97d9..0000000000
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompactVariant.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'EmptyState — Compact Variant',
- description: 'Compact empty state with reduced spacing for constrained areas.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['EmptyState'],
-};
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompactVariant.tsx b/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompactVariant.tsx
deleted file mode 100644
index 3728af744a..0000000000
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateCompactVariant.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-'use client';
-
-import {XDSEmptyState} from '@xds/core/EmptyState';
-
-export default function EmptyStateCompactVariant() {
- return (
- <XDSEmptyState
- title="No items"
- description="Nothing to show here."
- isCompact
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.doc.mjs b/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.doc.mjs
index 2c33308320..019fdbee50 100644
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.doc.mjs
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'EmptyState — Full Example',
- description: 'Empty state with icon, title, description, and action button.',
+ name: 'EmptyState — Notifications Panel',
+ description:
+ 'Full empty state with icon, description, and actions inside a bordered container',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['EmptyState', 'Icon', 'Button'],
+ componentsUsed: ['EmptyState', 'Button'],
};
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.tsx b/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.tsx
index 43bf102eec..d72413bc7e 100644
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.tsx
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateFullExample.tsx
@@ -1,31 +1,27 @@
'use client';
import {XDSEmptyState} from '@xds/core/EmptyState';
-import {XDSIcon} from '@xds/core/Icon';
import {XDSButton} from '@xds/core/Button';
-function InboxIcon() {
- return (
- <svg
- width="24"
- height="24"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <polyline points="22 12 16 12 14 15 10 15 8 12 2 12" />
- <path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" />
- </svg>
- );
-}
-
export default function EmptyStateFullExample() {
return (
- <XDSEmptyState
- icon={<XDSIcon icon={InboxIcon} size="lg" />}
- title="No messages"
- description="You're all caught up!"
- actions={<XDSButton label="Compose" variant="primary" />}
- />
+ <div
+ style={{
+ border: '1px dashed #ccc',
+ borderRadius: 12,
+ maxWidth: 480,
+ }}>
+ <XDSEmptyState
+ icon={<span style={{fontSize: '48px'}}>📬</span>}
+ title="No notifications"
+ description="When you receive notifications, they will appear here. Check back later!"
+ actions={
+ <>
+ <XDSButton label="Settings" variant="secondary" />
+ <XDSButton label="Refresh" variant="primary" />
+ </>
+ }
+ />
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateMinimal.tsx b/packages/cli/templates/blocks/components/EmptyState/EmptyStateMinimal.tsx
deleted file mode 100644
index 59beb60d7f..0000000000
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateMinimal.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSEmptyState} from '@xds/core/EmptyState';
-
-export default function EmptyStateMinimal() {
- return <XDSEmptyState title="No results found" />;
-}
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithActions.doc.mjs b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithActions.doc.mjs
new file mode 100644
index 0000000000..df6cf7c2b7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithActions.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'EmptyState — With Actions',
+ description:
+ 'Empty state with action buttons for navigation or clearing filters',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['EmptyState', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithActions.tsx b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithActions.tsx
new file mode 100644
index 0000000000..62df593c4b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithActions.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {XDSEmptyState} from '@xds/core/EmptyState';
+import {XDSButton} from '@xds/core/Button';
+
+export default function EmptyStateWithActions() {
+ return (
+ <XDSEmptyState
+ icon={<span style={{fontSize: '48px'}}>🔍</span>}
+ title="No results found"
+ description="Try adjusting your search or filters."
+ actions={
+ <>
+ <XDSButton label="Go back" variant="secondary" />
+ <XDSButton label="Clear filters" variant="primary" />
+ </>
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithDescription.doc.mjs b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithDescription.doc.mjs
deleted file mode 100644
index e4e3352395..0000000000
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithDescription.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'EmptyState — With Description',
- description: 'Empty state with title and secondary description text.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['EmptyState'],
-};
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithDescription.tsx b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithDescription.tsx
deleted file mode 100644
index c32da5f9e7..0000000000
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithDescription.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {XDSEmptyState} from '@xds/core/EmptyState';
-
-export default function EmptyStateWithDescription() {
- return (
- <XDSEmptyState
- title="No results found"
- description="Try adjusting your search or filters."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateMinimal.doc.mjs b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithIcon.doc.mjs
similarity index 64%
rename from packages/cli/templates/blocks/components/EmptyState/EmptyStateMinimal.doc.mjs
rename to packages/cli/templates/blocks/components/EmptyState/EmptyStateWithIcon.doc.mjs
index 7e6aa054b6..16fdba1c60 100644
--- a/packages/cli/templates/blocks/components/EmptyState/EmptyStateMinimal.doc.mjs
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithIcon.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'EmptyState — Minimal',
- description: 'Minimal empty state with just a title message.',
+ name: 'EmptyState — With Icon',
+ description: 'Empty state with an emoji icon for visual context',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['EmptyState'],
diff --git a/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithIcon.tsx b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithIcon.tsx
new file mode 100644
index 0000000000..e62fbe9b42
--- /dev/null
+++ b/packages/cli/templates/blocks/components/EmptyState/EmptyStateWithIcon.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSEmptyState} from '@xds/core/EmptyState';
+
+export default function EmptyStateWithIcon() {
+ return (
+ <XDSEmptyState
+ icon={<span style={{fontSize: '48px'}}>📭</span>}
+ title="No messages"
+ description="You're all caught up!"
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Field/FieldBasicUsage.doc.mjs b/packages/cli/templates/blocks/components/Field/FieldBasicUsage.doc.mjs
deleted file mode 100644
index ebbaf7137b..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldBasicUsage.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Field — Basic Usage',
- description: 'Form field wrapper with a label and input.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Field'],
-};
diff --git a/packages/cli/templates/blocks/components/Field/FieldBasicUsage.tsx b/packages/cli/templates/blocks/components/Field/FieldBasicUsage.tsx
deleted file mode 100644
index 47753ced52..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldBasicUsage.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {useId} from 'react';
-import {XDSField} from '@xds/core/Field';
-
-export default function FieldBasicUsage() {
- const id = useId();
-
- return (
- <XDSField label="Email" inputID={id}>
- <input id={id} />
- </XDSField>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Field/FieldDescriptionWithOptional.doc.mjs b/packages/cli/templates/blocks/components/Field/FieldDescriptionWithOptional.doc.mjs
deleted file mode 100644
index a8efb73a34..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldDescriptionWithOptional.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Field — Description With Optional',
- description: 'Optional field with description text and bullet separator indicator.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Field'],
-};
diff --git a/packages/cli/templates/blocks/components/Field/FieldDescriptionWithOptional.tsx b/packages/cli/templates/blocks/components/Field/FieldDescriptionWithOptional.tsx
deleted file mode 100644
index d77a23a668..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldDescriptionWithOptional.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-'use client';
-
-import {useId} from 'react';
-import {XDSField} from '@xds/core/Field';
-
-export default function FieldDescriptionWithOptional() {
- const bioId = useId();
- const bioDescId = useId();
-
- return (
- <XDSField
- label="Bio"
- description="Tell us about yourself"
- isOptional
- inputID={bioId}
- descriptionID={bioDescId}>
- <input id={bioId} aria-describedby={bioDescId} />
- </XDSField>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Field/FieldHiddenLabel.doc.mjs b/packages/cli/templates/blocks/components/Field/FieldHiddenLabel.doc.mjs
deleted file mode 100644
index c32f07825d..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldHiddenLabel.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Field — Hidden Label',
- description: 'Form field with a visually hidden label accessible to screen readers.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Field'],
-};
diff --git a/packages/cli/templates/blocks/components/Field/FieldHiddenLabel.tsx b/packages/cli/templates/blocks/components/Field/FieldHiddenLabel.tsx
deleted file mode 100644
index c6b949e776..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldHiddenLabel.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {useId} from 'react';
-import {XDSField} from '@xds/core/Field';
-
-export default function FieldHiddenLabel() {
- const searchId = useId();
-
- return (
- <XDSField label="Search" isLabelHidden inputID={searchId}>
- <input id={searchId} placeholder="Search..." />
- </XDSField>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Field/FieldOptional.doc.mjs b/packages/cli/templates/blocks/components/Field/FieldOptional.doc.mjs
deleted file mode 100644
index 99f4042524..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldOptional.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Field — Optional',
- description: 'Form field showing an "Optional" indicator next to the label.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Field'],
-};
diff --git a/packages/cli/templates/blocks/components/Field/FieldOptional.tsx b/packages/cli/templates/blocks/components/Field/FieldOptional.tsx
deleted file mode 100644
index d62721a433..0000000000
--- a/packages/cli/templates/blocks/components/Field/FieldOptional.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {useId} from 'react';
-import {XDSField} from '@xds/core/Field';
-
-export default function FieldOptional() {
- const nicknameId = useId();
-
- return (
- <XDSField label="Nickname" isOptional inputID={nicknameId}>
- <input id={nicknameId} placeholder="Enter your nickname" />
- </XDSField>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Field/FieldRequired.doc.mjs b/packages/cli/templates/blocks/components/Field/FieldRequired.doc.mjs
index 8e883613e3..d1d005a000 100644
--- a/packages/cli/templates/blocks/components/Field/FieldRequired.doc.mjs
+++ b/packages/cli/templates/blocks/components/Field/FieldRequired.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Field — Required',
- description: 'Form field showing a "Required" indicator next to the label.',
+ description: 'Text input marked as required with a visual indicator',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Field'],
+ componentsUsed: ['TextInput'],
};
diff --git a/packages/cli/templates/blocks/components/Field/FieldRequired.tsx b/packages/cli/templates/blocks/components/Field/FieldRequired.tsx
index 9338ec7167..00a1f96076 100644
--- a/packages/cli/templates/blocks/components/Field/FieldRequired.tsx
+++ b/packages/cli/templates/blocks/components/Field/FieldRequired.tsx
@@ -1,14 +1,19 @@
'use client';
-import {useId} from 'react';
-import {XDSField} from '@xds/core/Field';
+import {useState} from 'react';
+import {XDSTextInput} from '@xds/core/TextInput';
export default function FieldRequired() {
- const usernameId = useId();
-
+ const [value, setValue] = useState('');
return (
- <XDSField label="Username" isRequired inputID={usernameId}>
- <input id={usernameId} placeholder="Enter your username" />
- </XDSField>
+ <div style={{maxWidth: 320}}>
+ <XDSTextInput
+ label="Username"
+ isRequired
+ value={value}
+ onChange={setValue}
+ placeholder="Enter your username"
+ />
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputHiddenLabel.doc.mjs b/packages/cli/templates/blocks/components/Field/FieldStatusVariants.doc.mjs
similarity index 59%
rename from packages/cli/templates/blocks/components/TextInput/TextInputHiddenLabel.doc.mjs
rename to packages/cli/templates/blocks/components/Field/FieldStatusVariants.doc.mjs
index 136d5eced0..e8769deab6 100644
--- a/packages/cli/templates/blocks/components/TextInput/TextInputHiddenLabel.doc.mjs
+++ b/packages/cli/templates/blocks/components/Field/FieldStatusVariants.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TextInput — Hidden label',
- description: 'Hidden label',
+ name: 'Field — Validation States',
+ description:
+ 'Text inputs showing error, warning, and success validation states',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextInput'],
diff --git a/packages/cli/templates/blocks/components/Field/FieldStatusVariants.tsx b/packages/cli/templates/blocks/components/Field/FieldStatusVariants.tsx
new file mode 100644
index 0000000000..f68171ea8d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Field/FieldStatusVariants.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTextInput} from '@xds/core/TextInput';
+
+export default function FieldStatusVariants() {
+ const [email, setEmail] = useState('bad-email');
+ const [username, setUsername] = useState('admin');
+ const [apiKey, setApiKey] = useState('valid-user');
+
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 24,
+ maxWidth: 400,
+ }}>
+ <XDSTextInput
+ label="Email"
+ description="Enter your work email"
+ value={email}
+ onChange={setEmail}
+ status={{type: 'error', message: 'Please enter a valid email address'}}
+ />
+ <XDSTextInput
+ label="Username"
+ description="Choose a unique username"
+ value={username}
+ onChange={setUsername}
+ status={{
+ type: 'warning',
+ message: 'This username is reserved for administrators',
+ }}
+ />
+ <XDSTextInput
+ label="API Key"
+ description="Paste your API key"
+ value={apiKey}
+ onChange={setApiKey}
+ status={{type: 'success', message: 'API key is valid and active'}}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Field/FieldWithDescription.doc.mjs b/packages/cli/templates/blocks/components/Field/FieldWithDescription.doc.mjs
index 5e614c71c4..337380c061 100644
--- a/packages/cli/templates/blocks/components/Field/FieldWithDescription.doc.mjs
+++ b/packages/cli/templates/blocks/components/Field/FieldWithDescription.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Field — With Description',
- description: 'Form field with helper description text below the label.',
+ description: 'Text input field with a helper description below the label',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Field'],
+ componentsUsed: ['TextInput'],
};
diff --git a/packages/cli/templates/blocks/components/Field/FieldWithDescription.tsx b/packages/cli/templates/blocks/components/Field/FieldWithDescription.tsx
index e7b7f5269b..ac4b5860d7 100644
--- a/packages/cli/templates/blocks/components/Field/FieldWithDescription.tsx
+++ b/packages/cli/templates/blocks/components/Field/FieldWithDescription.tsx
@@ -1,19 +1,19 @@
'use client';
-import {useId} from 'react';
-import {XDSField} from '@xds/core/Field';
+import {useState} from 'react';
+import {XDSTextInput} from '@xds/core/TextInput';
export default function FieldWithDescription() {
- const inputId = useId();
- const descId = useId();
-
+ const [value, setValue] = useState('');
return (
- <XDSField
- label="Email"
- description="We'll never share your email"
- inputID={inputId}
- descriptionID={descId}>
- <input id={inputId} aria-describedby={descId} />
- </XDSField>
+ <div style={{maxWidth: 320}}>
+ <XDSTextInput
+ label="Email"
+ description="We'll never share your email."
+ value={value}
+ onChange={setValue}
+ placeholder="[email protected]"
+ />
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutDialogComposition.doc.mjs b/packages/cli/templates/blocks/components/FormLayout/FormLayoutDialogComposition.doc.mjs
deleted file mode 100644
index d09561c7be..0000000000
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutDialogComposition.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'FormLayout — Dialog Composition',
- description: 'Form layout inside a dialog using HTML form attribute for submit button.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Button', 'Dialog', 'FormLayout', 'Layout', 'TextInput'],
-};
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutDialogComposition.tsx b/packages/cli/templates/blocks/components/FormLayout/FormLayoutDialogComposition.tsx
deleted file mode 100644
index b084a5c78e..0000000000
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutDialogComposition.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSDialog} from '@xds/core/Dialog';
-import {XDSLayoutFooter} from '@xds/core/Layout';
-import {XDSFormLayout} from '@xds/core/FormLayout';
-import {XDSTextInput} from '@xds/core/TextInput';
-import {XDSButton} from '@xds/core/Button';
-
-export default function FormLayoutDialogComposition() {
- const [isOpen, setIsOpen] = useState(true);
- const [name, setName] = useState('');
-
- const handleSubmit = (e: React.FormEvent) => {
- e.preventDefault();
- };
-
- return (
- <XDSDialog isOpen={isOpen} onOpenChange={setIsOpen}>
- <form id="edit-form" onSubmit={handleSubmit}>
- <XDSFormLayout>
- <XDSTextInput
- label="Name"
- value={name}
- onChange={(v) => setName(v)}
- />
- </XDSFormLayout>
- </form>
- <XDSLayoutFooter>
- <XDSButton label="Save" type="submit" form="edit-form" />
- </XDSLayoutFooter>
- </XDSDialog>
- );
-}
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutVerticalLayout.doc.mjs b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.doc.mjs
similarity index 62%
rename from packages/cli/templates/blocks/components/FormLayout/FormLayoutVerticalLayout.doc.mjs
rename to packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.doc.mjs
index 3d5f2d17ca..25e19e9cee 100644
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutVerticalLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'FormLayout — Vertical Layout',
- description: 'Default vertical form layout stacking fields top-to-bottom.',
+ name: 'FormLayout — Horizontal',
+ description: 'Side-by-side form fields for short related inputs like names',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['FormLayout', 'TextInput'],
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLayout.tsx b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx
similarity index 89%
rename from packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLayout.tsx
rename to packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx
index 5bf1fe9104..78ecb9659c 100644
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLayout.tsx
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontal.tsx
@@ -4,7 +4,7 @@ import {useState} from 'react';
import {XDSFormLayout} from '@xds/core/FormLayout';
import {XDSTextInput} from '@xds/core/TextInput';
-export default function FormLayoutHorizontalLayout() {
+export default function FormLayoutHorizontal() {
const [first, setFirst] = useState('');
const [last, setLast] = useState('');
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.doc.mjs b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.doc.mjs
index 2f656065b1..c20d5208b9 100644
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.doc.mjs
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'FormLayout — Horizontal Labels',
- description: 'Horizontal-labels layout with labels to the left of inputs for settings panels.',
+ name: 'FormLayout — Settings Form',
+ description:
+ 'Horizontal-labels layout for settings pages with labels beside inputs',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['FormLayout', 'TextInput', 'Selector'],
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.tsx b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.tsx
index fd3e736f32..206602cad6 100644
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.tsx
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLabels.tsx
@@ -6,20 +6,28 @@ import {XDSTextInput} from '@xds/core/TextInput';
import {XDSSelector} from '@xds/core/Selector';
export default function FormLayoutHorizontalLabels() {
- const [name, setName] = useState('');
- const [tz, setTz] = useState('UTC');
-
- const tzs = [
- {label: 'UTC', value: 'UTC'},
- {label: 'US/Eastern', value: 'US/Eastern'},
- {label: 'US/Pacific', value: 'US/Pacific'},
- {label: 'Europe/London', value: 'Europe/London'},
- ];
+ const [displayName, setDisplayName] = useState('Jane Doe');
+ const [email, setEmail] = useState('[email protected]');
+ const [timezone, setTimezone] = useState('America/Los_Angeles');
return (
<XDSFormLayout direction="horizontal-labels">
- <XDSTextInput label="Display Name" value={name} onChange={setName} />
- <XDSSelector label="Timezone" value={tz} onChange={setTz} options={tzs} />
+ <XDSTextInput
+ label="Display Name"
+ value={displayName}
+ onChange={setDisplayName}
+ />
+ <XDSTextInput label="Email" value={email} onChange={setEmail} />
+ <XDSSelector
+ label="Timezone"
+ value={timezone}
+ onChange={v => setTimezone(v as string)}
+ options={[
+ {label: 'Pacific Time', value: 'America/Los_Angeles'},
+ {label: 'Eastern Time', value: 'America/New_York'},
+ {label: 'UTC', value: 'UTC'},
+ ]}
+ />
</XDSFormLayout>
);
}
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutMixedControls.doc.mjs b/packages/cli/templates/blocks/components/FormLayout/FormLayoutMixedControls.doc.mjs
new file mode 100644
index 0000000000..09185ea7c3
--- /dev/null
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutMixedControls.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'FormLayout — Mixed Controls',
+ description:
+ 'Form combining text inputs, a selector, and a custom checkbox group via XDSField',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['FormLayout', 'TextInput', 'Selector', 'Field'],
+};
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutMixedControls.tsx b/packages/cli/templates/blocks/components/FormLayout/FormLayoutMixedControls.tsx
new file mode 100644
index 0000000000..0cf2169740
--- /dev/null
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutMixedControls.tsx
@@ -0,0 +1,43 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSFormLayout} from '@xds/core/FormLayout';
+import {XDSTextInput} from '@xds/core/TextInput';
+import {XDSSelector} from '@xds/core/Selector';
+import {XDSField} from '@xds/core/Field';
+
+export default function FormLayoutMixedControls() {
+ const [name, setName] = useState('');
+ const [role, setRole] = useState('viewer');
+
+ return (
+ <XDSFormLayout>
+ <XDSTextInput label="Name" value={name} onChange={setName} />
+ <XDSSelector
+ label="Role"
+ value={role}
+ onChange={v => setRole(v as string)}
+ options={[
+ {label: 'Viewer', value: 'viewer'},
+ {label: 'Editor', value: 'editor'},
+ {label: 'Admin', value: 'admin'},
+ ]}
+ />
+ <XDSField label="Notifications" inputID="notif-group">
+ <div
+ id="notif-group"
+ style={{display: 'flex', flexDirection: 'column', gap: 4}}>
+ <label style={{display: 'flex', alignItems: 'center', gap: 8}}>
+ <input type="checkbox" defaultChecked /> Email
+ </label>
+ <label style={{display: 'flex', alignItems: 'center', gap: 8}}>
+ <input type="checkbox" /> SMS
+ </label>
+ <label style={{display: 'flex', alignItems: 'center', gap: 8}}>
+ <input type="checkbox" defaultChecked /> Push
+ </label>
+ </div>
+ </XDSField>
+ </XDSFormLayout>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLayout.doc.mjs b/packages/cli/templates/blocks/components/FormLayout/FormLayoutNested.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLayout.doc.mjs
rename to packages/cli/templates/blocks/components/FormLayout/FormLayoutNested.doc.mjs
index 76bf65cb0b..2f12dc9a8e 100644
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutHorizontalLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutNested.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'FormLayout — Horizontal Layout',
- description: 'Horizontal form layout arranging related fields side-by-side.',
+ name: 'FormLayout — Nested Address Form',
+ description:
+ 'Nested vertical and horizontal layouts for a multi-section address form',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['FormLayout', 'TextInput'],
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutNestedLayouts.tsx b/packages/cli/templates/blocks/components/FormLayout/FormLayoutNested.tsx
similarity index 56%
rename from packages/cli/templates/blocks/components/FormLayout/FormLayoutNestedLayouts.tsx
rename to packages/cli/templates/blocks/components/FormLayout/FormLayoutNested.tsx
index 97f636c49c..864b319f38 100644
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutNestedLayouts.tsx
+++ b/packages/cli/templates/blocks/components/FormLayout/FormLayoutNested.tsx
@@ -4,18 +4,26 @@ import {useState} from 'react';
import {XDSFormLayout} from '@xds/core/FormLayout';
import {XDSTextInput} from '@xds/core/TextInput';
-export default function FormLayoutNestedLayouts() {
+export default function FormLayoutNested() {
const [first, setFirst] = useState('');
const [last, setLast] = useState('');
const [email, setEmail] = useState('');
+ const [city, setCity] = useState('');
+ const [state, setState] = useState('');
+ const [zip, setZip] = useState('');
return (
- <XDSFormLayout direction="vertical">
+ <XDSFormLayout>
<XDSFormLayout direction="horizontal">
<XDSTextInput label="First Name" value={first} onChange={setFirst} />
<XDSTextInput label="Last Name" value={last} onChange={setLast} />
</XDSFormLayout>
<XDSTextInput label="Email" value={email} onChange={setEmail} />
+ <XDSFormLayout direction="horizontal">
+ <XDSTextInput label="City" value={city} onChange={setCity} />
+ <XDSTextInput label="State" value={state} onChange={setState} />
+ <XDSTextInput label="ZIP" value={zip} onChange={setZip} />
+ </XDSFormLayout>
</XDSFormLayout>
);
}
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutNestedLayouts.doc.mjs b/packages/cli/templates/blocks/components/FormLayout/FormLayoutNestedLayouts.doc.mjs
deleted file mode 100644
index 67e26e062e..0000000000
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutNestedLayouts.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'FormLayout — Nested Layouts',
- description: 'Nested form layouts combining horizontal name fields with a vertical email field.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['FormLayout', 'TextInput'],
-};
diff --git a/packages/cli/templates/blocks/components/FormLayout/FormLayoutVerticalLayout.tsx b/packages/cli/templates/blocks/components/FormLayout/FormLayoutVerticalLayout.tsx
deleted file mode 100644
index 98911cbcc0..0000000000
--- a/packages/cli/templates/blocks/components/FormLayout/FormLayoutVerticalLayout.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSFormLayout} from '@xds/core/FormLayout';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-export default function FormLayoutVerticalLayout() {
- const [name, setName] = useState('');
- const [email, setEmail] = useState('');
-
- return (
- <XDSFormLayout>
- <XDSTextInput label="Name" value={name} onChange={setName} />
- <XDSTextInput label="Email" value={email} onChange={setEmail} />
- </XDSFormLayout>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Grid/GridAutoFitMaxColumns.tsx b/packages/cli/templates/blocks/components/Grid/GridAutoFitMaxColumns.tsx
deleted file mode 100644
index 94f185c5b8..0000000000
--- a/packages/cli/templates/blocks/components/Grid/GridAutoFitMaxColumns.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-'use client';
-
-import {XDSGrid} from '@xds/core/Grid';
-
-function Card() {
- return (
- <div
- style={{
- background: 'var(--color-background-secondary)',
- borderRadius: 8,
- padding: 16,
- textAlign: 'center',
- }}>
- Card
- </div>
- );
-}
-
-export default function GridAutoFitMaxColumns() {
- return (
- <XDSGrid minChildWidth={200} columns={4} gap={4}>
- <Card />
- <Card />
- <Card />
- <Card />
- <Card />
- </XDSGrid>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Grid/GridDashboardLayout.doc.mjs b/packages/cli/templates/blocks/components/Grid/GridDashboardLayout.doc.mjs
new file mode 100644
index 0000000000..bb6845dd4f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Grid/GridDashboardLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Grid — Dashboard Layout',
+ description:
+ 'Dashboard-style grid with a featured chart spanning 2x2, metric cards, and a full-width section',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Grid', 'GridSpan', 'Card', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Grid/GridDashboardLayout.tsx b/packages/cli/templates/blocks/components/Grid/GridDashboardLayout.tsx
new file mode 100644
index 0000000000..8e190ceeac
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Grid/GridDashboardLayout.tsx
@@ -0,0 +1,49 @@
+'use client';
+
+import {XDSGrid, XDSGridSpan} from '@xds/core/Grid';
+import {XDSCard} from '@xds/core/Card';
+import {XDSText} from '@xds/core/Text';
+
+const metrics = [
+ {label: 'Metric 1', description: 'Quick stat'},
+ {label: 'Metric 2', description: 'Quick stat'},
+ {label: 'Metric 3', description: 'Quick stat'},
+ {label: 'Metric 4', description: 'Quick stat'},
+];
+
+export default function GridDashboardLayout() {
+ return (
+ <XDSGrid columns={4} gap={4}>
+ <XDSGridSpan columns={2} rows={2}>
+ <XDSCard>
+ <XDSText type="label" display="block">
+ Main Chart
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ Large visualization widget
+ </XDSText>
+ </XDSCard>
+ </XDSGridSpan>
+ {metrics.map(m => (
+ <XDSCard key={m.label}>
+ <XDSText type="label" display="block">
+ {m.label}
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ {m.description}
+ </XDSText>
+ </XDSCard>
+ ))}
+ <XDSGridSpan columns="full">
+ <XDSCard>
+ <XDSText type="label" display="block">
+ Full-width Section
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ This section spans the entire width of the grid
+ </XDSText>
+ </XDSCard>
+ </XDSGridSpan>
+ </XDSGrid>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Grid/GridDense.doc.mjs b/packages/cli/templates/blocks/components/Grid/GridDense.doc.mjs
deleted file mode 100644
index 14bdb32799..0000000000
--- a/packages/cli/templates/blocks/components/Grid/GridDense.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Grid — Dense',
- description: 'Dense 6-column grid for compact controls like icon grids or color swatches.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Grid', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Grid/GridDense.tsx b/packages/cli/templates/blocks/components/Grid/GridDense.tsx
deleted file mode 100644
index bf6056e726..0000000000
--- a/packages/cli/templates/blocks/components/Grid/GridDense.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-'use client';
-
-import {XDSGrid} from '@xds/core/Grid';
-import {XDSButton} from '@xds/core/Button';
-
-function StarIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />
- </svg>
- );
-}
-
-const items = [
- {id: '1', label: 'Star'},
- {id: '2', label: 'Star'},
- {id: '3', label: 'Star'},
- {id: '4', label: 'Star'},
- {id: '5', label: 'Star'},
- {id: '6', label: 'Star'},
-];
-
-export default function GridDense() {
- return (
- <XDSGrid columns={6} gap={2}>
- {items.map(item => (
- <XDSButton
- key={item.id}
- label={item.label}
- icon={<StarIcon />}
- variant="ghost"
- size="sm"
- />
- ))}
- </XDSGrid>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Grid/GridFixedColumns.doc.mjs b/packages/cli/templates/blocks/components/Grid/GridFixedColumns.doc.mjs
deleted file mode 100644
index d935fdcb3d..0000000000
--- a/packages/cli/templates/blocks/components/Grid/GridFixedColumns.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Grid — Fixed Columns',
- description: 'Fixed 3-column grid layout with consistent gap spacing.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Grid'],
-};
diff --git a/packages/cli/templates/blocks/components/Grid/GridFixedColumns.tsx b/packages/cli/templates/blocks/components/Grid/GridFixedColumns.tsx
deleted file mode 100644
index a0b531a03a..0000000000
--- a/packages/cli/templates/blocks/components/Grid/GridFixedColumns.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-'use client';
-
-import {XDSGrid} from '@xds/core/Grid';
-
-function Item() {
- return (
- <div
- style={{
- background: 'var(--color-background-secondary)',
- borderRadius: 8,
- padding: 16,
- textAlign: 'center',
- }}>
- Item
- </div>
- );
-}
-
-export default function GridFixedColumns() {
- return (
- <XDSGrid columns={3} gap={4}>
- <Item />
- <Item />
- <Item />
- </XDSGrid>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Grid/GridGalleryExample.doc.mjs b/packages/cli/templates/blocks/components/Grid/GridGalleryExample.doc.mjs
new file mode 100644
index 0000000000..409964cba4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Grid/GridGalleryExample.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Grid — Card Gallery',
+ description:
+ 'Responsive card gallery using auto-fill columns with image placeholders',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Grid', 'Card', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Grid/GridGalleryExample.tsx b/packages/cli/templates/blocks/components/Grid/GridGalleryExample.tsx
new file mode 100644
index 0000000000..e400071c76
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Grid/GridGalleryExample.tsx
@@ -0,0 +1,41 @@
+'use client';
+
+import {XDSGrid} from '@xds/core/Grid';
+import {XDSCard} from '@xds/core/Card';
+import {XDSText} from '@xds/core/Text';
+
+const cards = [
+ {title: 'Getting Started', description: 'Learn the basics of the platform.'},
+ {title: 'Components', description: 'Browse the full component library.'},
+ {title: 'Design Tokens', description: 'Colors, spacing, and typography.'},
+ {title: 'Theming', description: 'Customize the look and feel.'},
+ {title: 'Accessibility', description: 'Build inclusive experiences.'},
+ {title: 'Patterns', description: 'Common UI composition patterns.'},
+ {title: 'Migration Guide', description: 'Upgrading from previous versions.'},
+ {title: 'API Reference', description: 'Detailed prop and hook docs.'},
+];
+
+export default function GridGalleryExample() {
+ return (
+ <XDSGrid columns={{minWidth: 280}} gap={5}>
+ {cards.map(card => (
+ <XDSCard key={card.title}>
+ <div
+ style={{
+ height: 120,
+ backgroundColor: 'var(--color-background-body)',
+ borderRadius: 'var(--radius-element, 8px)',
+ marginBottom: 12,
+ }}
+ />
+ <XDSText type="label" display="block">
+ {card.title}
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ {card.description}
+ </XDSText>
+ </XDSCard>
+ ))}
+ </XDSGrid>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.doc.mjs b/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.doc.mjs
index 68d5eb40f8..d6a2f813d0 100644
--- a/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.doc.mjs
+++ b/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'Grid — Responsive Auto-Fit',
- description: 'Responsive grid with auto-fit columns that wrap based on available space.',
+ description:
+ 'Responsive grid using minChildWidth so items stretch to fill available space',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Grid'],
diff --git a/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx b/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx
index 29a3e180a8..b533f45ed4 100644
--- a/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx
+++ b/packages/cli/templates/blocks/components/Grid/GridResponsiveAutoFit.tsx
@@ -2,26 +2,48 @@
import {XDSGrid} from '@xds/core/Grid';
-function Card() {
- return (
- <div
- style={{
- background: 'var(--color-background-secondary)',
- borderRadius: 8,
- padding: 16,
- textAlign: 'center',
- }}>
- Card
- </div>
- );
-}
+const itemStyle = {
+ padding: 16,
+ backgroundColor: 'var(--color-background-body)',
+ borderRadius: 'var(--radius-element, 8px)',
+ textAlign: 'center' as const,
+};
export default function GridResponsiveAutoFit() {
return (
- <XDSGrid minChildWidth={200} gap={4}>
- <Card />
- <Card />
- <Card />
- </XDSGrid>
+ <div style={{display: 'flex', flexDirection: 'column', gap: 24}}>
+ <div>
+ <p
+ style={{
+ fontSize: 12,
+ color: 'var(--color-text-secondary)',
+ marginBottom: 8,
+ }}>
+ 2 items — cards stretch to fill available space
+ </p>
+ <XDSGrid minChildWidth={200} gap={4}>
+ <div style={itemStyle}>Item 1</div>
+ <div style={itemStyle}>Item 2</div>
+ </XDSGrid>
+ </div>
+ <div>
+ <p
+ style={{
+ fontSize: 12,
+ color: 'var(--color-text-secondary)',
+ marginBottom: 8,
+ }}>
+ 6 items — columns wrap responsively
+ </p>
+ <XDSGrid minChildWidth={200} gap={4}>
+ <div style={itemStyle}>Item 1</div>
+ <div style={itemStyle}>Item 2</div>
+ <div style={itemStyle}>Item 3</div>
+ <div style={itemStyle}>Item 4</div>
+ <div style={itemStyle}>Item 5</div>
+ <div style={itemStyle}>Item 6</div>
+ </XDSGrid>
+ </div>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/Grid/GridSpanningColumns.doc.mjs b/packages/cli/templates/blocks/components/Grid/GridSpanningColumns.doc.mjs
deleted file mode 100644
index bca9b15cd0..0000000000
--- a/packages/cli/templates/blocks/components/Grid/GridSpanningColumns.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Grid — Spanning Columns',
- description: 'Grid item spanning multiple columns using XDSGridSpan.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Grid'],
-};
diff --git a/packages/cli/templates/blocks/components/Grid/GridSpanningColumns.tsx b/packages/cli/templates/blocks/components/Grid/GridSpanningColumns.tsx
deleted file mode 100644
index 79717b3e09..0000000000
--- a/packages/cli/templates/blocks/components/Grid/GridSpanningColumns.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-'use client';
-
-import {XDSGrid, XDSGridSpan} from '@xds/core/Grid';
-
-export default function GridSpanningColumns() {
- return (
- <XDSGrid columns={3} gap={4}>
- <XDSGridSpan columns={2}>
- <div
- style={{
- background: 'var(--color-background-secondary)',
- borderRadius: 8,
- padding: 16,
- textAlign: 'center',
- }}>
- Wide item
- </div>
- </XDSGridSpan>
- <div
- style={{
- background: 'var(--color-background-secondary)',
- borderRadius: 8,
- padding: 16,
- textAlign: 'center',
- }}>
- Normal item
- </div>
- </XDSGrid>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Grid/GridWithGridSpan.doc.mjs b/packages/cli/templates/blocks/components/Grid/GridWithGridSpan.doc.mjs
new file mode 100644
index 0000000000..2847425490
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Grid/GridWithGridSpan.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Grid — Column Spanning',
+ description:
+ 'Grid items spanning multiple columns using XDSGridSpan for featured content',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Grid', 'GridSpan'],
+};
diff --git a/packages/cli/templates/blocks/components/Grid/GridWithGridSpan.tsx b/packages/cli/templates/blocks/components/Grid/GridWithGridSpan.tsx
new file mode 100644
index 0000000000..5bb7ec0960
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Grid/GridWithGridSpan.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {XDSGrid, XDSGridSpan} from '@xds/core/Grid';
+
+const itemStyle = {
+ padding: 16,
+ backgroundColor: 'var(--color-background-body)',
+ borderRadius: 'var(--radius-element, 8px)',
+ textAlign: 'center' as const,
+};
+
+const featuredStyle = {
+ padding: 24,
+ backgroundColor: 'var(--color-accent-muted)',
+ borderRadius: 'var(--radius-element, 8px)',
+ textAlign: 'center' as const,
+ height: '100%',
+ boxSizing: 'border-box' as const,
+};
+
+export default function GridWithGridSpan() {
+ return (
+ <XDSGrid columns={4} gap={4}>
+ <XDSGridSpan columns={2}>
+ <div style={featuredStyle}>Spans 2 columns</div>
+ </XDSGridSpan>
+ <div style={itemStyle}>Normal</div>
+ <div style={itemStyle}>Normal</div>
+ <div style={itemStyle}>Normal</div>
+ <XDSGridSpan columns={3}>
+ <div style={featuredStyle}>Spans 3 columns</div>
+ </XDSGridSpan>
+ <XDSGridSpan columns="full">
+ <div style={featuredStyle}>Full width (spans all columns)</div>
+ </XDSGridSpan>
+ </XDSGrid>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.doc.mjs b/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.doc.mjs
new file mode 100644
index 0000000000..e5927d64b8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Heading — Card Grid',
+ description:
+ 'Responsive card grid with truncated headings and descriptions for uniform layout',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Heading', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.tsx b/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.tsx
new file mode 100644
index 0000000000..14cb82fbaa
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Heading/HeadingCardGrid.tsx
@@ -0,0 +1,52 @@
+'use client';
+
+import {XDSHeading, XDSText} from '@xds/core/Text';
+
+const cards = [
+ {
+ title: 'Very Long Card Title That Gets Truncated',
+ updated: '1 hour ago',
+ },
+ {
+ title: 'Another Card',
+ updated: '2 hours ago',
+ },
+ {
+ title: 'Third Card With An Even Longer Title That Will Be Truncated',
+ updated: '3 hours ago',
+ },
+];
+
+export default function HeadingCardGrid() {
+ return (
+ <div
+ style={{
+ display: 'grid',
+ gridTemplateColumns: 'repeat(auto-fill, minmax(250px, 1fr))',
+ gap: 16,
+ maxWidth: 800,
+ }}>
+ {cards.map(card => (
+ <div
+ key={card.title}
+ style={{
+ padding: 16,
+ borderRadius: 8,
+ border: '1px solid #e0e0e0',
+ boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
+ }}>
+ <XDSHeading level={3} maxLines={1}>
+ {card.title}
+ </XDSHeading>
+ <XDSText type="body" maxLines={2} display="block">
+ This is a card description that might be quite long and needs to be
+ truncated after two lines to keep the card compact and uniform.
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ Updated {card.updated}
+ </XDSText>
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.doc.mjs b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.doc.mjs
new file mode 100644
index 0000000000..3263f9d929
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Heading — Page Hierarchy',
+ description:
+ 'Real-world page layout demonstrating heading levels h1 through h3 with supporting text',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Heading', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.tsx b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.tsx
new file mode 100644
index 0000000000..9eff77e5e2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Heading/HeadingPageLayout.tsx
@@ -0,0 +1,31 @@
+'use client';
+
+import {XDSHeading, XDSText} from '@xds/core/Text';
+
+export default function HeadingPageLayout() {
+ return (
+ <div style={{maxWidth: 800}}>
+ <XDSHeading level={1}>Dashboard Overview</XDSHeading>
+ <XDSText type="supporting" display="block">
+ Last updated 5 minutes ago
+ </XDSText>
+
+ <div style={{marginTop: 32}}>
+ <XDSHeading level={2}>Recent Activity</XDSHeading>
+ <XDSText type="body" display="block">
+ Here's what's been happening in your workspace.
+ </XDSText>
+ </div>
+
+ <div style={{marginTop: 24}}>
+ <XDSHeading level={3}>Today</XDSHeading>
+ <XDSText type="body" display="block">
+ • Project Alpha updated
+ <br />
+ • 3 new comments
+ <br />• Task completed
+ </XDSText>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingTruncation.doc.mjs b/packages/cli/templates/blocks/components/Heading/HeadingTruncation.doc.mjs
new file mode 100644
index 0000000000..ede85974a2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Heading/HeadingTruncation.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Heading — Truncation',
+ description:
+ 'Single-line and multi-line heading truncation with ellipsis for constrained layouts',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Heading'],
+};
diff --git a/packages/cli/templates/blocks/components/Heading/HeadingTruncation.tsx b/packages/cli/templates/blocks/components/Heading/HeadingTruncation.tsx
new file mode 100644
index 0000000000..93341a8d0f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Heading/HeadingTruncation.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {XDSHeading} from '@xds/core/Text';
+
+export default function HeadingTruncation() {
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 24}}>
+ <div style={{width: 300, border: '1px solid #ccc', padding: 12}}>
+ <XDSHeading level={2} maxLines={1}>
+ Very Long Heading That Will Be Truncated To One Line With Ellipsis
+ </XDSHeading>
+ </div>
+ <div style={{width: 300, border: '1px solid #ccc', padding: 12}}>
+ <XDSHeading level={2} maxLines={2}>
+ Very Long Heading That Will Be Truncated To Two Lines To Keep Card
+ Layout Compact
+ </XDSHeading>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardBasic.doc.mjs b/packages/cli/templates/blocks/components/HoverCard/HoverCardBasic.doc.mjs
deleted file mode 100644
index 5272e10581..0000000000
--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'HoverCard — Basic',
- description: 'Basic hover card displaying a profile card above a trigger button.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['HoverCard', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardBasic.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardBasic.tsx
deleted file mode 100644
index 8d762ff426..0000000000
--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardBasic.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client';
-
-import {XDSHoverCard} from '@xds/core/HoverCard';
-import {XDSButton} from '@xds/core/Button';
-
-function ProfileCard() {
- return (
- <div style={{padding: 16, minWidth: 200}}>
- <strong>Jane Doe</strong>
- <p style={{margin: '4px 0 0', color: 'var(--color-text-secondary)'}}>
- Software Engineer
- </p>
- </div>
- );
-}
-
-export default function HoverCardBasic() {
- return (
- <XDSHoverCard content={<ProfileCard />} placement="above">
- <XDSButton label="Hover me">Hover me</XDSButton>
- </XDSHoverCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardHook.doc.mjs b/packages/cli/templates/blocks/components/HoverCard/HoverCardHook.doc.mjs
deleted file mode 100644
index 7c794968cd..0000000000
--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardHook.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'HoverCard — Hook',
- description: 'Hover card using the useXDSHoverCard hook for full control.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['HoverCard', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardHook.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardHook.tsx
deleted file mode 100644
index fbe6e4b99c..0000000000
--- a/packages/cli/templates/blocks/components/HoverCard/HoverCardHook.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-'use client';
-
-import {useXDSHoverCard} from '@xds/core/HoverCard';
-import {XDSButton} from '@xds/core/Button';
-
-function ProfileCard() {
- return (
- <div style={{padding: 16, minWidth: 200}}>
- <strong>Jane Doe</strong>
- <p style={{margin: '4px 0 0', color: 'var(--color-text-secondary)'}}>
- Software Engineer
- </p>
- </div>
- );
-}
-
-export default function HoverCardHook() {
- const hoverCard = useXDSHoverCard({placement: 'above'});
-
- return (
- <>
- <XDSButton
- label="Hover me"
- ref={hoverCard.ref}
- aria-describedby={hoverCard.describedBy}>
- Hover me
- </XDSButton>
- {hoverCard.renderHoverCard(<ProfileCard />)}
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardHookBasedHoverCard.doc.mjs b/packages/cli/templates/blocks/components/HoverCard/HoverCardHookBasedHoverCard.doc.mjs
new file mode 100644
index 0000000000..b173ca11ef
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardHookBasedHoverCard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'HoverCard — Hook API',
+ description:
+ 'Uses the useXDSHoverCard hook for direct control over hover card behavior and placement.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['HoverCard', 'Button', 'VStack'],
+};
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardHookBasedHoverCard.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardHookBasedHoverCard.tsx
new file mode 100644
index 0000000000..68c0d52f3c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardHookBasedHoverCard.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import {useXDSHoverCard} from '@xds/core/HoverCard';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function HoverCardHookBasedHoverCard() {
+ const hoverCard = useXDSHoverCard({
+ placement: 'above',
+ delay: 200,
+ });
+
+ return (
+ <div style={{padding: 80}}>
+ <XDSButton
+ label="Using hook directly"
+ ref={hoverCard.ref}
+ aria-describedby={hoverCard.describedBy}>
+ Using hook directly
+ </XDSButton>
+ {hoverCard.renderHoverCard(
+ <div style={{width: 200}}>
+ <XDSVStack gap={2}>
+ <div style={{fontWeight: 600}}>Jane Doe</div>
+ <div style={{fontSize: 14, opacity: 0.7}}>Software Engineer</div>
+ <div style={{fontSize: 13}}>
+ Building great products with great people.
+ </div>
+ </XDSVStack>
+ </div>,
+ )}
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.doc.mjs b/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.doc.mjs
new file mode 100644
index 0000000000..ffaed62b45
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'HoverCard — Inline Text',
+ description:
+ 'Hover cards wrapping inline text nodes within a paragraph, useful for user mentions or link previews.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['HoverCard', 'VStack'],
+};
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx
new file mode 100644
index 0000000000..914e88ded4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInlineTextHoverCard.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {XDSHoverCard} from '@xds/core/HoverCard';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function HoverCardInlineTextHoverCard() {
+ return (
+ <div style={{padding: 80}}>
+ <p>
+ The project is maintained by{' '}
+ <XDSHoverCard
+ content={
+ <div style={{width: 200}}>
+ <XDSVStack gap={2}>
+ <div style={{fontWeight: 600}}>Jane Doe</div>
+ <div style={{fontSize: 14, opacity: 0.7}}>
+ Software Engineer
+ </div>
+ <div style={{fontSize: 13}}>
+ Building great products with great people.
+ </div>
+ </XDSVStack>
+ </div>
+ }
+ placement="above">
+ Jane Doe
+ </XDSHoverCard>
+ ,{' '}
+ <XDSHoverCard
+ content={
+ <div style={{width: 200}}>
+ <XDSVStack gap={2}>
+ <div style={{fontWeight: 600}}>John Smith</div>
+ <div style={{fontSize: 14, opacity: 0.7}}>Product Manager</div>
+ </XDSVStack>
+ </div>
+ }
+ placement="above">
+ John Smith
+ </XDSHoverCard>
+ , and others.
+ </p>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs
new file mode 100644
index 0000000000..ecca483c9c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'HoverCard — Interactive Content',
+ description:
+ 'A hover card with interactive buttons inside, allowing users to take actions without navigating away.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['HoverCard', 'Button', 'VStack', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx
new file mode 100644
index 0000000000..6db699bda5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx
@@ -0,0 +1,29 @@
+'use client';
+
+import {XDSHoverCard} from '@xds/core/HoverCard';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack, XDSHStack} from '@xds/core/Layout';
+
+export default function HoverCardInteractiveContent() {
+ return (
+ <div style={{padding: 80}}>
+ <XDSHoverCard
+ placement="below"
+ content={
+ <XDSVStack gap={2}>
+ <div>Interactive hover card content</div>
+ <XDSHStack gap={2}>
+ <XDSButton label="Follow" variant="primary">
+ Follow
+ </XDSButton>
+ <XDSButton label="Message">Message</XDSButton>
+ </XDSHStack>
+ </XDSVStack>
+ }>
+ <XDSButton label="Hover for interactive content">
+ Hover for interactive content
+ </XDSButton>
+ </XDSHoverCard>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.doc.mjs b/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.doc.mjs
new file mode 100644
index 0000000000..7a3978b697
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'HoverCard — Profile Preview',
+ description:
+ 'A hover card that shows a user profile summary on hover, the most common hover card pattern.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['HoverCard', 'Button', 'VStack'],
+};
diff --git a/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx b/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx
new file mode 100644
index 0000000000..ce2ba135d6
--- /dev/null
+++ b/packages/cli/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {XDSHoverCard} from '@xds/core/HoverCard';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function HoverCardProfileHoverCard() {
+ return (
+ <div style={{padding: 80}}>
+ <XDSHoverCard
+ placement="above"
+ content={
+ <div style={{width: 200}}>
+ <XDSVStack gap={2}>
+ <div style={{fontWeight: 600}}>Jane Doe</div>
+ <div style={{fontSize: 14, opacity: 0.7}}>Software Engineer</div>
+ <div style={{fontSize: 13}}>
+ Building great products with great people.
+ </div>
+ </XDSVStack>
+ </div>
+ }>
+ <XDSButton label="Hover me">Hover me</XDSButton>
+ </XDSHoverCard>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Icon/IconDirectComponents.doc.mjs b/packages/cli/templates/blocks/components/Icon/IconDirectComponents.doc.mjs
deleted file mode 100644
index 08e2947fdf..0000000000
--- a/packages/cli/templates/blocks/components/Icon/IconDirectComponents.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Icon — Direct Components',
- description: 'Icons rendered from direct SVG components with color and size variants.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Icon'],
-};
diff --git a/packages/cli/templates/blocks/components/Icon/IconDirectComponents.tsx b/packages/cli/templates/blocks/components/Icon/IconDirectComponents.tsx
deleted file mode 100644
index b1b29417a8..0000000000
--- a/packages/cli/templates/blocks/components/Icon/IconDirectComponents.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-'use client';
-
-import {XDSIcon} from '@xds/core/Icon';
-
-function HomeIcon(props: React.SVGProps<SVGSVGElement>) {
- return (
- <svg
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- {...props}>
- <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
- <polyline points="9 22 9 12 15 12 15 22" />
- </svg>
- );
-}
-
-function HeartIcon(props: React.SVGProps<SVGSVGElement>) {
- return (
- <svg viewBox="0 0 24 24" fill="currentColor" {...props}>
- <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" />
- </svg>
- );
-}
-
-export default function IconDirectComponents() {
- return (
- <div style={{display: 'flex', gap: 16, alignItems: 'center'}}>
- <XDSIcon icon={HomeIcon} />
- <XDSIcon icon={HomeIcon} color="accent" size="lg" />
- <XDSIcon icon={HeartIcon} color="negative" />
- <XDSIcon
- icon={HomeIcon}
- aria-hidden={false}
- aria-label="Home"
- role="img"
- />
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Icon/IconNonSemanticColors.doc.mjs b/packages/cli/templates/blocks/components/Icon/IconNonSemanticColors.doc.mjs
new file mode 100644
index 0000000000..ff9be61060
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconNonSemanticColors.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Icon — Non-Semantic Colors',
+ description:
+ 'Non-semantic color palette for icons including blue, red, green, teal, purple, and more.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Icon', 'HStack', 'VStack', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Icon/IconNonSemanticColors.tsx b/packages/cli/templates/blocks/components/Icon/IconNonSemanticColors.tsx
new file mode 100644
index 0000000000..3baa3a6f41
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconNonSemanticColors.tsx
@@ -0,0 +1,31 @@
+'use client';
+
+import {XDSIcon} from '@xds/core/Icon';
+import {XDSHStack, XDSVStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
+
+const colors = [
+ 'blue',
+ 'red',
+ 'green',
+ 'gray',
+ 'cyan',
+ 'teal',
+ 'yellow',
+ 'orange',
+ 'pink',
+ 'purple',
+] as const;
+
+export default function IconNonSemanticColors() {
+ return (
+ <XDSHStack gap={4} wrap="wrap">
+ {colors.map((color) => (
+ <XDSVStack key={color} gap={1} hAlign="center">
+ <XDSIcon icon="search" color={color} />
+ <XDSText type="supporting">{color}</XDSText>
+ </XDSVStack>
+ ))}
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Icon/IconSemanticColors.doc.mjs b/packages/cli/templates/blocks/components/Icon/IconSemanticColors.doc.mjs
new file mode 100644
index 0000000000..8dd0c13a79
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconSemanticColors.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Icon — Semantic Colors',
+ description:
+ 'All semantic icon color variants with labels, showing primary through warning states.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Icon', 'HStack', 'VStack', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Icon/IconSemanticColors.tsx b/packages/cli/templates/blocks/components/Icon/IconSemanticColors.tsx
new file mode 100644
index 0000000000..d789f970b3
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconSemanticColors.tsx
@@ -0,0 +1,44 @@
+'use client';
+
+import {XDSIcon} from '@xds/core/Icon';
+import {XDSHStack, XDSVStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
+
+export default function IconSemanticColors() {
+ return (
+ <XDSHStack gap={4} wrap="wrap">
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="search" color="primary" />
+ <XDSText type="supporting">primary</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="menu" color="secondary" />
+ <XDSText type="supporting">secondary</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="info" color="tertiary" />
+ <XDSText type="supporting">tertiary</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="clock" color="disabled" />
+ <XDSText type="supporting">disabled</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="calendar" color="accent" />
+ <XDSText type="supporting">accent</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="success" color="positive" />
+ <XDSText type="supporting">positive</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="error" color="negative" />
+ <XDSText type="supporting">negative</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="warning" color="warning" />
+ <XDSText type="supporting">warning</XDSText>
+ </XDSVStack>
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Icon/IconSemanticNames.doc.mjs b/packages/cli/templates/blocks/components/Icon/IconSemanticNames.doc.mjs
deleted file mode 100644
index a2d18ad22a..0000000000
--- a/packages/cli/templates/blocks/components/Icon/IconSemanticNames.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Icon — Semantic Names',
- description: 'Icons using semantic names that adapt to the active theme.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Icon'],
-};
diff --git a/packages/cli/templates/blocks/components/Icon/IconSemanticNames.tsx b/packages/cli/templates/blocks/components/Icon/IconSemanticNames.tsx
deleted file mode 100644
index 1a0074c63b..0000000000
--- a/packages/cli/templates/blocks/components/Icon/IconSemanticNames.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSIcon} from '@xds/core/Icon';
-
-export default function IconSemanticNames() {
- return (
- <div style={{display: 'flex', gap: 16, alignItems: 'center'}}>
- <XDSIcon icon="close" />
- <XDSIcon icon="chevronDown" size="sm" color="inherit" />
- <XDSIcon icon="success" color="positive" />
- <XDSIcon icon="info" size="sm" color="secondary" />
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Icon/IconSizes.doc.mjs b/packages/cli/templates/blocks/components/Icon/IconSizes.doc.mjs
new file mode 100644
index 0000000000..9b1bd2fe72
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconSizes.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Icon — Size Variants',
+ description:
+ 'All icon size variants from extra-small to large, displayed side by side for comparison.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Icon', 'HStack', 'VStack', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Icon/IconSizes.tsx b/packages/cli/templates/blocks/components/Icon/IconSizes.tsx
new file mode 100644
index 0000000000..e5b4156746
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconSizes.tsx
@@ -0,0 +1,28 @@
+'use client';
+
+import {XDSIcon} from '@xds/core/Icon';
+import {XDSHStack, XDSVStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
+
+export default function IconSizes() {
+ return (
+ <XDSHStack gap={4}>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="search" size="xsm" />
+ <XDSText type="supporting">xsm</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="search" size="sm" />
+ <XDSText type="supporting">sm</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="search" size="md" />
+ <XDSText type="supporting">md</XDSText>
+ </XDSVStack>
+ <XDSVStack gap={1} hAlign="center">
+ <XDSIcon icon="search" size="lg" />
+ <XDSText type="supporting">lg</XDSText>
+ </XDSVStack>
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Icon/IconSources.doc.mjs b/packages/cli/templates/blocks/components/Icon/IconSources.doc.mjs
deleted file mode 100644
index 1f8094eff2..0000000000
--- a/packages/cli/templates/blocks/components/Icon/IconSources.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Icon — Sources',
- description: 'Demonstrates using any SVG component as an icon source.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Icon'],
-};
diff --git a/packages/cli/templates/blocks/components/Icon/IconSources.tsx b/packages/cli/templates/blocks/components/Icon/IconSources.tsx
deleted file mode 100644
index 83aeb4676f..0000000000
--- a/packages/cli/templates/blocks/components/Icon/IconSources.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-'use client';
-
-import {XDSIcon} from '@xds/core/Icon';
-
-function HomeIcon(props: React.SVGProps<SVGSVGElement>) {
- return (
- <svg
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- {...props}>
- <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
- <polyline points="9 22 9 12 15 12 15 22" />
- </svg>
- );
-}
-
-export default function IconSources() {
- return (
- <div style={{display: 'flex', gap: 16, alignItems: 'center'}}>
- <XDSIcon icon={HomeIcon} />
- <XDSIcon icon={HomeIcon} color="accent" />
- <XDSIcon icon={HomeIcon} size="lg" />
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Icon/IconStatusIcons.doc.mjs b/packages/cli/templates/blocks/components/Icon/IconStatusIcons.doc.mjs
new file mode 100644
index 0000000000..18e0a2a6df
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconStatusIcons.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Icon — Status Indicators',
+ description:
+ 'Real-world status list using semantic icons and colors for success, warning, error, and info states.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Icon', 'VStack', 'HStack', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Icon/IconStatusIcons.tsx b/packages/cli/templates/blocks/components/Icon/IconStatusIcons.tsx
new file mode 100644
index 0000000000..9b6edf89ed
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Icon/IconStatusIcons.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {XDSIcon} from '@xds/core/Icon';
+import {XDSVStack, XDSHStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
+
+const statuses = [
+ {icon: 'success' as const, color: 'positive' as const, label: 'Deployed successfully'},
+ {icon: 'warning' as const, color: 'warning' as const, label: 'Build has warnings'},
+ {icon: 'error' as const, color: 'negative' as const, label: 'Pipeline failed'},
+ {icon: 'info' as const, color: 'accent' as const, label: 'New version available'},
+] as const;
+
+export default function IconStatusIcons() {
+ return (
+ <XDSVStack gap={3}>
+ {statuses.map((status) => (
+ <XDSHStack key={status.label} gap={2} vAlign="center">
+ <XDSIcon icon={status.icon} color={status.color} size="sm" />
+ <XDSText type="body">{status.label}</XDSText>
+ </XDSHStack>
+ ))}
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonActionBar.doc.mjs b/packages/cli/templates/blocks/components/IconButton/IconButtonActionBar.doc.mjs
new file mode 100644
index 0000000000..e791030d0b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/IconButton/IconButtonActionBar.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'IconButton — Action Bar',
+ description:
+ 'A toolbar row of ghost icon buttons for common actions like search, copy, info, and close.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['IconButton', 'Icon', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonActionBar.tsx b/packages/cli/templates/blocks/components/IconButton/IconButtonActionBar.tsx
new file mode 100644
index 0000000000..171bb422f8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/IconButton/IconButtonActionBar.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {XDSIconButton} from '@xds/core/IconButton';
+import {XDSIcon} from '@xds/core/Icon';
+import {XDSHStack} from '@xds/core/Layout';
+
+export default function IconButtonActionBar() {
+ return (
+ <XDSHStack gap={1}>
+ <XDSIconButton
+ label="Search"
+ icon={<XDSIcon icon="search" color="inherit" />}
+ variant="ghost"
+ />
+ <XDSIconButton
+ label="Copy"
+ icon={<XDSIcon icon="copy" color="inherit" />}
+ variant="ghost"
+ />
+ <XDSIconButton
+ label="Info"
+ icon={<XDSIcon icon="info" color="inherit" />}
+ variant="ghost"
+ />
+ <XDSIconButton
+ label="Menu"
+ icon={<XDSIcon icon="menu" color="inherit" />}
+ variant="ghost"
+ />
+ <XDSIconButton
+ label="Close"
+ icon={<XDSIcon icon="close" color="inherit" />}
+ variant="ghost"
+ />
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonDestructive.doc.mjs b/packages/cli/templates/blocks/components/IconButton/IconButtonDestructive.doc.mjs
deleted file mode 100644
index f4abb34d88..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonDestructive.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'IconButton — Destructive',
- description: 'Destructive variant icon button for delete actions.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['IconButton'],
-};
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonDestructive.tsx b/packages/cli/templates/blocks/components/IconButton/IconButtonDestructive.tsx
deleted file mode 100644
index 9c3146da35..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonDestructive.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-'use client';
-
-import {XDSIconButton} from '@xds/core/IconButton';
-
-function TrashIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <polyline points="3 6 5 6 21 6" />
- <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
- </svg>
- );
-}
-
-export default function IconButtonDestructive() {
- return (
- <XDSIconButton
- label="Delete"
- icon={<TrashIcon />}
- variant="destructive"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonEmoji.doc.mjs b/packages/cli/templates/blocks/components/IconButton/IconButtonEmoji.doc.mjs
deleted file mode 100644
index 68b488bc8e..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonEmoji.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'IconButton — Emoji',
- description: 'Small ghost icon button using an emoji as the icon.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['IconButton'],
-};
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonEmoji.tsx b/packages/cli/templates/blocks/components/IconButton/IconButtonEmoji.tsx
deleted file mode 100644
index 64edee5867..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonEmoji.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSIconButton} from '@xds/core/IconButton';
-
-export default function IconButtonEmoji() {
- return (
- <XDSIconButton
- label="Emoji"
- icon={<span>🚀</span>}
- variant="ghost"
- size="sm"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonGhost.doc.mjs b/packages/cli/templates/blocks/components/IconButton/IconButtonGhost.doc.mjs
deleted file mode 100644
index 590a2de434..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonGhost.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'IconButton — Ghost',
- description: 'Ghost variant icon button for subtle toolbar actions.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['IconButton'],
-};
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonGhost.tsx b/packages/cli/templates/blocks/components/IconButton/IconButtonGhost.tsx
deleted file mode 100644
index a2d1c42be4..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonGhost.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {XDSIconButton} from '@xds/core/IconButton';
-
-function GearIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <circle cx="12" cy="12" r="3" />
- <path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" />
- </svg>
- );
-}
-
-export default function IconButtonGhost() {
- return (
- <XDSIconButton label="Settings" icon={<GearIcon />} variant="ghost" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonLoadingToggle.doc.mjs b/packages/cli/templates/blocks/components/IconButton/IconButtonLoadingToggle.doc.mjs
new file mode 100644
index 0000000000..23e62f4ca8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/IconButton/IconButtonLoadingToggle.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'IconButton — Loading State',
+ description:
+ 'Icon buttons that show a loading spinner on click, demonstrating async action feedback.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['IconButton', 'Icon', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonLoadingToggle.tsx b/packages/cli/templates/blocks/components/IconButton/IconButtonLoadingToggle.tsx
new file mode 100644
index 0000000000..2f6d9c2b42
--- /dev/null
+++ b/packages/cli/templates/blocks/components/IconButton/IconButtonLoadingToggle.tsx
@@ -0,0 +1,40 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSIconButton} from '@xds/core/IconButton';
+import {XDSIcon} from '@xds/core/Icon';
+import {XDSHStack} from '@xds/core/Layout';
+
+export default function IconButtonLoadingToggle() {
+ const [loadingId, setLoadingId] = useState<string | null>(null);
+
+ function handleClick(id: string) {
+ setLoadingId(id);
+ setTimeout(() => setLoadingId(null), 1500);
+ }
+
+ return (
+ <XDSHStack gap={2}>
+ <XDSIconButton
+ label="Copy"
+ icon={<XDSIcon icon="copy" color="inherit" />}
+ variant="primary"
+ isLoading={loadingId === 'copy'}
+ onClick={() => handleClick('copy')}
+ />
+ <XDSIconButton
+ label="Search"
+ icon={<XDSIcon icon="search" color="inherit" />}
+ isLoading={loadingId === 'search'}
+ onClick={() => handleClick('search')}
+ />
+ <XDSIconButton
+ label="Close"
+ icon={<XDSIcon icon="close" color="inherit" />}
+ variant="ghost"
+ isLoading={loadingId === 'close'}
+ onClick={() => handleClick('close')}
+ />
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonPrimaryWithTooltip.doc.mjs b/packages/cli/templates/blocks/components/IconButton/IconButtonPrimaryWithTooltip.doc.mjs
deleted file mode 100644
index 5e46d82798..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonPrimaryWithTooltip.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'IconButton — Primary With Tooltip',
- description: 'Primary icon button with a tooltip shown on hover.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['IconButton'],
-};
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonPrimaryWithTooltip.tsx b/packages/cli/templates/blocks/components/IconButton/IconButtonPrimaryWithTooltip.tsx
deleted file mode 100644
index e085bef283..0000000000
--- a/packages/cli/templates/blocks/components/IconButton/IconButtonPrimaryWithTooltip.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-'use client';
-
-import {XDSIconButton} from '@xds/core/IconButton';
-
-function PlusIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <line x1="12" y1="5" x2="12" y2="19" />
- <line x1="5" y1="12" x2="19" y2="12" />
- </svg>
- );
-}
-
-export default function IconButtonPrimaryWithTooltip() {
- return (
- <XDSIconButton
- label="Add item"
- icon={<PlusIcon />}
- variant="primary"
- tooltip="Add a new item"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonTooltipIconButton.doc.mjs b/packages/cli/templates/blocks/components/IconButton/IconButtonTooltipIconButton.doc.mjs
new file mode 100644
index 0000000000..1e1a514ea8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/IconButton/IconButtonTooltipIconButton.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'IconButton — With Tooltips',
+ description:
+ 'Icon buttons with tooltip hints that appear on hover, providing context for icon-only controls.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['IconButton', 'Icon', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/IconButton/IconButtonTooltipIconButton.tsx b/packages/cli/templates/blocks/components/IconButton/IconButtonTooltipIconButton.tsx
new file mode 100644
index 0000000000..3f4ed4270c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/IconButton/IconButtonTooltipIconButton.tsx
@@ -0,0 +1,30 @@
+'use client';
+
+import {XDSIconButton} from '@xds/core/IconButton';
+import {XDSIcon} from '@xds/core/Icon';
+import {XDSHStack} from '@xds/core/Layout';
+
+export default function IconButtonTooltipIconButton() {
+ return (
+ <XDSHStack gap={2}>
+ <XDSIconButton
+ label="Search"
+ icon={<XDSIcon icon="search" color="inherit" />}
+ variant="ghost"
+ tooltip="Search items"
+ />
+ <XDSIconButton
+ label="Copy link"
+ icon={<XDSIcon icon="copy" color="inherit" />}
+ variant="ghost"
+ tooltip="Copy to clipboard"
+ />
+ <XDSIconButton
+ label="More options"
+ icon={<XDSIcon icon="moreHorizontal" color="inherit" />}
+ variant="ghost"
+ tooltip="More options"
+ />
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdInLabel.doc.mjs b/packages/cli/templates/blocks/components/Kbd/KbdInLabel.doc.mjs
deleted file mode 100644
index c9e1daaf55..0000000000
--- a/packages/cli/templates/blocks/components/Kbd/KbdInLabel.doc.mjs
+++ /dev/null
@@ -1,10 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Kbd — In Label',
- description: 'Keyboard shortcut used inline within a text label.',
- isReady: true,
- aspectRatio: 1,
-
- componentsUsed: ['Kbd'],
-};
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdInLabel.tsx b/packages/cli/templates/blocks/components/Kbd/KbdInLabel.tsx
deleted file mode 100644
index 5c6141c519..0000000000
--- a/packages/cli/templates/blocks/components/Kbd/KbdInLabel.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSKbd} from '@xds/core/Kbd';
-
-export default function KbdInLabel() {
- return (
- <span>
- Search <XDSKbd keys="mod+k" />
- </span>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdInlineInstructions.doc.mjs b/packages/cli/templates/blocks/components/Kbd/KbdInlineInstructions.doc.mjs
new file mode 100644
index 0000000000..a63fa74316
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Kbd/KbdInlineInstructions.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Kbd — Inline Instructions',
+ description:
+ 'Keyboard shortcuts rendered inline within instructional text, showing how to guide users through keyboard interactions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Kbd', 'VStack', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdInlineInstructions.tsx b/packages/cli/templates/blocks/components/Kbd/KbdInlineInstructions.tsx
new file mode 100644
index 0000000000..f5c69baceb
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Kbd/KbdInlineInstructions.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {XDSKbd} from '@xds/core/Kbd';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
+
+export default function KbdInlineInstructions() {
+ return (
+ <XDSVStack gap={3}>
+ <XDSText type="body">
+ Press <XDSKbd keys="mod+k" /> to open the command palette.
+ </XDSText>
+ <XDSText type="body">
+ Use <XDSKbd keys="mod+shift+p" /> to access all commands.
+ </XDSText>
+ <XDSText type="body">
+ Press <XDSKbd keys="escape" /> to close the dialog.
+ </XDSText>
+ <XDSText type="body">
+ Navigate with <XDSKbd keys="up" /> and <XDSKbd keys="down" /> arrow
+ keys, then press <XDSKbd keys="enter" /> to select.
+ </XDSText>
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdMenuShortcuts.doc.mjs b/packages/cli/templates/blocks/components/Kbd/KbdMenuShortcuts.doc.mjs
new file mode 100644
index 0000000000..1c60a260a9
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Kbd/KbdMenuShortcuts.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Kbd — Menu Shortcuts',
+ description:
+ 'A context menu style list with action labels and their corresponding keyboard shortcuts aligned to the right.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Kbd', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdMenuShortcuts.tsx b/packages/cli/templates/blocks/components/Kbd/KbdMenuShortcuts.tsx
new file mode 100644
index 0000000000..a43e9f6b39
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Kbd/KbdMenuShortcuts.tsx
@@ -0,0 +1,41 @@
+'use client';
+
+import {XDSKbd} from '@xds/core/Kbd';
+import {XDSText} from '@xds/core/Text';
+
+const menuItems = [
+ {label: 'Cut', keys: 'mod+x'},
+ {label: 'Copy', keys: 'mod+c'},
+ {label: 'Paste', keys: 'mod+v'},
+ {label: 'Undo', keys: 'mod+z'},
+ {label: 'Redo', keys: 'mod+shift+z'},
+] as const;
+
+export default function KbdMenuShortcuts() {
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 4,
+ padding: 8,
+ border: '1px solid #e0e0e0',
+ borderRadius: 8,
+ width: 250,
+ }}>
+ {menuItems.map((item) => (
+ <div
+ key={item.label}
+ style={{
+ display: 'flex',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ padding: 8,
+ }}>
+ <XDSText type="body">{item.label}</XDSText>
+ <XDSKbd keys={item.keys} />
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdModifierCombos.doc.mjs b/packages/cli/templates/blocks/components/Kbd/KbdModifierCombos.doc.mjs
new file mode 100644
index 0000000000..ed625c85b4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Kbd/KbdModifierCombos.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Kbd — Modifier Combinations',
+ description:
+ 'Common keyboard modifier combinations and special keys rendered as keyboard shortcut badges.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Kbd', 'VStack', 'HStack', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdModifierCombos.tsx b/packages/cli/templates/blocks/components/Kbd/KbdModifierCombos.tsx
new file mode 100644
index 0000000000..793e69e71e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Kbd/KbdModifierCombos.tsx
@@ -0,0 +1,31 @@
+'use client';
+
+import {XDSKbd} from '@xds/core/Kbd';
+import {XDSVStack, XDSHStack} from '@xds/core/Layout';
+import {XDSText} from '@xds/core/Text';
+
+export default function KbdModifierCombos() {
+ return (
+ <XDSVStack gap={3}>
+ <XDSHStack gap={4}>
+ <XDSKbd keys="mod+k" />
+ <XDSKbd keys="shift+enter" />
+ <XDSKbd keys="ctrl+c" />
+ <XDSKbd keys="alt+tab" />
+ </XDSHStack>
+ <XDSHStack gap={4}>
+ <XDSKbd keys="mod+shift+z" />
+ <XDSKbd keys="ctrl+alt+delete" />
+ <XDSKbd keys="mod+shift+p" />
+ </XDSHStack>
+ <XDSHStack gap={4}>
+ <XDSText type="body">Special keys:</XDSText>
+ <XDSKbd keys="escape" />
+ <XDSKbd keys="enter" />
+ <XDSKbd keys="backspace" />
+ <XDSKbd keys="tab" />
+ <XDSKbd keys="space" />
+ </XDSHStack>
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdMultiKeyShortcut.doc.mjs b/packages/cli/templates/blocks/components/Kbd/KbdMultiKeyShortcut.doc.mjs
deleted file mode 100644
index 5c54b8a1c2..0000000000
--- a/packages/cli/templates/blocks/components/Kbd/KbdMultiKeyShortcut.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Kbd — Multi-Key Shortcut',
- description: 'Multi-key keyboard shortcut with modifier symbols.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Kbd'],
-};
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdMultiKeyShortcut.tsx b/packages/cli/templates/blocks/components/Kbd/KbdMultiKeyShortcut.tsx
deleted file mode 100644
index 8ecc027254..0000000000
--- a/packages/cli/templates/blocks/components/Kbd/KbdMultiKeyShortcut.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSKbd} from '@xds/core/Kbd';
-
-export default function KbdMultiKeyShortcut() {
- return <XDSKbd keys="mod+shift+p" />;
-}
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdSingleShortcut.doc.mjs b/packages/cli/templates/blocks/components/Kbd/KbdSingleShortcut.doc.mjs
deleted file mode 100644
index b902dc71a0..0000000000
--- a/packages/cli/templates/blocks/components/Kbd/KbdSingleShortcut.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Kbd — Single Shortcut',
- description: 'Single keyboard shortcut displayed as styled key badges.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Kbd'],
-};
diff --git a/packages/cli/templates/blocks/components/Kbd/KbdSingleShortcut.tsx b/packages/cli/templates/blocks/components/Kbd/KbdSingleShortcut.tsx
deleted file mode 100644
index 04290cb66a..0000000000
--- a/packages/cli/templates/blocks/components/Kbd/KbdSingleShortcut.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSKbd} from '@xds/core/Kbd';
-
-export default function KbdSingleShortcut() {
- return <XDSKbd keys="mod+k" />;
-}
diff --git a/packages/cli/templates/blocks/components/Layer/LayerContextMode.doc.mjs b/packages/cli/templates/blocks/components/Layer/LayerContextMode.doc.mjs
deleted file mode 100644
index 000cade6f4..0000000000
--- a/packages/cli/templates/blocks/components/Layer/LayerContextMode.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Layer — Context Mode',
- description: 'Layer hook in context mode with CSS anchor positioning relative to a trigger.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layer'],
-};
diff --git a/packages/cli/templates/blocks/components/Layer/LayerContextMode.tsx b/packages/cli/templates/blocks/components/Layer/LayerContextMode.tsx
deleted file mode 100644
index 2b2ad0abd6..0000000000
--- a/packages/cli/templates/blocks/components/Layer/LayerContextMode.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import {useXDSLayer} from '@xds/core/Layer';
-
-function Content() {
- return (
- <div style={{padding: 12, background: 'var(--color-background-secondary)', borderRadius: 8}}>
- Layer content
- </div>
- );
-}
-
-export default function LayerContextMode() {
- const layer = useXDSLayer({mode: 'context'});
-
- return (
- <>
- <button ref={layer.ref}>Trigger</button>
- {layer.render(<Content />, {placement: 'above', alignment: 'center'})}
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Layer/LayerFixedMode.doc.mjs b/packages/cli/templates/blocks/components/Layer/LayerFixedMode.doc.mjs
deleted file mode 100644
index 12d20f3b5e..0000000000
--- a/packages/cli/templates/blocks/components/Layer/LayerFixedMode.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Layer — Fixed Mode',
- description: 'Layer hook in fixed mode with explicit x/y coordinate positioning.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layer'],
-};
diff --git a/packages/cli/templates/blocks/components/Layer/LayerFixedMode.tsx b/packages/cli/templates/blocks/components/Layer/LayerFixedMode.tsx
deleted file mode 100644
index 6fd634ea1e..0000000000
--- a/packages/cli/templates/blocks/components/Layer/LayerFixedMode.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {useXDSLayer} from '@xds/core/Layer';
-
-function Content() {
- return (
- <div style={{padding: 12, background: 'var(--color-background-secondary)', borderRadius: 8}}>
- Layer content
- </div>
- );
-}
-
-export default function LayerFixedMode() {
- const layer = useXDSLayer({mode: 'fixed'});
- const [coords, setCoords] = useState({x: 100, y: 100});
-
- const handleClick = (e: React.MouseEvent) => {
- setCoords({x: e.clientX, y: e.clientY});
- layer.show();
- };
-
- return (
- <>
- <button onClick={handleClick}>Click to show layer</button>
- {layer.render(<Content />, {x: coords.x, y: coords.y})}
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutAppShellWithSidebar.tsx b/packages/cli/templates/blocks/components/Layout/LayoutAppShellWithSidebar.tsx
deleted file mode 100644
index 1c1033f131..0000000000
--- a/packages/cli/templates/blocks/components/Layout/LayoutAppShellWithSidebar.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-'use client';
-
-import {
- XDSLayout,
- XDSLayoutHeader,
- XDSLayoutContent,
- XDSLayoutPanel,
-} from '@xds/core/Layout';
-
-function Navigation() {
- return (
- <nav>
- <ul style={{listStyle: 'none', padding: 0, margin: 0}}>
- <li style={{padding: '8px 0'}}>Dashboard</li>
- <li style={{padding: '8px 0'}}>Settings</li>
- <li style={{padding: '8px 0'}}>Profile</li>
- </ul>
- </nav>
- );
-}
-
-export default function LayoutAppShellWithSidebar() {
- return (
- <XDSLayout
- header={<XDSLayoutHeader hasDivider>App Name</XDSLayoutHeader>}
- start={
- <XDSLayoutPanel hasDivider width={240} role="navigation">
- <Navigation />
- </XDSLayoutPanel>
- }
- content={
- <XDSLayoutContent role="main">Main content goes here</XDSLayoutContent>
- }
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.doc.mjs b/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.doc.mjs
new file mode 100644
index 0000000000..525d16963e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Layout — Basic Card',
+ description:
+ 'A card layout with header, scrollable content area, and footer with action buttons.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Layout', 'LayoutHeader', 'LayoutContent', 'LayoutFooter', 'Card', 'Button', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx
new file mode 100644
index 0000000000..35a3b5795c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx
@@ -0,0 +1,50 @@
+'use client';
+
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSCard} from '@xds/core/Card';
+import {XDSButton} from '@xds/core/Button';
+
+export default function LayoutBasicCardLayout() {
+ return (
+ <XDSCard width={400} height={350}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <div style={{fontWeight: 600, fontSize: 18}}>Card Title</div>
+ </XDSLayoutHeader>
+ }
+ content={
+ <XDSLayoutContent>
+ <p style={{fontSize: 14, lineHeight: 1.5, margin: 0}}>
+ This is a basic card layout with a header, scrollable content
+ area, and footer. The layout automatically handles padding and
+ spacing between sections.
+ </p>
+ <br />
+ <p style={{fontSize: 14, lineHeight: 1.5, margin: 0}}>
+ Try scrolling this content area when it overflows.
+ </p>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter hasDivider>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton label="Cancel" variant="secondary">
+ Cancel
+ </XDSButton>
+ <XDSButton label="Save" variant="primary">
+ Save
+ </XDSButton>
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutBasicPage.doc.mjs b/packages/cli/templates/blocks/components/Layout/LayoutBasicPage.doc.mjs
deleted file mode 100644
index ba773874e4..0000000000
--- a/packages/cli/templates/blocks/components/Layout/LayoutBasicPage.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Layout — Basic Page',
- description: 'Basic page layout with header, content, and footer.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Layout'],
-};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutBasicPage.tsx b/packages/cli/templates/blocks/components/Layout/LayoutBasicPage.tsx
deleted file mode 100644
index 8d50d4ac91..0000000000
--- a/packages/cli/templates/blocks/components/Layout/LayoutBasicPage.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {
- XDSLayout,
- XDSLayoutHeader,
- XDSLayoutContent,
- XDSLayoutFooter,
-} from '@xds/core/Layout';
-
-export default function LayoutBasicPage() {
- return (
- <XDSLayout
- header={<XDSLayoutHeader hasDivider>App Name</XDSLayoutHeader>}
- content={<XDSLayoutContent>Body content</XDSLayoutContent>}
- footer={<XDSLayoutFooter hasDivider>Footer</XDSLayoutFooter>}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutCardLayout.doc.mjs b/packages/cli/templates/blocks/components/Layout/LayoutCardLayout.doc.mjs
deleted file mode 100644
index eb6f34ba2a..0000000000
--- a/packages/cli/templates/blocks/components/Layout/LayoutCardLayout.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Layout — Card Layout',
- description: 'Card with a structured layout including header, content, and action footer.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Layout', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutCardLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutCardLayout.tsx
deleted file mode 100644
index 474d7b33ba..0000000000
--- a/packages/cli/templates/blocks/components/Layout/LayoutCardLayout.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-'use client';
-
-import {
- XDSLayout,
- XDSLayoutHeader,
- XDSLayoutContent,
- XDSLayoutFooter,
- XDSCard,
- XDSHStack,
-} from '@xds/core/Layout';
-import {XDSButton} from '@xds/core/Button';
-
-export default function LayoutCardLayout() {
- return (
- <XDSCard>
- <XDSLayout
- header={<XDSLayoutHeader hasDivider>Title</XDSLayoutHeader>}
- content={<XDSLayoutContent>Body content</XDSLayoutContent>}
- footer={
- <XDSLayoutFooter hasDivider>
- <XDSHStack gap={2} hAlign="end">
- <XDSButton variant="secondary" label="Cancel">
- Cancel
- </XDSButton>
- <XDSButton variant="primary" label="Save">
- Save
- </XDSButton>
- </XDSHStack>
- </XDSLayoutFooter>
- }
- />
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.doc.mjs b/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.doc.mjs
new file mode 100644
index 0000000000..ec852e9cc7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Layout — Content Only',
+ description:
+ 'A minimal layout with just a content area inside a card, without header or footer.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Layout', 'LayoutContent', 'Card'],
+};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.tsx
new file mode 100644
index 0000000000..b2b29daf19
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutContentOnlyLayout.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {XDSLayout, XDSLayoutContent} from '@xds/core/Layout';
+import {XDSCard} from '@xds/core/Card';
+
+export default function LayoutContentOnlyLayout() {
+ return (
+ <XDSCard width={400} height={250}>
+ <XDSLayout
+ content={
+ <XDSLayoutContent>
+ <div style={{fontWeight: 600, fontSize: 18, marginBottom: 12}}>
+ Simple Content
+ </div>
+ <p style={{fontSize: 14, lineHeight: 1.5, margin: 0}}>
+ A layout can have just content without header or footer. This is
+ useful for simple cards or content blocks that don't need
+ structured sections.
+ </p>
+ </XDSLayoutContent>
+ }
+ />
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.doc.mjs b/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.doc.mjs
new file mode 100644
index 0000000000..b1473511eb
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Layout — Dual Panel',
+ description:
+ 'A file browser style layout with start panel for folders, main content for files, and end panel for details.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Layout', 'LayoutHeader', 'LayoutContent', 'LayoutPanel', 'Card'],
+};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.tsx
new file mode 100644
index 0000000000..7c159ab349
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutDualPanelLayout.tsx
@@ -0,0 +1,96 @@
+'use client';
+
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutPanel,
+} from '@xds/core/Layout';
+import {XDSCard} from '@xds/core/Card';
+
+const folders = [
+ {label: 'Documents', active: false},
+ {label: 'Projects', active: true},
+ {label: 'Downloads', active: false},
+];
+
+export default function LayoutDualPanelLayout() {
+ return (
+ <XDSCard width="100%" maxWidth={800} height={400}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <div style={{fontWeight: 600, fontSize: 18}}>File Browser</div>
+ </XDSLayoutHeader>
+ }
+ start={
+ <XDSLayoutPanel hasDivider>
+ <div
+ style={{
+ fontSize: 12,
+ fontWeight: 600,
+ textTransform: 'uppercase',
+ letterSpacing: '0.05em',
+ marginBottom: 8,
+ }}>
+ Folders
+ </div>
+ {folders.map((folder) => (
+ <div
+ key={folder.label}
+ style={{
+ padding: '8px 12px',
+ borderRadius: 6,
+ cursor: 'pointer',
+ fontSize: 14,
+ ...(folder.active ? {fontWeight: 500} : {}),
+ }}>
+ {folder.label}
+ </div>
+ ))}
+ </XDSLayoutPanel>
+ }
+ content={
+ <XDSLayoutContent>
+ <div
+ style={{
+ fontSize: 12,
+ fontWeight: 600,
+ textTransform: 'uppercase',
+ letterSpacing: '0.05em',
+ marginBottom: 8,
+ }}>
+ Files
+ </div>
+ <div
+ style={{
+ borderRadius: 8,
+ padding: 16,
+ fontSize: 14,
+ backgroundColor: 'rgba(0,0,0,0.04)',
+ }}>
+ Select a folder to view its contents
+ </div>
+ </XDSLayoutContent>
+ }
+ end={
+ <XDSLayoutPanel hasDivider>
+ <div
+ style={{
+ fontSize: 12,
+ fontWeight: 600,
+ textTransform: 'uppercase',
+ letterSpacing: '0.05em',
+ marginBottom: 8,
+ }}>
+ Details
+ </div>
+ <p style={{fontSize: 14, lineHeight: 1.5, margin: 0}}>
+ Select a file to view details
+ </p>
+ </XDSLayoutPanel>
+ }
+ />
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.doc.mjs b/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.doc.mjs
new file mode 100644
index 0000000000..9c3cb1cb41
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Layout — Full Bleed Content',
+ description:
+ 'A layout where content extends edge-to-edge with zero padding, ideal for tables or images.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Layout', 'LayoutHeader', 'LayoutContent', 'LayoutFooter', 'Card', 'Button', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.tsx b/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.tsx
new file mode 100644
index 0000000000..b4e76f8697
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutFullBleedContent.tsx
@@ -0,0 +1,50 @@
+'use client';
+
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSCard} from '@xds/core/Card';
+import {XDSButton} from '@xds/core/Button';
+
+export default function LayoutFullBleedContent() {
+ return (
+ <XDSCard width={400} height={350}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <div style={{fontWeight: 600, fontSize: 18}}>Full Bleed Example</div>
+ </XDSLayoutHeader>
+ }
+ content={
+ <XDSLayoutContent padding={0}>
+ <div
+ style={{
+ padding: 16,
+ fontSize: 14,
+ lineHeight: 1.5,
+ minHeight: 100,
+ backgroundColor: 'rgba(0,0,0,0.04)',
+ }}>
+ This content uses padding=0 to remove padding, allowing it to
+ touch the edges. Useful for tables, images, or other
+ edge-to-edge content.
+ </div>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter hasDivider>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton label="Close" variant="secondary">
+ Close
+ </XDSButton>
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.doc.mjs b/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.doc.mjs
new file mode 100644
index 0000000000..e7980102b3
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Layout — Sidebar Navigation',
+ description:
+ 'A settings page layout with a navigation sidebar panel, content area, header, and footer.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Layout', 'LayoutHeader', 'LayoutContent', 'LayoutFooter', 'LayoutPanel', 'Card', 'Button', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.tsx b/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.tsx
new file mode 100644
index 0000000000..6d4db888fd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Layout/LayoutSidebarLayout.tsx
@@ -0,0 +1,74 @@
+'use client';
+
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSLayoutPanel,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSCard} from '@xds/core/Card';
+import {XDSButton} from '@xds/core/Button';
+
+const navItems = [
+ {label: 'General', active: true},
+ {label: 'Account', active: false},
+ {label: 'Privacy', active: false},
+ {label: 'Notifications', active: false},
+ {label: 'Security', active: false},
+];
+
+export default function LayoutSidebarLayout() {
+ return (
+ <XDSCard width={700} height={400}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <div style={{fontWeight: 600, fontSize: 18}}>Settings</div>
+ </XDSLayoutHeader>
+ }
+ start={
+ <XDSLayoutPanel hasDivider role="navigation">
+ {navItems.map((item) => (
+ <div
+ key={item.label}
+ style={{
+ padding: '8px 12px',
+ borderRadius: 6,
+ cursor: 'pointer',
+ fontSize: 14,
+ ...(item.active ? {fontWeight: 500} : {}),
+ }}>
+ {item.label}
+ </div>
+ ))}
+ </XDSLayoutPanel>
+ }
+ content={
+ <XDSLayoutContent>
+ <div style={{fontWeight: 500, fontSize: 14, marginBottom: 12}}>
+ General Settings
+ </div>
+ <p style={{fontSize: 14, lineHeight: 1.5, margin: 0}}>
+ Configure your general preferences here. The sidebar navigation
+ allows you to switch between different settings sections.
+ </p>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter hasDivider>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton label="Reset" variant="secondary">
+ Reset
+ </XDSButton>
+ <XDSButton label="Save Changes" variant="primary">
+ Save Changes
+ </XDSButton>
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Link/LinkAsOverride.tsx b/packages/cli/templates/blocks/components/Link/LinkAsOverride.tsx
deleted file mode 100644
index 7581a6a820..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkAsOverride.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client';
-
-import {XDSLink} from '@xds/core/Link';
-
-function CustomRouterLink({
- href,
- children,
- ...props
-}: React.AnchorHTMLAttributes<HTMLAnchorElement>) {
- return (
- <a href={href} {...props}>
- {children}
- </a>
- );
-}
-
-export default function LinkAsOverride() {
- return (
- <XDSLink label="Docs" href="/docs" as={CustomRouterLink}>
- Docs
- </XDSLink>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkBasic.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkBasic.doc.mjs
deleted file mode 100644
index c25458f3fa..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — Basic',
- description: 'Basic anchor link with an accessible label.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkBasic.tsx b/packages/cli/templates/blocks/components/Link/LinkBasic.tsx
deleted file mode 100644
index 6b002df4fc..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkBasic.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSLink} from '@xds/core/Link';
-
-export default function LinkBasic() {
- return (
- <XDSLink label="Documentation" href="/docs">
- Documentation
- </XDSLink>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkDisabled.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkDisabled.doc.mjs
deleted file mode 100644
index d4b9a9127a..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkDisabled.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — Disabled',
- description: 'Link in a disabled state with no interaction.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkDisabled.tsx b/packages/cli/templates/blocks/components/Link/LinkDisabled.tsx
deleted file mode 100644
index 291454a60d..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkDisabled.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSLink} from '@xds/core/Link';
-
-export default function LinkDisabled() {
- return (
- <XDSLink label="Disabled" href="/disabled" isDisabled>
- Disabled Link
- </XDSLink>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkExternal.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkExternal.doc.mjs
deleted file mode 100644
index 3c5dee544e..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkExternal.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — External',
- description: 'External link that opens in a new tab with an icon indicator.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkExternal.tsx b/packages/cli/templates/blocks/components/Link/LinkExternal.tsx
deleted file mode 100644
index 0bb8ece75f..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkExternal.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSLink} from '@xds/core/Link';
-
-export default function LinkExternal() {
- return (
- <XDSLink label="GitHub" href="https://github.com" isExternalLink>
- GitHub
- </XDSLink>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkExternalLinks.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkExternalLinks.doc.mjs
new file mode 100644
index 0000000000..c475d98985
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Link/LinkExternalLinks.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Link — External Links',
+ description:
+ 'A vertical list of external links that open in a new tab with an indicator icon.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Link'],
+};
diff --git a/packages/cli/templates/blocks/components/Link/LinkExternalLinks.tsx b/packages/cli/templates/blocks/components/Link/LinkExternalLinks.tsx
new file mode 100644
index 0000000000..39ac779e23
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Link/LinkExternalLinks.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {XDSLink} from '@xds/core/Link';
+
+export default function LinkExternalLinks() {
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 8}}>
+ <XDSLink
+ label="GitHub"
+ href="https://github.com"
+ isExternalLink
+ isStandalone>
+ GitHub
+ </XDSLink>
+ <XDSLink
+ label="MDN Web Docs"
+ href="https://developer.mozilla.org"
+ isExternalLink
+ isStandalone>
+ MDN Web Docs
+ </XDSLink>
+ <XDSLink
+ label="React Documentation"
+ href="https://react.dev"
+ isExternalLink
+ hasUnderline
+ isStandalone>
+ React Documentation
+ </XDSLink>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Link/LinkInlineWithText.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkInlineLink.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/Link/LinkInlineWithText.doc.mjs
rename to packages/cli/templates/blocks/components/Link/LinkInlineLink.doc.mjs
index 770f14184b..4f90f9f70f 100644
--- a/packages/cli/templates/blocks/components/Link/LinkInlineWithText.doc.mjs
+++ b/packages/cli/templates/blocks/components/Link/LinkInlineLink.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Link — Inline With Text',
- description: 'Link used inline within text, inheriting parent font styles.',
+ name: 'Link — Inline Text',
+ description: 'A link embedded within a paragraph of body text.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Link', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/Link/LinkInlineWithText.tsx b/packages/cli/templates/blocks/components/Link/LinkInlineLink.tsx
similarity index 59%
rename from packages/cli/templates/blocks/components/Link/LinkInlineWithText.tsx
rename to packages/cli/templates/blocks/components/Link/LinkInlineLink.tsx
index c6c2c3b57f..6a8264edf3 100644
--- a/packages/cli/templates/blocks/components/Link/LinkInlineWithText.tsx
+++ b/packages/cli/templates/blocks/components/Link/LinkInlineLink.tsx
@@ -3,14 +3,14 @@
import {XDSLink} from '@xds/core/Link';
import {XDSText} from '@xds/core/Text';
-export default function LinkInlineWithText() {
+export default function LinkInlineLink() {
return (
<XDSText type="body">
Read the{' '}
- <XDSLink label="docs" href="/docs">
+ <XDSLink label="documentation" href="/docs">
documentation
</XDSLink>{' '}
- for more info.
+ for more information about using XDS components.
</XDSText>
);
}
diff --git a/packages/cli/templates/blocks/components/Link/LinkProvider.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkProvider.doc.mjs
deleted file mode 100644
index 4c3c511c84..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkProvider.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — Provider',
- description: 'Global link provider setting a custom link component for all child links.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkProvider.tsx b/packages/cli/templates/blocks/components/Link/LinkProvider.tsx
deleted file mode 100644
index 6aa235b4e0..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkProvider.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-'use client';
-
-import {XDSLink, XDSLinkProvider} from '@xds/core/Link';
-
-function CustomLink({
- href,
- children,
- ...props
-}: React.AnchorHTMLAttributes<HTMLAnchorElement>) {
- return (
- <a href={href} {...props}>
- {children}
- </a>
- );
-}
-
-export default function LinkProvider() {
- return (
- <XDSLinkProvider component={CustomLink}>
- <XDSLink label="Home" href="/">
- Home
- </XDSLink>{' '}
- <XDSLink label="About" href="/about">
- About
- </XDSLink>
- </XDSLinkProvider>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkStandalone.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkStandalone.doc.mjs
deleted file mode 100644
index 473a2fd4e5..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkStandalone.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — Standalone',
- description: 'Standalone link with base font sizing for independent use.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkStandalone.tsx b/packages/cli/templates/blocks/components/Link/LinkStandalone.tsx
deleted file mode 100644
index e24e16c1c4..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkStandalone.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSLink} from '@xds/core/Link';
-
-export default function LinkStandalone() {
- return (
- <XDSLink label="Settings" href="/settings" isStandalone>
- Settings
- </XDSLink>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkUnderlined.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkUnderlined.doc.mjs
deleted file mode 100644
index f49550643f..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkUnderlined.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — Underlined',
- description: 'Link with a persistent underline always visible.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkUnderlined.tsx b/packages/cli/templates/blocks/components/Link/LinkUnderlined.tsx
deleted file mode 100644
index aacee6fb50..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkUnderlined.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSLink} from '@xds/core/Link';
-
-export default function LinkUnderlined() {
- return (
- <XDSLink label="Privacy Policy" href="/privacy" hasUnderline>
- Privacy Policy
- </XDSLink>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkUseHook.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkUseHook.doc.mjs
deleted file mode 100644
index ec4a7f8f90..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkUseHook.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — Use Hook',
- description: 'Custom component using useXDSLinkComponent hook for polymorphic link rendering.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkUseHook.tsx b/packages/cli/templates/blocks/components/Link/LinkUseHook.tsx
deleted file mode 100644
index 3d8525e696..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkUseHook.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-'use client';
-
-import {useXDSLinkComponent} from '@xds/core/Link';
-import type {XDSLinkComponentType} from '@xds/core/Link';
-
-function MyLink({as}: {as?: XDSLinkComponentType}) {
- const LinkComponent = useXDSLinkComponent(as);
- return <LinkComponent href="/foo">Click me</LinkComponent>;
-}
-
-export default function LinkUseHook() {
- return <MyLink />;
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkWithTooltip.doc.mjs b/packages/cli/templates/blocks/components/Link/LinkWithTooltip.doc.mjs
deleted file mode 100644
index 0aee139b43..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkWithTooltip.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Link — With Tooltip',
- description: 'Link with a tooltip displayed on hover.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Link'],
-};
diff --git a/packages/cli/templates/blocks/components/Link/LinkWithTooltip.tsx b/packages/cli/templates/blocks/components/Link/LinkWithTooltip.tsx
deleted file mode 100644
index 73561b07a8..0000000000
--- a/packages/cli/templates/blocks/components/Link/LinkWithTooltip.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSLink} from '@xds/core/Link';
-
-export default function LinkWithTooltip() {
- return (
- <XDSLink
- label="Settings"
- href="/settings"
- tooltip="Configure your preferences">
- Settings
- </XDSLink>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Link/LinkAsOverride.doc.mjs b/packages/cli/templates/blocks/components/Link/LinksWithTooltips.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/Link/LinkAsOverride.doc.mjs
rename to packages/cli/templates/blocks/components/Link/LinksWithTooltips.doc.mjs
index a7e2c9fa36..0cd2d0cae5 100644
--- a/packages/cli/templates/blocks/components/Link/LinkAsOverride.doc.mjs
+++ b/packages/cli/templates/blocks/components/Link/LinksWithTooltips.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Link — As Override',
- description: 'Link rendered as a custom component via the as prop.',
+ name: 'Link — With Tooltips',
+ description:
+ 'Horizontal row of standalone links with descriptive hover tooltips.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Link'],
};
diff --git a/packages/cli/templates/blocks/components/Link/LinksWithTooltips.tsx b/packages/cli/templates/blocks/components/Link/LinksWithTooltips.tsx
new file mode 100644
index 0000000000..1c7ecb8c61
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Link/LinksWithTooltips.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {XDSLink} from '@xds/core/Link';
+
+export default function LinksWithTooltips() {
+ return (
+ <div style={{display: 'flex', gap: 16, alignItems: 'center'}}>
+ <XDSLink
+ label="Settings"
+ href="/settings"
+ tooltip="Configure your account settings"
+ isStandalone>
+ Settings
+ </XDSLink>
+ <XDSLink
+ label="Profile"
+ href="/profile"
+ tooltip="View and edit your profile"
+ isStandalone>
+ Profile
+ </XDSLink>
+ <XDSLink
+ label="Help"
+ href="/help"
+ tooltip="Get help and support"
+ color="secondary"
+ isStandalone>
+ Help
+ </XDSLink>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/List/ListBasic.doc.mjs b/packages/cli/templates/blocks/components/List/ListBasicList.doc.mjs
similarity index 62%
rename from packages/cli/templates/blocks/components/List/ListBasic.doc.mjs
rename to packages/cli/templates/blocks/components/List/ListBasicList.doc.mjs
index 1f0faff21e..8018ebfe64 100644
--- a/packages/cli/templates/blocks/components/List/ListBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/List/ListBasicList.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'List — Basic',
- description: 'Basic list with label and description for each item.',
+ description: 'Simple list with labels and descriptions for settings-style layouts.',
isReady: true,
- aspectRatio: 3 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['List'],
};
diff --git a/packages/cli/templates/blocks/components/List/ListBasic.tsx b/packages/cli/templates/blocks/components/List/ListBasicList.tsx
similarity index 70%
rename from packages/cli/templates/blocks/components/List/ListBasic.tsx
rename to packages/cli/templates/blocks/components/List/ListBasicList.tsx
index 888d4a2dbc..c20915cedd 100644
--- a/packages/cli/templates/blocks/components/List/ListBasic.tsx
+++ b/packages/cli/templates/blocks/components/List/ListBasicList.tsx
@@ -2,11 +2,12 @@
import {XDSList, XDSListItem} from '@xds/core/List';
-export default function ListBasic() {
+export default function ListBasicList() {
return (
<XDSList>
<XDSListItem label="Notifications" description="Manage your alerts" />
<XDSListItem label="Privacy" description="Control your data" />
+ <XDSListItem label="Security" description="Password and 2FA" />
</XDSList>
);
}
diff --git a/packages/cli/templates/blocks/components/List/ListInteractiveItems.doc.mjs b/packages/cli/templates/blocks/components/List/ListBulletedFeatures.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/List/ListInteractiveItems.doc.mjs
rename to packages/cli/templates/blocks/components/List/ListBulletedFeatures.doc.mjs
index 728aa8d305..e1be5f6289 100644
--- a/packages/cli/templates/blocks/components/List/ListInteractiveItems.doc.mjs
+++ b/packages/cli/templates/blocks/components/List/ListBulletedFeatures.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'List — Interactive Items',
- description: 'List with clickable and linkable interactive items.',
+ name: 'List — Bulleted Features',
+ description: 'Bulleted list of feature highlights using disc markers.',
isReady: true,
- aspectRatio: 3 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['List'],
};
diff --git a/packages/cli/templates/blocks/components/List/ListBulletedFeatures.tsx b/packages/cli/templates/blocks/components/List/ListBulletedFeatures.tsx
new file mode 100644
index 0000000000..8f168027cc
--- /dev/null
+++ b/packages/cli/templates/blocks/components/List/ListBulletedFeatures.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSList, XDSListItem} from '@xds/core/List';
+
+export default function ListBulletedFeatures() {
+ return (
+ <XDSList listStyle="disc">
+ <XDSListItem label="Accessible by default" />
+ <XDSListItem label="Themeable with StyleX" />
+ <XDSListItem label="Composable and extensible" />
+ </XDSList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/List/ListInteractiveItems.tsx b/packages/cli/templates/blocks/components/List/ListInteractiveItems.tsx
deleted file mode 100644
index 19747b6671..0000000000
--- a/packages/cli/templates/blocks/components/List/ListInteractiveItems.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {XDSList, XDSListItem} from '@xds/core/List';
-
-export default function ListInteractiveItems() {
- return (
- <XDSList>
- <XDSListItem
- label="Settings"
- onClick={() => {
- /* navigate('/settings') */
- }}
- />
- <XDSListItem label="Docs" href="/docs" target="_blank" />
- </XDSList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/List/ListMessageList.doc.mjs b/packages/cli/templates/blocks/components/List/ListMessageList.doc.mjs
new file mode 100644
index 0000000000..5e3bc0a8a4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/List/ListMessageList.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'List — Message List',
+ description:
+ 'Chat-style message list with avatars, preview text, and unread badges.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['List', 'Avatar', 'Badge'],
+};
diff --git a/packages/cli/templates/blocks/components/List/ListMessageList.tsx b/packages/cli/templates/blocks/components/List/ListMessageList.tsx
new file mode 100644
index 0000000000..a51ed66d25
--- /dev/null
+++ b/packages/cli/templates/blocks/components/List/ListMessageList.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {XDSList, XDSListItem} from '@xds/core/List';
+import {XDSAvatar} from '@xds/core/Avatar';
+import {XDSBadge} from '@xds/core/Badge';
+
+export default function ListMessageList() {
+ return (
+ <XDSList hasDividers>
+ <XDSListItem
+ label="Alex Johnson"
+ description="Hey, are we still on for lunch tomorrow?"
+ startContent={<XDSAvatar name="Alex Johnson" size={40} />}
+ onClick={() => {}}
+ endContent={<XDSBadge label="2" />}
+ />
+ <XDSListItem
+ label="Sam Rivera"
+ description="I pushed the latest changes to the repo"
+ startContent={<XDSAvatar name="Sam Rivera" size={40} />}
+ onClick={() => {}}
+ />
+ <XDSListItem
+ label="Jordan Lee"
+ description="Can you review the design spec when you get a chance?"
+ startContent={<XDSAvatar name="Jordan Lee" size={40} />}
+ onClick={() => {}}
+ endContent={<XDSBadge label="5" />}
+ />
+ </XDSList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/List/ListOrdered.tsx b/packages/cli/templates/blocks/components/List/ListOrdered.tsx
deleted file mode 100644
index 995ba2d9b7..0000000000
--- a/packages/cli/templates/blocks/components/List/ListOrdered.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {XDSList, XDSListItem} from '@xds/core/List';
-
-export default function ListOrdered() {
- return (
- <XDSList listStyle="decimal">
- <XDSListItem label="First step" />
- <XDSListItem label="Second step" />
- </XDSList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/List/ListOrdered.doc.mjs b/packages/cli/templates/blocks/components/List/ListOrderedSteps.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/List/ListOrdered.doc.mjs
rename to packages/cli/templates/blocks/components/List/ListOrderedSteps.doc.mjs
index c03b73c709..e4fc30125e 100644
--- a/packages/cli/templates/blocks/components/List/ListOrdered.doc.mjs
+++ b/packages/cli/templates/blocks/components/List/ListOrderedSteps.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'List — Ordered',
- description: 'Ordered list rendered with decimal markers.',
+ name: 'List — Ordered Steps',
+ description: 'Numbered step-by-step instructions using decimal list markers.',
isReady: true,
- aspectRatio: 3 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['List'],
};
diff --git a/packages/cli/templates/blocks/components/List/ListOrderedSteps.tsx b/packages/cli/templates/blocks/components/List/ListOrderedSteps.tsx
new file mode 100644
index 0000000000..943f12b41f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/List/ListOrderedSteps.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {XDSList, XDSListItem} from '@xds/core/List';
+
+export default function ListOrderedSteps() {
+ return (
+ <XDSList listStyle="decimal">
+ <XDSListItem
+ label="Install the package"
+ description="npm install @xds/core"
+ />
+ <XDSListItem
+ label="Import components"
+ description="import { XDSList } from '@xds/core'"
+ />
+ <XDSListItem
+ label="Start building"
+ description="Use components in your app"
+ />
+ </XDSList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/List/ListWithDividersAndHeader.doc.mjs b/packages/cli/templates/blocks/components/List/ListWithDividersAndHeader.doc.mjs
deleted file mode 100644
index 41fc8782ec..0000000000
--- a/packages/cli/templates/blocks/components/List/ListWithDividersAndHeader.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'List — With Dividers And Header',
- description: 'List with dividers between items, a header, and start content icons.',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['List', 'Icon'],
-};
diff --git a/packages/cli/templates/blocks/components/List/ListWithDividersAndHeader.tsx b/packages/cli/templates/blocks/components/List/ListWithDividersAndHeader.tsx
deleted file mode 100644
index 9728a7b867..0000000000
--- a/packages/cli/templates/blocks/components/List/ListWithDividersAndHeader.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-'use client';
-
-import {XDSList, XDSListItem} from '@xds/core/List';
-import {XDSIcon} from '@xds/core/Icon';
-
-function UserIcon(props: React.SVGProps<SVGSVGElement>) {
- return (
- <svg
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- {...props}>
- <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
- <circle cx="12" cy="7" r="4" />
- </svg>
- );
-}
-
-export default function ListWithDividersAndHeader() {
- return (
- <XDSList hasDividers header={<strong>Team Members</strong>}>
- <XDSListItem
- label="Alice Johnson"
- description="Engineering"
- startContent={<XDSIcon icon={UserIcon} />}
- />
- <XDSListItem
- label="Bob Smith"
- description="Design"
- startContent={<XDSIcon icon={UserIcon} />}
- />
- </XDSList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownBasicUsage.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownBasicUsage.tsx
deleted file mode 100644
index 2640e8c7cd..0000000000
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownBasicUsage.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSMarkdown} from '@xds/core/Markdown';
-
-export default function MarkdownBasicUsage() {
- return (
- <XDSMarkdown>
- {'# Hello\n\nThis is **bold** and _italic_ text.\n\n- Item one\n- Item two'}
- </XDSMarkdown>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownBasicUsage.doc.mjs b/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/Markdown/MarkdownBasicUsage.doc.mjs
rename to packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.doc.mjs
index 9315110463..4714dc44a1 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownBasicUsage.doc.mjs
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Markdown — Basic Usage',
- description: 'Renders a markdown string with heading, bold, italic, and list.',
+ name: 'Markdown — Cited Content',
+ description:
+ 'Markdown with inline citation references linked to external sources.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Markdown'],
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.tsx
new file mode 100644
index 0000000000..0074033ad8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownCitedContent.tsx
@@ -0,0 +1,54 @@
+'use client';
+
+import {XDSMarkdown} from '@xds/core/Markdown';
+
+const sources = {
+ abc1: {
+ title: 'Tokyo - Wikipedia',
+ url: 'https://en.wikipedia.org/wiki/Tokyo',
+ icon: 'https://en.wikipedia.org/favicon.ico',
+ },
+ def2: {
+ title: 'Japan Statistics Bureau - Population',
+ url: 'https://www.stat.go.jp/english/',
+ },
+ ghi3: {
+ title: 'World Population Review',
+ url: 'https://worldpopulationreview.com/world-cities/tokyo-population',
+ },
+ jkl4: {
+ title: 'Reuters — Tokyo GDP',
+ url: 'https://www.reuters.com/markets/',
+ icon: 'https://www.reuters.com/favicon.ico',
+ },
+ mno5: {
+ title: 'UN Urbanization Prospects',
+ url: 'https://population.un.org/wup/',
+ },
+};
+
+const content = [
+ '## Tokyo Overview',
+ '',
+ 'Tokyo is the capital of Japan with a population of over 14 million[abc1].',
+ "It's the most populous metropolitan area in the world[def2][ghi3].",
+ '',
+ '### Economy',
+ '',
+ "Tokyo's GDP exceeds $1.9 trillion, making it the largest city economy globally[jkl4].",
+ 'The metropolitan area is expected to remain the most populous urban agglomeration through 2035[mno5].',
+ '',
+ '### Key Facts',
+ '',
+ '- Population: 13.96 million (city proper)[abc1]',
+ '- Metro area: 37.4 million[def2]',
+ '- GDP: $1.93 trillion[jkl4]',
+].join('\n');
+
+export default function MarkdownCitedContent() {
+ return (
+ <XDSMarkdown sources={sources} density="compact" headingLevelStart={3}>
+ {content}
+ </XDSMarkdown>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownStreamingMode.doc.mjs b/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/Markdown/MarkdownStreamingMode.doc.mjs
rename to packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.doc.mjs
index ebdcdf89b9..557e3ff87f 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownStreamingMode.doc.mjs
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Markdown — Streaming Mode',
- description: 'Markdown with streaming mode for chunk-by-chunk text delivery with fade-in.',
+ name: 'Markdown — Compact AI Response',
+ description:
+ 'AI-style compact markdown with shifted headings, code, and blockquotes.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Markdown'],
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.tsx
new file mode 100644
index 0000000000..b2a37a0197
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownCompactAIResponse.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {XDSMarkdown} from '@xds/core/Markdown';
+
+const content = [
+ '## Setting Up a Design System',
+ '',
+ "A design system is more than a component library — it's a **shared language** between design and engineering.",
+ '',
+ '### 1. Start with Tokens',
+ '',
+ 'Design tokens are the atomic values that define your visual language:',
+ '',
+ '```typescript',
+ 'const tokens = {',
+ ' color: {',
+ " primary: '#0066FF',",
+ " secondary: '#6B7280',",
+ ' },',
+ ' spacing: {',
+ " sm: '8px',",
+ " md: '16px',",
+ " lg: '24px',",
+ ' },',
+ '};',
+ '```',
+ '',
+ '### 2. Component Architecture',
+ '',
+ 'Good components follow these principles:',
+ '',
+ '- **Composable** — small pieces that combine into complex UIs',
+ '- **Accessible** — keyboard navigation and screen reader support built-in',
+ '- **Themeable** — visual customization without forking',
+ '',
+ '> The best design systems are *opinionated enough* to ensure consistency, but *flexible enough* to handle edge cases gracefully.',
+].join('\n');
+
+export default function MarkdownCompactAIResponse() {
+ return (
+ <XDSMarkdown density="compact" headingLevelStart={3}>
+ {content}
+ </XDSMarkdown>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownNestedHeading.doc.mjs b/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/Markdown/MarkdownNestedHeading.doc.mjs
rename to packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.doc.mjs
index e27fa6cde4..cfd46e7b73 100644
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownNestedHeading.doc.mjs
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Markdown — Nested Heading',
- description: 'Markdown with shifted heading levels to fit within page hierarchy.',
+ name: 'Markdown — Data Table',
+ description:
+ 'Markdown-rendered comparison table with aligned columns and mixed data.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Markdown'],
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.tsx
new file mode 100644
index 0000000000..e1d144f295
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownDataTable.tsx
@@ -0,0 +1,18 @@
+'use client';
+
+import {XDSMarkdown} from '@xds/core/Markdown';
+
+const content = [
+ '## Comparison Table',
+ '',
+ '| Feature | React | Vue | Svelte |',
+ '|:--------|:-----:|:---:|-------:|',
+ '| Virtual DOM | Yes | Yes | No |',
+ '| Bundle Size | ~40KB | ~30KB | ~2KB |',
+ '| TypeScript | Native | Plugin | Native |',
+ '| Learning Curve | Medium | Easy | Easy |',
+].join('\n');
+
+export default function MarkdownDataTable() {
+ return <XDSMarkdown>{content}</XDSMarkdown>;
+}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownNestedHeading.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownNestedHeading.tsx
deleted file mode 100644
index 9f8fd92cf5..0000000000
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownNestedHeading.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSMarkdown} from '@xds/core/Markdown';
-
-export default function MarkdownNestedHeading() {
- return (
- <XDSMarkdown headingLevelStart={3}>
- {'# Section\n\nThis renders as an h3.'}
- </XDSMarkdown>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.doc.mjs b/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.doc.mjs
new file mode 100644
index 0000000000..cbf0195280
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Markdown — Rich Content',
+ description:
+ 'Full-featured markdown rendering with headings, lists, code blocks, tables, and blockquotes.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Markdown'],
+};
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.tsx
new file mode 100644
index 0000000000..7a996c3752
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Markdown/MarkdownRichContent.tsx
@@ -0,0 +1,55 @@
+'use client';
+
+import {XDSMarkdown} from '@xds/core/Markdown';
+
+const content = [
+ '# XDSMarkdown Demo',
+ '',
+ 'Renders **markdown** with *design-system-consistent* styling.',
+ '',
+ '## Features',
+ '',
+ '- Headings mapped to XDS type scale',
+ '- **Bold**, *italic*, and ~~strikethrough~~ text',
+ '- [Links](https://example.com) with external detection',
+ '- Inline `code` and fenced code blocks',
+ '',
+ '### Code Block',
+ '',
+ '```typescript',
+ 'interface User {',
+ ' id: string;',
+ ' name: string;',
+ '}',
+ '',
+ 'function greet(user: User) {',
+ ' return `Hello, ${user.name}!`;',
+ '}',
+ '```',
+ '',
+ '### Blockquote',
+ '',
+ '> Design systems free teams to focus on problems that matter.',
+ '',
+ '### Table',
+ '',
+ '| Component | Status | Tests |',
+ '|:----------|:------:|------:|',
+ '| XDSMarkdown | Active | 73 |',
+ '| XDSCodeBlock | Active | 44 |',
+ '',
+ '### Task List',
+ '',
+ '- [x] Parser',
+ '- [x] Renderer',
+ '- [ ] Storybook stories',
+ '',
+ '---',
+ '',
+ '1. First ordered item',
+ '2. Second ordered item',
+].join('\n');
+
+export default function MarkdownRichContent() {
+ return <XDSMarkdown>{content}</XDSMarkdown>;
+}
diff --git a/packages/cli/templates/blocks/components/Markdown/MarkdownStreamingMode.tsx b/packages/cli/templates/blocks/components/Markdown/MarkdownStreamingMode.tsx
deleted file mode 100644
index 36a1ba5392..0000000000
--- a/packages/cli/templates/blocks/components/Markdown/MarkdownStreamingMode.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-'use client';
-
-import {useState, useEffect} from 'react';
-import {XDSMarkdown} from '@xds/core/Markdown';
-
-const fullText =
- '# Streaming\n\nThis text appears **chunk by chunk** with a smooth fade-in animation.\n\n- First item\n- Second item';
-
-export default function MarkdownStreamingMode() {
- const [text, setText] = useState('');
- const [isStreaming, setIsStreaming] = useState(true);
-
- useEffect(() => {
- let i = 0;
- const interval = setInterval(() => {
- if (i < fullText.length) {
- setText(fullText.slice(0, i + 1));
- i++;
- } else {
- setIsStreaming(false);
- clearInterval(interval);
- }
- }, 20);
- return () => clearInterval(interval);
- }, []);
-
- return <XDSMarkdown isStreaming={isStreaming}>{text}</XDSMarkdown>;
-}
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListBasic.doc.mjs b/packages/cli/templates/blocks/components/MetadataList/MetadataListBasicMetadata.doc.mjs
similarity index 77%
rename from packages/cli/templates/blocks/components/MetadataList/MetadataListBasic.doc.mjs
rename to packages/cli/templates/blocks/components/MetadataList/MetadataListBasicMetadata.doc.mjs
index b07c3ec4ad..8a7aaa2713 100644
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListBasicMetadata.doc.mjs
@@ -2,7 +2,7 @@
export const doc = {
type: 'block',
name: 'MetadataList — Basic',
- description: 'Simple key-value metadata list with two items.',
+ description: 'Simple single-column key-value metadata list.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MetadataList'],
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListBasic.tsx b/packages/cli/templates/blocks/components/MetadataList/MetadataListBasicMetadata.tsx
similarity index 71%
rename from packages/cli/templates/blocks/components/MetadataList/MetadataListBasic.tsx
rename to packages/cli/templates/blocks/components/MetadataList/MetadataListBasicMetadata.tsx
index f2e9ca2359..9d27ecb58a 100644
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListBasic.tsx
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListBasicMetadata.tsx
@@ -2,11 +2,12 @@
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
-export default function MetadataListBasic() {
+export default function MetadataListBasicMetadata() {
return (
<XDSMetadataList>
<XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
+ <XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
</XDSMetadataList>
);
}
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumn.doc.mjs b/packages/cli/templates/blocks/components/MetadataList/MetadataListCollapsibleMetadata.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumn.doc.mjs
rename to packages/cli/templates/blocks/components/MetadataList/MetadataListCollapsibleMetadata.doc.mjs
index d1789aeacf..75692268a2 100644
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumn.doc.mjs
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListCollapsibleMetadata.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'MetadataList — Multi Column',
- description: 'Metadata list using auto-fill multi-column layout.',
+ name: 'MetadataList — Collapsible',
+ description:
+ 'Metadata list that truncates after a set number of items with a show-more toggle.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MetadataList'],
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumn.tsx b/packages/cli/templates/blocks/components/MetadataList/MetadataListCollapsibleMetadata.tsx
similarity index 63%
rename from packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumn.tsx
rename to packages/cli/templates/blocks/components/MetadataList/MetadataListCollapsibleMetadata.tsx
index 09fae971d7..6f48197aa6 100644
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumn.tsx
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListCollapsibleMetadata.tsx
@@ -2,13 +2,15 @@
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
-export default function MetadataListMultiColumn() {
+export default function MetadataListCollapsibleMetadata() {
return (
- <XDSMetadataList columns="multi">
+ <XDSMetadataList maxNumOfItems={3}>
<XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
<XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
<XDSMetadataListItem label="Created">Jan 15, 2026</XDSMetadataListItem>
+ <XDSMetadataListItem label="Updated">Mar 26, 2026</XDSMetadataListItem>
+ <XDSMetadataListItem label="Priority">Tier 1</XDSMetadataListItem>
</XDSMetadataList>
);
}
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontal.doc.mjs b/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontalMetadata.doc.mjs
similarity index 72%
rename from packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontal.doc.mjs
rename to packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontalMetadata.doc.mjs
index 3214781a80..65cafd8b6f 100644
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontal.doc.mjs
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontalMetadata.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'MetadataList — Horizontal',
- description: 'Horizontal metadata list with flex-wrap layout.',
+ description:
+ 'Horizontally-oriented metadata items for compact inline display.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MetadataList'],
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontal.tsx b/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontalMetadata.tsx
similarity index 74%
rename from packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontal.tsx
rename to packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontalMetadata.tsx
index 5a4aae6fab..cc177217dc 100644
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontal.tsx
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListHorizontalMetadata.tsx
@@ -2,12 +2,13 @@
import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
-export default function MetadataListHorizontal() {
+export default function MetadataListHorizontalMetadata() {
return (
<XDSMetadataList orientation="horizontal">
<XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
<XDSMetadataListItem label="Type">Premium</XDSMetadataListItem>
<XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
+ <XDSMetadataListItem label="Created">Jan 15, 2026</XDSMetadataListItem>
</XDSMetadataList>
);
}
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumnMetadata.doc.mjs b/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumnMetadata.doc.mjs
new file mode 100644
index 0000000000..a1042134b5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumnMetadata.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'MetadataList — Multi-Column',
+ description:
+ 'Multi-column metadata grid with token tags for dense information display.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['MetadataList', 'Token'],
+};
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumnMetadata.tsx b/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumnMetadata.tsx
new file mode 100644
index 0000000000..707b7b1f27
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MetadataList/MetadataListMultiColumnMetadata.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
+import {XDSToken} from '@xds/core/Token';
+
+export default function MetadataListMultiColumnMetadata() {
+ return (
+ <XDSMetadataList columns="multi">
+ <XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
+ <XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
+ <XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
+ <XDSMetadataListItem label="Created">Jan 15, 2026</XDSMetadataListItem>
+ <XDSMetadataListItem label="Tags">
+ <span style={{display: 'flex', gap: 4}}>
+ <XDSToken label="component" />
+ <XDSToken label="xds" />
+ </span>
+ </XDSMetadataListItem>
+ <XDSMetadataListItem label="Priority">Tier 1</XDSMetadataListItem>
+ </XDSMetadataList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListWithTitleAndShowMore.doc.mjs b/packages/cli/templates/blocks/components/MetadataList/MetadataListWithTitleAndShowMore.doc.mjs
deleted file mode 100644
index f9fbd389a5..0000000000
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListWithTitleAndShowMore.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'MetadataList — With Title And Show More',
- description: 'Metadata list with a heading title and collapsible show more toggle.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['MetadataList', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/MetadataList/MetadataListWithTitleAndShowMore.tsx b/packages/cli/templates/blocks/components/MetadataList/MetadataListWithTitleAndShowMore.tsx
deleted file mode 100644
index 76bf3ef157..0000000000
--- a/packages/cli/templates/blocks/components/MetadataList/MetadataListWithTitleAndShowMore.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
-import {XDSHeading} from '@xds/core/Text';
-
-export default function MetadataListWithTitleAndShowMore() {
- return (
- <XDSMetadataList
- title={<XDSHeading level={4}>Details</XDSHeading>}
- maxNumOfItems={3}>
- <XDSMetadataListItem label="Name">Value</XDSMetadataListItem>
- <XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
- <XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
- <XDSMetadataListItem label="Created">Jan 2026</XDSMetadataListItem>
- <XDSMetadataListItem label="Updated">Mar 2026</XDSMetadataListItem>
- </XDSMetadataList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicHamburgerMenu.doc.mjs b/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicHamburgerMenu.doc.mjs
deleted file mode 100644
index c0c25d6d19..0000000000
--- a/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicHamburgerMenu.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'MobileNav — Basic Hamburger Menu',
- description: 'Slide-out mobile navigation drawer triggered by a hamburger menu button.',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['MobileNav', 'Button', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicHamburgerMenu.tsx b/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicHamburgerMenu.tsx
deleted file mode 100644
index 7664e48755..0000000000
--- a/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicHamburgerMenu.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSButton} from '@xds/core/Button';
-import {XDSMobileNav} from '@xds/core/MobileNav';
-import {XDSSideNavSection, XDSSideNavItem} from '@xds/core/SideNav';
-
-function MenuIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <path d="M3 12h18M3 6h18M3 18h18" />
- </svg>
- );
-}
-
-export default function MobileNavBasicHamburgerMenu() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <>
- <XDSButton
- label="Menu"
- icon={<MenuIcon />}
- variant="ghost"
- onClick={() => setIsOpen(true)}
- />
- <XDSMobileNav
- isOpen={isOpen}
- onOpenChange={setIsOpen}
- header="Navigation">
- <XDSSideNavSection title="Main">
- <XDSSideNavItem label="Dashboard" href="/dashboard" isSelected />
- <XDSSideNavItem label="Analytics" href="/analytics" />
- <XDSSideNavItem label="Settings" href="/settings" />
- </XDSSideNavSection>
- </XDSMobileNav>
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.doc.mjs b/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.doc.mjs
new file mode 100644
index 0000000000..e01a0ab535
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'MobileNav — Basic Drawer',
+ description:
+ 'Standard mobile navigation drawer triggered by a menu button, with sectioned nav items.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['MobileNav', 'SideNav', 'Button', 'Icon'],
+};
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.tsx b/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.tsx
new file mode 100644
index 0000000000..48b2f6023d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.tsx
@@ -0,0 +1,88 @@
+'use client';
+
+import {useState} from 'react';
+import type {SVGProps} from 'react';
+import {XDSMobileNav} from '@xds/core/MobileNav';
+import {XDSSideNavSection, XDSSideNavItem} from '@xds/core/SideNav';
+import {XDSButton} from '@xds/core/Button';
+import {XDSIcon} from '@xds/core/Icon';
+
+const HomeIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <path d="M3 9.5L12 3l9 6.5V20a1 1 0 01-1 1H4a1 1 0 01-1-1V9.5z" />
+ <path d="M9 21V12h6v9" />
+ </svg>
+);
+
+const FolderIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <path d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" />
+ </svg>
+);
+
+const ChartIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <path d="M18 20V10M12 20V4M6 20v-6" />
+ </svg>
+);
+
+const SettingsIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <circle cx="12" cy="12" r="3" />
+ <path d="M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.73 12.73l1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42m12.73-12.73l1.42-1.42" />
+ </svg>
+);
+
+const UsersIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" />
+ <circle cx="9" cy="7" r="4" />
+ <path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" />
+ </svg>
+);
+
+export default function MobileNavBasicMobileNav() {
+ const [isOpen, setIsOpen] = useState(false);
+ return (
+ <>
+ <XDSButton
+ label="Open Navigation"
+ icon={<XDSIcon icon="menu" color="inherit" />}
+ variant="ghost"
+ onClick={() => setIsOpen(true)}
+ isIconOnly
+ />
+ <XDSMobileNav
+ isOpen={isOpen}
+ onOpenChange={open => setIsOpen(open)}
+ header="Navigation">
+ <XDSSideNavSection title="Main">
+ <XDSSideNavItem
+ label="Dashboard"
+ icon={HomeIcon}
+ isSelected
+ href="/dashboard"
+ />
+ <XDSSideNavItem
+ label="Projects"
+ icon={FolderIcon}
+ href="/projects"
+ />
+ <XDSSideNavItem
+ label="Analytics"
+ icon={ChartIcon}
+ href="/analytics"
+ />
+ </XDSSideNavSection>
+ <XDSSideNavSection title="Settings">
+ <XDSSideNavItem
+ label="General"
+ icon={SettingsIcon}
+ href="/settings"
+ />
+ <XDSSideNavItem label="Team" icon={UsersIcon} href="/team" />
+ </XDSSideNavSection>
+ </XDSMobileNav>
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.doc.mjs b/packages/cli/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.doc.mjs
new file mode 100644
index 0000000000..acae95f3aa
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'MobileNav — End Side Drawer',
+ description:
+ 'Mobile navigation drawer that slides in from the right edge of the screen.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['MobileNav', 'SideNav', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.tsx b/packages/cli/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.tsx
new file mode 100644
index 0000000000..5261ead45d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {useState} from 'react';
+import type {SVGProps} from 'react';
+import {XDSMobileNav} from '@xds/core/MobileNav';
+import {XDSSideNavSection, XDSSideNavItem} from '@xds/core/SideNav';
+import {XDSButton} from '@xds/core/Button';
+
+const SettingsIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <circle cx="12" cy="12" r="3" />
+ <path d="M12 1v2m0 18v2M4.22 4.22l1.42 1.42m12.73 12.73l1.42 1.42M1 12h2m18 0h2M4.22 19.78l1.42-1.42m12.73-12.73l1.42-1.42" />
+ </svg>
+);
+
+const UsersIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" />
+ <circle cx="9" cy="7" r="4" />
+ <path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75" />
+ </svg>
+);
+
+export default function MobileNavEndSideMobileNav() {
+ const [isOpen, setIsOpen] = useState(false);
+ return (
+ <>
+ <XDSButton label="Open from Right" onClick={() => setIsOpen(true)} />
+ <XDSMobileNav
+ isOpen={isOpen}
+ onOpenChange={open => setIsOpen(open)}
+ header="Settings"
+ side="end">
+ <XDSSideNavSection title="Settings">
+ <XDSSideNavItem
+ label="General"
+ icon={SettingsIcon}
+ href="/settings"
+ />
+ <XDSSideNavItem label="Team" icon={UsersIcon} href="/team" />
+ </XDSSideNavSection>
+ </XDSMobileNav>
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavResponsiveSidebarDrawerPattern.doc.mjs b/packages/cli/templates/blocks/components/MobileNav/MobileNavResponsiveSidebarDrawerPattern.doc.mjs
deleted file mode 100644
index 15bfc4299f..0000000000
--- a/packages/cli/templates/blocks/components/MobileNav/MobileNavResponsiveSidebarDrawerPattern.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'MobileNav — Responsive Sidebar Drawer Pattern',
- description: 'Responsive pattern that renders a SideNav on desktop and a MobileNav drawer on mobile.',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['MobileNav', 'SideNav', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavResponsiveSidebarDrawerPattern.tsx b/packages/cli/templates/blocks/components/MobileNav/MobileNavResponsiveSidebarDrawerPattern.tsx
deleted file mode 100644
index 56590ebff3..0000000000
--- a/packages/cli/templates/blocks/components/MobileNav/MobileNavResponsiveSidebarDrawerPattern.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSButton} from '@xds/core/Button';
-import {XDSMobileNav} from '@xds/core/MobileNav';
-import {XDSSideNav, XDSSideNavSection, XDSSideNavItem} from '@xds/core/SideNav';
-
-function MenuIcon() {
- return (
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2">
- <path d="M3 12h18M3 6h18M3 18h18" />
- </svg>
- );
-}
-
-export default function MobileNavResponsiveSidebarDrawerPattern() {
- const [drawerOpen, setDrawerOpen] = useState(false);
- const isMobile =
- typeof window !== 'undefined' &&
- window.matchMedia('(max-width: 768px)').matches;
-
- const navSections = (
- <>
- <XDSSideNavSection title="Main">
- <XDSSideNavItem label="Dashboard" href="/" isSelected />
- <XDSSideNavItem label="Projects" href="/projects" />
- </XDSSideNavSection>
- <XDSSideNavSection title="Settings">
- <XDSSideNavItem label="General" href="/settings" />
- <XDSSideNavItem label="Security" href="/security" />
- </XDSSideNavSection>
- </>
- );
-
- if (isMobile) {
- return (
- <>
- <XDSButton
- label="Menu"
- icon={<MenuIcon />}
- variant="ghost"
- onClick={() => setDrawerOpen(true)}
- />
- <XDSMobileNav
- isOpen={drawerOpen}
- onOpenChange={setDrawerOpen}
- header="My App">
- {navSections}
- </XDSMobileNav>
- </>
- );
- }
-
- return <XDSSideNav>{navSections}</XDSSideNav>;
-}
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavSharedChildrenWithSideNav.doc.mjs b/packages/cli/templates/blocks/components/MobileNav/MobileNavSharedChildrenWithSideNav.doc.mjs
deleted file mode 100644
index 192d97e5f1..0000000000
--- a/packages/cli/templates/blocks/components/MobileNav/MobileNavSharedChildrenWithSideNav.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'MobileNav — Shared Children With SideNav',
- description: 'Sharing the same navigation sections between a SideNav and MobileNav drawer.',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['MobileNav', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavSharedChildrenWithSideNav.tsx b/packages/cli/templates/blocks/components/MobileNav/MobileNavSharedChildrenWithSideNav.tsx
deleted file mode 100644
index d61ef0d3b7..0000000000
--- a/packages/cli/templates/blocks/components/MobileNav/MobileNavSharedChildrenWithSideNav.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSMobileNav} from '@xds/core/MobileNav';
-import {XDSSideNav, XDSSideNavSection, XDSSideNavItem} from '@xds/core/SideNav';
-
-export default function MobileNavSharedChildrenWithSideNav() {
- const [open, setOpen] = useState(false);
-
- const sections = (
- <XDSSideNavSection title="Main">
- <XDSSideNavItem label="Home" href="/" />
- <XDSSideNavItem label="Settings" href="/settings" />
- </XDSSideNavSection>
- );
-
- return (
- <>
- <XDSSideNav>{sections}</XDSSideNav>
- <XDSMobileNav
- isOpen={open}
- onOpenChange={() => setOpen(false)}>
- {sections}
- </XDSMobileNav>
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.doc.mjs b/packages/cli/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.doc.mjs
new file mode 100644
index 0000000000..25e0778c8a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'MobileNav — Without Title',
+ description:
+ 'Minimal mobile navigation drawer without a title bar header.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['MobileNav', 'SideNav', 'Button', 'Icon'],
+};
diff --git a/packages/cli/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.tsx b/packages/cli/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.tsx
new file mode 100644
index 0000000000..441dbbb4ff
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.tsx
@@ -0,0 +1,51 @@
+'use client';
+
+import {useState} from 'react';
+import type {SVGProps} from 'react';
+import {XDSMobileNav} from '@xds/core/MobileNav';
+import {XDSSideNavSection, XDSSideNavItem} from '@xds/core/SideNav';
+import {XDSButton} from '@xds/core/Button';
+import {XDSIcon} from '@xds/core/Icon';
+
+const HomeIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <path d="M3 9.5L12 3l9 6.5V20a1 1 0 01-1 1H4a1 1 0 01-1-1V9.5z" />
+ <path d="M9 21V12h6v9" />
+ </svg>
+);
+
+const FolderIcon = (p: SVGProps<SVGSVGElement>) => (
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round" {...p}>
+ <path d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" />
+ </svg>
+);
+
+export default function MobileNavWithoutTitleMobileNav() {
+ const [isOpen, setIsOpen] = useState(false);
+ return (
+ <>
+ <XDSButton
+ label="Open Navigation"
+ icon={<XDSIcon icon="menu" color="inherit" />}
+ variant="ghost"
+ onClick={() => setIsOpen(true)}
+ isIconOnly
+ />
+ <XDSMobileNav isOpen={isOpen} onOpenChange={open => setIsOpen(open)}>
+ <XDSSideNavSection title="Main">
+ <XDSSideNavItem
+ label="Dashboard"
+ icon={HomeIcon}
+ isSelected
+ href="/dashboard"
+ />
+ <XDSSideNavItem
+ label="Projects"
+ icon={FolderIcon}
+ href="/projects"
+ />
+ </XDSSideNavSection>
+ </XDSMobileNav>
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuCardHeaderWithOverflowMenu.doc.mjs b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuCardHeaderWithOverflowMenu.doc.mjs
deleted file mode 100644
index af0dc58fd5..0000000000
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuCardHeaderWithOverflowMenu.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'MoreMenu — Card Header With Overflow Menu',
- description: 'Card header layout with a title and three-dot overflow menu.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Layout', 'MoreMenu', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuCardHeaderWithOverflowMenu.tsx b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuCardHeaderWithOverflowMenu.tsx
deleted file mode 100644
index 9f8083ccd3..0000000000
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuCardHeaderWithOverflowMenu.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {XDSMoreMenu} from '@xds/core/MoreMenu';
-import {XDSHStack} from '@xds/core/Layout';
-import {XDSHeading} from '@xds/core/Text';
-
-export default function MoreMenuCardHeaderWithOverflowMenu() {
- return (
- <XDSHStack vAlign="center" hAlign="between">
- <XDSHeading level={3}>Card Title</XDSHeading>
- <XDSMoreMenu
- items={[
- {label: 'Edit', onClick: () => {}},
- {label: 'Duplicate', onClick: () => {}},
- {type: 'divider' as const},
- {label: 'Delete', onClick: () => {}},
- ]}
- />
- </XDSHStack>
- );
-}
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuMinimalActions.doc.mjs b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuDefaultMoreMenu.doc.mjs
similarity index 60%
rename from packages/cli/templates/blocks/components/MoreMenu/MoreMenuMinimalActions.doc.mjs
rename to packages/cli/templates/blocks/components/MoreMenu/MoreMenuDefaultMoreMenu.doc.mjs
index 413ca10f0e..56257e7e64 100644
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuMinimalActions.doc.mjs
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuDefaultMoreMenu.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'MoreMenu — Minimal Actions',
- description: 'Simple three-dot overflow menu with two action items.',
+ name: 'MoreMenu — Default',
+ description:
+ 'Basic three-dot overflow menu with simple text-only action items.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MoreMenu'],
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuMinimalActions.tsx b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuDefaultMoreMenu.tsx
similarity index 68%
rename from packages/cli/templates/blocks/components/MoreMenu/MoreMenuMinimalActions.tsx
rename to packages/cli/templates/blocks/components/MoreMenu/MoreMenuDefaultMoreMenu.tsx
index d63fa535aa..d8a4c5b2fe 100644
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuMinimalActions.tsx
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuDefaultMoreMenu.tsx
@@ -2,11 +2,12 @@
import {XDSMoreMenu} from '@xds/core/MoreMenu';
-export default function MoreMenuMinimalActions() {
+export default function MoreMenuDefaultMoreMenu() {
return (
<XDSMoreMenu
items={[
{label: 'Edit', onClick: () => {}},
+ {label: 'Duplicate', onClick: () => {}},
{label: 'Delete', onClick: () => {}},
]}
/>
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.doc.mjs b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.doc.mjs
new file mode 100644
index 0000000000..1ec7ed4514
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'MoreMenu — In Toolbar',
+ description:
+ 'Overflow menu alongside primary and secondary buttons in a toolbar layout.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['MoreMenu', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx
new file mode 100644
index 0000000000..a7a7b0ec90
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuInToolbar.tsx
@@ -0,0 +1,40 @@
+'use client';
+
+import {XDSMoreMenu} from '@xds/core/MoreMenu';
+import {XDSButton} from '@xds/core/Button';
+
+const DownloadIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3" />
+ </svg>
+);
+
+const ShareIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z" />
+ </svg>
+);
+
+const TrashIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
+ </svg>
+);
+
+export default function MoreMenuInToolbar() {
+ return (
+ <div style={{display: 'flex', gap: 8, alignItems: 'center'}}>
+ <XDSButton label="Save" variant="primary" onClick={() => {}} />
+ <XDSButton label="Preview" variant="secondary" onClick={() => {}} />
+ <XDSMoreMenu
+ label="More actions"
+ items={[
+ {label: 'Export', icon: DownloadIcon, onClick: () => {}},
+ {label: 'Share', icon: ShareIcon, onClick: () => {}},
+ {type: 'divider'},
+ {label: 'Delete', icon: TrashIcon, onClick: () => {}},
+ ]}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuTableRowActionsWithIcons.tsx b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuTableRowActionsWithIcons.tsx
deleted file mode 100644
index 90d5ea5d37..0000000000
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuTableRowActionsWithIcons.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-'use client';
-
-import {XDSMoreMenu} from '@xds/core/MoreMenu';
-
-function PencilIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z" />
- </svg>
- );
-}
-
-function TrashIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
- </svg>
- );
-}
-
-export default function MoreMenuTableRowActionsWithIcons() {
- return (
- <XDSMoreMenu
- label="Row actions"
- size="sm"
- items={[
- {label: 'Edit', icon: PencilIcon, onClick: () => {}},
- {type: 'divider'},
- {label: 'Delete', icon: TrashIcon, onClick: () => {}},
- ]}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuTableRowActionsWithIcons.doc.mjs b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithDividers.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/MoreMenu/MoreMenuTableRowActionsWithIcons.doc.mjs
rename to packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithDividers.doc.mjs
index d66d7e293f..ef73c96981 100644
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuTableRowActionsWithIcons.doc.mjs
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithDividers.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'MoreMenu — Table Row Actions With Icons',
- description: 'Small overflow menu for table row actions with icons and a divider.',
+ name: 'MoreMenu — With Dividers',
+ description:
+ 'Overflow menu with icon items and a divider separating destructive actions.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MoreMenu'],
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithDividers.tsx b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithDividers.tsx
new file mode 100644
index 0000000000..654fbd06f1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithDividers.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import {XDSMoreMenu} from '@xds/core/MoreMenu';
+
+const PencilIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Z" />
+ </svg>
+);
+
+const CopyIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5" />
+ </svg>
+);
+
+const TrashIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
+ </svg>
+);
+
+export default function MoreMenuWithDividers() {
+ return (
+ <XDSMoreMenu
+ items={[
+ {label: 'Edit', icon: PencilIcon, onClick: () => {}},
+ {label: 'Duplicate', icon: CopyIcon, onClick: () => {}},
+ {type: 'divider'},
+ {label: 'Delete', icon: TrashIcon, onClick: () => {}},
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.doc.mjs b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.doc.mjs
index 334880172f..acaae9716e 100644
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.doc.mjs
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'MoreMenu — With Sections',
- description: 'Overflow menu with grouped sections for organizing actions.',
+ description:
+ 'Overflow menu organized into labeled sections for grouped actions.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MoreMenu'],
diff --git a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.tsx b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.tsx
index c07980e321..ef879c6c03 100644
--- a/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.tsx
+++ b/packages/cli/templates/blocks/components/MoreMenu/MoreMenuWithSections.tsx
@@ -2,6 +2,24 @@
import {XDSMoreMenu} from '@xds/core/MoreMenu';
+const PencilIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Z" />
+ </svg>
+);
+
+const CopyIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5" />
+ </svg>
+);
+
+const TrashIcon = (props: React.SVGProps<SVGSVGElement>) => (
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
+ </svg>
+);
+
export default function MoreMenuWithSections() {
return (
<XDSMoreMenu
@@ -11,14 +29,14 @@ export default function MoreMenuWithSections() {
type: 'section',
title: 'Actions',
items: [
- {label: 'Edit', onClick: () => {}},
- {label: 'Duplicate', onClick: () => {}},
+ {label: 'Edit', icon: PencilIcon, onClick: () => {}},
+ {label: 'Duplicate', icon: CopyIcon, onClick: () => {}},
],
},
{
type: 'section',
title: 'Danger zone',
- items: [{label: 'Delete', onClick: () => {}}],
+ items: [{label: 'Delete', icon: TrashIcon, onClick: () => {}}],
},
]}
/>
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBadgesTriggerDisplay.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBadgesTriggerDisplay.tsx
deleted file mode 100644
index 9decc99056..0000000000
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBadgesTriggerDisplay.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSMultiSelector} from '@xds/core/MultiSelector';
-
-export default function MultiSelectorBadgesTriggerDisplay() {
- const [selected, setSelected] = useState<string[]>([]);
-
- return (
- <XDSMultiSelector
- label="Filters"
- options={['Active', 'Inactive', 'Pending', 'Archived']}
- value={selected}
- onChange={setSelected}
- triggerDisplay="badges"
- maxBadges={2}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBasic.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBasic.tsx
deleted file mode 100644
index 75211c44bb..0000000000
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBasic.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSMultiSelector} from '@xds/core/MultiSelector';
-
-export default function MultiSelectorBasic() {
- const [selected, setSelected] = useState<string[]>([]);
-
- return (
- <XDSMultiSelector
- label="Columns"
- options={['Name', 'Email', 'Role', 'Status']}
- value={selected}
- onChange={setSelected}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorWithSelectAllAndSearch.doc.mjs b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/MultiSelector/MultiSelectorWithSelectAllAndSearch.doc.mjs
rename to packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.doc.mjs
index b2145acd48..258e5b50cf 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorWithSelectAllAndSearch.doc.mjs
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'MultiSelector — With Select All And Search',
- description: 'Multi-select dropdown with select-all checkbox and search filtering.',
+ name: 'MultiSelector — Column Visibility',
+ description:
+ 'Table column visibility toggle with hidden label, search, select-all, and count display.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MultiSelector'],
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.tsx
new file mode 100644
index 0000000000..213e9d5885
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorColumnVisibilitySelector.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSMultiSelector} from '@xds/core/MultiSelector';
+
+const allColumns = [
+ {value: 'name', label: 'Name'},
+ {value: 'email', label: 'Email'},
+ {value: 'role', label: 'Role'},
+ {value: 'status', label: 'Status'},
+ {value: 'created', label: 'Created'},
+ {value: 'updated', label: 'Updated'},
+ {value: 'actions', label: 'Actions'},
+];
+
+export default function MultiSelectorColumnVisibilitySelector() {
+ const [visible, setVisible] = useState<string[]>([
+ 'name',
+ 'email',
+ 'role',
+ 'status',
+ ]);
+ return (
+ <div style={{width: 300}}>
+ <XDSMultiSelector
+ label="Columns"
+ isLabelHidden
+ options={allColumns}
+ value={visible}
+ onChange={setVisible}
+ hasSelectAll
+ hasSearch
+ triggerDisplay="count"
+ placeholder="Columns"
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSections.doc.mjs b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSections.doc.mjs
rename to packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.doc.mjs
index 27bf10efe1..194709067a 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSections.doc.mjs
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'MultiSelector — Sections',
- description: 'Multi-select dropdown with labeled option sections.',
+ name: 'MultiSelector — Form Composition',
+ description:
+ 'Two multi-selectors in a form layout with labels, badges, and required/optional states.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MultiSelector'],
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.tsx
new file mode 100644
index 0000000000..640d1818b8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorForm.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSMultiSelector} from '@xds/core/MultiSelector';
+
+export default function MultiSelectorForm() {
+ const [columns, setColumns] = useState<string[]>(['name', 'email']);
+ const [filters, setFilters] = useState<string[]>([]);
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 16, width: 300}}>
+ <XDSMultiSelector
+ label="Visible columns"
+ description="Choose which columns to display in the table"
+ options={[
+ {value: 'name', label: 'Name'},
+ {value: 'email', label: 'Email'},
+ {value: 'role', label: 'Role'},
+ {value: 'status', label: 'Status'},
+ {value: 'created', label: 'Created at'},
+ ]}
+ value={columns}
+ onChange={setColumns}
+ hasSelectAll
+ isRequired
+ triggerDisplay="labels"
+ />
+ <XDSMultiSelector
+ label="Status filter"
+ description="Filter by status"
+ options={['Active', 'Inactive', 'Pending', 'Archived']}
+ value={filters}
+ onChange={setFilters}
+ isOptional
+ triggerDisplay="badges"
+ placeholder="All statuses"
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBadgesTriggerDisplay.doc.mjs b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBadgesTriggerDisplay.doc.mjs
rename to packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.doc.mjs
index 49c52e4e9f..ed2040416d 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBadgesTriggerDisplay.doc.mjs
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'MultiSelector — Badges Trigger Display',
- description: 'Multi-select showing selected items as badges in the trigger.',
+ name: 'MultiSelector — Searchable',
+ description:
+ 'Multi-select with search filtering and select-all for long option lists.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MultiSelector'],
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.tsx
new file mode 100644
index 0000000000..c6c366f3ac
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSearchableMultiSelector.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSMultiSelector} from '@xds/core/MultiSelector';
+
+const countries = [
+ 'United States',
+ 'United Kingdom',
+ 'Canada',
+ 'Australia',
+ 'Germany',
+ 'France',
+ 'Japan',
+ 'Brazil',
+ 'India',
+ 'Mexico',
+];
+
+export default function MultiSelectorSearchableMultiSelector() {
+ const [value, setValue] = useState<string[]>([]);
+ return (
+ <div style={{width: 300}}>
+ <XDSMultiSelector
+ label="Countries"
+ options={countries}
+ value={value}
+ onChange={setValue}
+ hasSearch
+ hasSelectAll
+ placeholder="Select countries..."
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBasic.doc.mjs b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBasic.doc.mjs
rename to packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.doc.mjs
index a1f300b23e..94429299d2 100644
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'MultiSelector — Basic',
- description: 'Simple multi-select dropdown with string options.',
+ name: 'MultiSelector — Sectioned Permissions',
+ description:
+ 'Multi-select with options organized into labeled sections for grouped selection.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['MultiSelector'],
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.tsx
new file mode 100644
index 0000000000..c404027470
--- /dev/null
+++ b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSectionedMultiSelector.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSMultiSelector} from '@xds/core/MultiSelector';
+
+export default function MultiSelectorSectionedMultiSelector() {
+ const [value, setValue] = useState<string[]>([]);
+ return (
+ <div style={{width: 300}}>
+ <XDSMultiSelector
+ label="Permissions"
+ options={[
+ {
+ type: 'section',
+ title: 'Read',
+ options: [
+ {value: 'read_posts', label: 'Read posts'},
+ {value: 'read_comments', label: 'Read comments'},
+ {value: 'read_users', label: 'Read users'},
+ ],
+ },
+ {
+ type: 'section',
+ title: 'Write',
+ options: [
+ {value: 'write_posts', label: 'Write posts'},
+ {value: 'write_comments', label: 'Write comments'},
+ ],
+ },
+ ]}
+ value={value}
+ onChange={setValue}
+ placeholder="Select permissions..."
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSections.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSections.tsx
deleted file mode 100644
index 389712eddd..0000000000
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorSections.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSMultiSelector} from '@xds/core/MultiSelector';
-
-export default function MultiSelectorSections() {
- const [selected, setSelected] = useState<string[]>([]);
-
- return (
- <XDSMultiSelector
- label="Permissions"
- options={[
- {
- type: 'section',
- title: 'Read',
- options: [
- {value: 'read_posts', label: 'Read posts'},
- {value: 'read_comments', label: 'Read comments'},
- ],
- },
- {
- type: 'section',
- title: 'Write',
- options: [
- {value: 'write_posts', label: 'Write posts'},
- {value: 'write_comments', label: 'Write comments'},
- ],
- },
- ]}
- value={selected}
- onChange={setSelected}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorWithSelectAllAndSearch.tsx b/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorWithSelectAllAndSearch.tsx
deleted file mode 100644
index 5065c9f34d..0000000000
--- a/packages/cli/templates/blocks/components/MultiSelector/MultiSelectorWithSelectAllAndSearch.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSMultiSelector} from '@xds/core/MultiSelector';
-
-export default function MultiSelectorWithSelectAllAndSearch() {
- const [selected, setSelected] = useState<string[]>([]);
-
- return (
- <XDSMultiSelector
- label="Columns"
- options={['Name', 'Email', 'Role', 'Status', 'Created']}
- value={selected}
- onChange={setSelected}
- hasSelectAll
- hasSearch
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NavIcon/NavIconInSideNavigation.doc.mjs b/packages/cli/templates/blocks/components/NavIcon/NavIconInSideNavigation.doc.mjs
deleted file mode 100644
index 66a3cb30d3..0000000000
--- a/packages/cli/templates/blocks/components/NavIcon/NavIconInSideNavigation.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NavIcon — In Side Navigation',
- description: 'Circular accent icon used in a page navigation header.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['NavIcon', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/NavIcon/NavIconInSideNavigation.tsx b/packages/cli/templates/blocks/components/NavIcon/NavIconInSideNavigation.tsx
deleted file mode 100644
index d406a9f69b..0000000000
--- a/packages/cli/templates/blocks/components/NavIcon/NavIconInSideNavigation.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {XDSNavIcon} from '@xds/core/NavIcon';
-import {XDSSideNavHeading} from '@xds/core/SideNav';
-
-function CubeIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />
- </svg>
- );
-}
-
-export default function NavIconInSideNavigation() {
- return (
- <XDSSideNavHeading
- icon={<XDSNavIcon icon={<CubeIcon />} />}
- heading="My App"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NavIcon/NavIconInTopNavigation.doc.mjs b/packages/cli/templates/blocks/components/NavIcon/NavIconInTopNavigation.doc.mjs
deleted file mode 100644
index 5fc334af14..0000000000
--- a/packages/cli/templates/blocks/components/NavIcon/NavIconInTopNavigation.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NavIcon — In Top Navigation',
- description: 'Circular accent icon used as a logo in a top navigation heading.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['NavIcon', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/NavIcon/NavIconInTopNavigation.tsx b/packages/cli/templates/blocks/components/NavIcon/NavIconInTopNavigation.tsx
deleted file mode 100644
index ea1687003f..0000000000
--- a/packages/cli/templates/blocks/components/NavIcon/NavIconInTopNavigation.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {XDSNavIcon} from '@xds/core/NavIcon';
-import {XDSTopNavHeading} from '@xds/core/TopNav';
-
-function CubeIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />
- </svg>
- );
-}
-
-export default function NavIconInTopNavigation() {
- return (
- <XDSTopNavHeading
- heading="My App"
- logo={<XDSNavIcon icon={<CubeIcon />} />}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NavIcon/NavIconWithHomeIcon.doc.mjs b/packages/cli/templates/blocks/components/NavIcon/NavIconWithHomeIcon.doc.mjs
deleted file mode 100644
index 42908dbc5c..0000000000
--- a/packages/cli/templates/blocks/components/NavIcon/NavIconWithHomeIcon.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NavIcon — With Home Icon',
- description: 'Top navigation heading with a home icon in the NavIcon container.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['NavIcon', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/NavIcon/NavIconWithHomeIcon.tsx b/packages/cli/templates/blocks/components/NavIcon/NavIconWithHomeIcon.tsx
deleted file mode 100644
index 286585b6b2..0000000000
--- a/packages/cli/templates/blocks/components/NavIcon/NavIconWithHomeIcon.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {XDSNavIcon} from '@xds/core/NavIcon';
-import {XDSTopNavHeading} from '@xds/core/TopNav';
-
-function HomeIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1h-2z" />
- </svg>
- );
-}
-
-export default function NavIconWithHomeIcon() {
- return (
- <XDSTopNavHeading
- heading="Dashboard"
- logo={<XDSNavIcon icon={<HomeIcon />} />}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputBasic.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputBasic.tsx
deleted file mode 100644
index e12dc2cc69..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputBasic.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputBasic() {
- const [quantity, setQuantity] = useState<number | null>(0);
-
- return (
- <XDSNumberInput label="Quantity" value={quantity} onChange={setQuantity} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputBasic.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/NumberInput/NumberInputBasic.doc.mjs
rename to packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.doc.mjs
index f9d5a0497c..0d60008ff4 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'NumberInput — Basic',
- description: 'Simple number input with a label.',
+ name: 'NumberInput — Clearable',
+ description:
+ 'Number input with a clear button, unit suffix, and min/max range constraint.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['NumberInput'],
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.tsx
new file mode 100644
index 0000000000..a718dbcadf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputClearableNumberInput.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSNumberInput} from '@xds/core/NumberInput';
+
+export default function NumberInputClearableNumberInput() {
+ const [value, setValue] = useState<number | null>(75);
+ return (
+ <div style={{maxWidth: 300}}>
+ <XDSNumberInput
+ label="Progress"
+ units="%"
+ min={0}
+ max={100}
+ value={value}
+ onChange={setValue}
+ hasClear
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputIntegerOnly.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputIntegerOnly.tsx
deleted file mode 100644
index 38aa1d302c..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputIntegerOnly.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputIntegerOnly() {
- const [count, setCount] = useState<number | null>(0);
-
- return (
- <XDSNumberInput
- label="Count"
- value={count}
- onChange={setCount}
- isIntegerOnly
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputOptionalField.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputOptionalField.tsx
deleted file mode 100644
index 196865d0ef..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputOptionalField.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputOptionalField() {
- const [ext, setExt] = useState<number | null>(null);
-
- return (
- <XDSNumberInput
- label="Phone Extension"
- isOptional
- value={ext}
- onChange={setExt}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputOptionalField.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/NumberInput/NumberInputOptionalField.doc.mjs
rename to packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.doc.mjs
index dc570dcbff..f9802866ba 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputOptionalField.doc.mjs
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'NumberInput — Optional Field',
- description: 'Number input marked as an optional field.',
+ name: 'NumberInput — Range Constrained',
+ description:
+ 'Number input with min/max boundaries and a description indicating the valid range.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['NumberInput'],
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.tsx
new file mode 100644
index 0000000000..f2dd17c009
--- /dev/null
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputRangeNumberInput.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSNumberInput} from '@xds/core/NumberInput';
+
+export default function NumberInputRangeNumberInput() {
+ const [value, setValue] = useState<number | null>(null);
+ return (
+ <div style={{maxWidth: 300}}>
+ <XDSNumberInput
+ label="Rating"
+ placeholder="1-5"
+ min={1}
+ max={5}
+ description="Rate from 1 to 5"
+ value={value}
+ onChange={setValue}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputRequiredField.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputRequiredField.tsx
deleted file mode 100644
index 06f7fe032d..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputRequiredField.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputRequiredField() {
- const [amount, setAmount] = useState<number | null>(null);
-
- return (
- <XDSNumberInput
- label="Amount"
- isRequired
- value={amount}
- onChange={setAmount}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputRequiredField.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/NumberInput/NumberInputRequiredField.doc.mjs
rename to packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.doc.mjs
index fcc252e266..5d03d0036c 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputRequiredField.doc.mjs
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'NumberInput — Required Field',
- description: 'Number input marked as a required field.',
+ name: 'NumberInput — Status Variants',
+ description:
+ 'Three number inputs showing error, warning, and success validation states with messages.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['NumberInput'],
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.tsx
new file mode 100644
index 0000000000..4e461fd24f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputStatuses.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSNumberInput} from '@xds/core/NumberInput';
+
+export default function NumberInputStatuses() {
+ const [error, setError] = useState<number | null>(-5);
+ const [warning, setWarning] = useState<number | null>(150);
+ const [success, setSuccess] = useState<number | null>(25);
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 16,
+ maxWidth: 300,
+ }}>
+ <XDSNumberInput
+ label="Error"
+ value={error}
+ onChange={setError}
+ status={{type: 'error', message: 'Must be positive'}}
+ />
+ <XDSNumberInput
+ label="Warning"
+ value={warning}
+ onChange={setWarning}
+ status={{type: 'warning', message: 'Value seems high'}}
+ />
+ <XDSNumberInput
+ label="Success"
+ value={success}
+ onChange={setSuccess}
+ status={{type: 'success', message: 'Looks good'}}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithDescription.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithDescription.doc.mjs
deleted file mode 100644
index 876c08ad8b..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithDescription.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NumberInput — With Description',
- description: 'Number input with helper description text below the label.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['NumberInput'],
-};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithDescription.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithDescription.tsx
deleted file mode 100644
index 5361afdcb5..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithDescription.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputWithDescription() {
- const [qty, setQty] = useState<number | null>(1);
-
- return (
- <XDSNumberInput
- label="Quantity"
- description="Enter the number of items"
- value={qty}
- onChange={setQty}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithEventHandlers.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithEventHandlers.doc.mjs
deleted file mode 100644
index 4f6d765ada..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithEventHandlers.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NumberInput — With Event Handlers',
- description: 'Number input with onEnter, onFocus, and onBlur event callbacks.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['NumberInput'],
-};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithEventHandlers.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithEventHandlers.tsx
deleted file mode 100644
index bc1d6a1859..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithEventHandlers.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputWithEventHandlers() {
- const [value, setValue] = useState<number | null>(0);
-
- return (
- <XDSNumberInput
- label="Search"
- value={value}
- onChange={setValue}
- onEnter={() => {}}
- onFocus={() => {}}
- onBlur={() => {}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithMinMaxConstraints.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithMinMaxConstraints.doc.mjs
deleted file mode 100644
index 4295c89358..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithMinMaxConstraints.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NumberInput — With Min Max Constraints',
- description: 'Number input constrained to a minimum and maximum value range.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['NumberInput'],
-};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithMinMaxConstraints.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithMinMaxConstraints.tsx
deleted file mode 100644
index a9a7090964..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithMinMaxConstraints.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputWithMinMaxConstraints() {
- const [rating, setRating] = useState<number | null>(3);
-
- return (
- <XDSNumberInput
- label="Rating"
- value={rating}
- onChange={setRating}
- min={1}
- max={5}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithPlaceholder.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithPlaceholder.doc.mjs
deleted file mode 100644
index 5ec694d9d5..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithPlaceholder.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NumberInput — With Placeholder',
- description: 'Number input with placeholder text.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['NumberInput'],
-};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithPlaceholder.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithPlaceholder.tsx
deleted file mode 100644
index da1922368e..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithPlaceholder.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputWithPlaceholder() {
- const [age, setAge] = useState<number | null>(null);
-
- return (
- <XDSNumberInput
- label="Age"
- value={age}
- onChange={setAge}
- placeholder="Enter your age"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithStepForDecimals.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithStepForDecimals.doc.mjs
deleted file mode 100644
index a78e4a2dd7..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithStepForDecimals.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NumberInput — With Step For Decimals',
- description: 'Number input with decimal step increments for price entry.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['NumberInput'],
-};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithStepForDecimals.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithStepForDecimals.tsx
deleted file mode 100644
index 7ad4ac0e4b..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithStepForDecimals.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputWithStepForDecimals() {
- const [price, setPrice] = useState<number | null>(0);
-
- return (
- <XDSNumberInput
- label="Price"
- value={price}
- onChange={setPrice}
- min={0}
- step={0.01}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputIntegerOnly.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/NumberInput/NumberInputIntegerOnly.doc.mjs
rename to packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.doc.mjs
index 69d2bfbf1f..2b436688a3 100644
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputIntegerOnly.doc.mjs
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'NumberInput — Integer Only',
- description: 'Number input restricted to integer values only.',
+ name: 'NumberInput — With Units',
+ description:
+ 'Number input displaying a unit suffix like percentage, constrained to a valid range.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['NumberInput'],
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.tsx
new file mode 100644
index 0000000000..cde4290148
--- /dev/null
+++ b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnits.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSNumberInput} from '@xds/core/NumberInput';
+
+export default function NumberInputWithUnits() {
+ const [value, setValue] = useState<number | null>(50);
+ return (
+ <div style={{maxWidth: 300}}>
+ <XDSNumberInput
+ label="Discount"
+ placeholder="Enter discount"
+ min={0}
+ max={100}
+ units="%"
+ value={value}
+ onChange={setValue}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnitsDisplay.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnitsDisplay.doc.mjs
deleted file mode 100644
index 3375b673da..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnitsDisplay.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NumberInput — With Units Display',
- description: 'Number input with a percentage units suffix.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['NumberInput'],
-};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnitsDisplay.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnitsDisplay.tsx
deleted file mode 100644
index 8dcc538592..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithUnitsDisplay.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputWithUnitsDisplay() {
- const [discount, setDiscount] = useState<number | null>(10);
-
- return (
- <XDSNumberInput
- label="Discount"
- value={discount}
- onChange={setDiscount}
- units="%"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithValidationStatus.doc.mjs b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithValidationStatus.doc.mjs
deleted file mode 100644
index 81626e7035..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithValidationStatus.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'NumberInput — With Validation Status',
- description: 'Number input showing an error validation status message.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['NumberInput'],
-};
diff --git a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithValidationStatus.tsx b/packages/cli/templates/blocks/components/NumberInput/NumberInputWithValidationStatus.tsx
deleted file mode 100644
index 1dfcecc374..0000000000
--- a/packages/cli/templates/blocks/components/NumberInput/NumberInputWithValidationStatus.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSNumberInput} from '@xds/core/NumberInput';
-
-export default function NumberInputWithValidationStatus() {
- const [age, setAge] = useState<number | null>(150);
-
- return (
- <XDSNumberInput
- label="Age"
- value={age}
- onChange={setAge}
- status={{type: 'error', message: 'Age must be between 18 and 120'}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListBasicWithOverflowButton.doc.mjs b/packages/cli/templates/blocks/components/OverflowList/OverflowListBasicWithOverflowButton.doc.mjs
deleted file mode 100644
index c40e19bc96..0000000000
--- a/packages/cli/templates/blocks/components/OverflowList/OverflowListBasicWithOverflowButton.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'OverflowList — Basic With Overflow Button',
- description: 'Horizontal list that shows a "+N more" button when items overflow.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['OverflowList', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListBasicWithOverflowButton.tsx b/packages/cli/templates/blocks/components/OverflowList/OverflowListBasicWithOverflowButton.tsx
deleted file mode 100644
index e5f91a5073..0000000000
--- a/packages/cli/templates/blocks/components/OverflowList/OverflowListBasicWithOverflowButton.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {XDSOverflowList} from '@xds/core/OverflowList';
-import {XDSButton} from '@xds/core/Button';
-
-export default function OverflowListBasicWithOverflowButton() {
- return (
- <XDSOverflowList
- gap={2}
- overflowRenderer={(items) => (
- <XDSButton label={`+${items.length} more`} variant="ghost" />
- )}>
- <XDSButton label="Action 1" />
- <XDSButton label="Action 2" />
- <XDSButton label="Action 3" />
- <XDSButton label="Action 4" />
- </XDSOverflowList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.doc.mjs b/packages/cli/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.doc.mjs
new file mode 100644
index 0000000000..54e6183fa7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'OverflowList — Collapse From Start',
+ description:
+ 'Overflow list that hides items from the beginning, keeping the latest items visible.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['OverflowList', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.tsx b/packages/cli/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.tsx
new file mode 100644
index 0000000000..d6a59f0950
--- /dev/null
+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {XDSOverflowList} from '@xds/core/OverflowList';
+import {XDSButton} from '@xds/core/Button';
+
+export default function OverflowListCollapseFromStartList() {
+ return (
+ <div style={{maxWidth: 300, border: '1px dashed #ccc', padding: 8}}>
+ <XDSOverflowList
+ gap={2}
+ collapseFrom="start"
+ overflowRenderer={overflowItems => (
+ <XDSButton
+ label={`+${overflowItems.length} more`}
+ variant="ghost"
+ size="sm"
+ />
+ )}>
+ <XDSButton label="Step 1" size="sm" />
+ <XDSButton label="Step 2" size="sm" />
+ <XDSButton label="Step 3" size="sm" />
+ <XDSButton label="Step 4" size="sm" />
+ <XDSButton label="Step 5" size="sm" />
+ </XDSOverflowList>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.doc.mjs b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.doc.mjs
new file mode 100644
index 0000000000..175926ebac
--- /dev/null
+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'OverflowList — Badge Tags',
+ description:
+ 'Resizable container of badges that collapses into a count badge on overflow.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['OverflowList', 'Badge'],
+};
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx
new file mode 100644
index 0000000000..dc1d9c79f1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowBadges.tsx
@@ -0,0 +1,30 @@
+'use client';
+
+import {XDSOverflowList} from '@xds/core/OverflowList';
+import {XDSBadge} from '@xds/core/Badge';
+
+export default function OverflowListOverflowBadges() {
+ return (
+ <div
+ style={{
+ resize: 'horizontal',
+ overflow: 'hidden',
+ border: '1px dashed #ccc',
+ padding: 8,
+ width: 300,
+ minWidth: 80,
+ }}>
+ <XDSOverflowList
+ gap={1}
+ overflowRenderer={overflowItems => (
+ <XDSBadge variant="neutral" label={`+${overflowItems.length}`} />
+ )}>
+ <XDSBadge variant="info" label="React" />
+ <XDSBadge variant="success" label="TypeScript" />
+ <XDSBadge variant="warning" label="StyleX" />
+ <XDSBadge variant="neutral" label="Storybook" />
+ <XDSBadge variant="error" label="Vitest" />
+ </XDSOverflowList>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowIntoDropdownMenu.doc.mjs b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowIntoDropdownMenu.doc.mjs
rename to packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.doc.mjs
index de6914d348..2cd37a48fb 100644
--- a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowIntoDropdownMenu.doc.mjs
+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'OverflowList — Overflow Into Dropdown Menu',
- description: 'Overflow items collapse into a dropdown menu for action access.',
+ name: 'OverflowList — Dropdown Actions',
+ description:
+ 'Action toolbar that collapses overflow buttons into a dropdown menu.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['OverflowList', 'Button', 'DropdownMenu'],
};
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx
new file mode 100644
index 0000000000..7cee8b15d6
--- /dev/null
+++ b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {XDSOverflowList} from '@xds/core/OverflowList';
+import {XDSButton} from '@xds/core/Button';
+import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
+
+const actions = ['Save', 'Edit', 'Duplicate', 'Share', 'Archive', 'Delete'];
+
+export default function OverflowListOverflowDropdownActions() {
+ return (
+ <div
+ style={{
+ resize: 'horizontal',
+ overflow: 'hidden',
+ border: '1px dashed #ccc',
+ padding: 8,
+ width: 350,
+ minWidth: 100,
+ maxWidth: '100%',
+ }}>
+ <XDSOverflowList
+ gap={2}
+ overflowRenderer={overflowItems => (
+ <XDSDropdownMenu
+ button={{
+ label: `+${overflowItems.length}`,
+ variant: 'ghost',
+ size: 'sm',
+ }}
+ items={overflowItems.map(({index}) => ({
+ label: actions[index],
+ onClick: () => {},
+ }))}
+ />
+ )}>
+ <XDSButton label="Save" size="sm" variant="primary" />
+ <XDSButton label="Edit" size="sm" />
+ <XDSButton label="Duplicate" size="sm" />
+ <XDSButton label="Share" size="sm" />
+ <XDSButton label="Archive" size="sm" />
+ <XDSButton label="Delete" size="sm" variant="destructive" />
+ </XDSOverflowList>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowIntoDropdownMenu.tsx b/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowIntoDropdownMenu.tsx
deleted file mode 100644
index a282a4a4bb..0000000000
--- a/packages/cli/templates/blocks/components/OverflowList/OverflowListOverflowIntoDropdownMenu.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client';
-
-import {XDSOverflowList} from '@xds/core/OverflowList';
-import {XDSButton} from '@xds/core/Button';
-import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
-
-const labels = ['Save', 'Edit', 'Share', 'Delete'];
-
-export default function OverflowListOverflowIntoDropdownMenu() {
- return (
- <XDSOverflowList
- overflowRenderer={(overflowItems) => (
- <XDSDropdownMenu
- button={{label: `+${overflowItems.length}`, variant: 'ghost'}}
- items={overflowItems.map(({index}) => ({label: labels[index]}))}
- />
- )}>
- {labels.map((l) => (
- <XDSButton key={l} label={l} />
- ))}
- </XDSOverflowList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationCarouselDots.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationCarouselDots.tsx
deleted file mode 100644
index 64e78ea530..0000000000
--- a/packages/cli/templates/blocks/components/Pagination/PaginationCarouselDots.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSPagination} from '@xds/core/Pagination';
-
-export default function PaginationCarouselDots() {
- const [slideIndex, setSlideIndex] = useState(1);
-
- return (
- <XDSPagination
- page={slideIndex}
- onChange={setSlideIndex}
- totalPages={5}
- variant="dots"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationCarouselDots.doc.mjs b/packages/cli/templates/blocks/components/Pagination/PaginationCompactPagination.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/Pagination/PaginationCarouselDots.doc.mjs
rename to packages/cli/templates/blocks/components/Pagination/PaginationCompactPagination.doc.mjs
index a8db41c4b8..9583a0cf5f 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationCarouselDots.doc.mjs
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationCompactPagination.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Pagination — Carousel Dots',
- description: 'Dot-style pagination indicator for carousels and slideshows.',
+ name: 'Pagination — Compact Variant',
+ description:
+ 'Minimal pagination showing "Page X of Y" with previous/next controls.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Pagination'],
};
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationCompactPagination.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationCompactPagination.tsx
new file mode 100644
index 0000000000..8e1b4f52a9
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationCompactPagination.tsx
@@ -0,0 +1,16 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPagination} from '@xds/core/Pagination';
+
+export default function PaginationCompactPagination() {
+ const [page, setPage] = useState(1);
+ return (
+ <XDSPagination
+ page={page}
+ onChange={setPage}
+ totalPages={10}
+ variant="compact"
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationCountDisplayWithPageSizeSelector.doc.mjs b/packages/cli/templates/blocks/components/Pagination/PaginationCountDisplayWithPageSizeSelector.doc.mjs
deleted file mode 100644
index ab8f593795..0000000000
--- a/packages/cli/templates/blocks/components/Pagination/PaginationCountDisplayWithPageSizeSelector.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Pagination — Count Display With Page Size Selector',
- description: 'Pagination showing "X-Y of Z" count with a page size selector dropdown.',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Pagination'],
-};
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationPageNumberButtons.doc.mjs b/packages/cli/templates/blocks/components/Pagination/PaginationCountPagination.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/Pagination/PaginationPageNumberButtons.doc.mjs
rename to packages/cli/templates/blocks/components/Pagination/PaginationCountPagination.doc.mjs
index b3851ae627..f0a4870b47 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationPageNumberButtons.doc.mjs
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationCountPagination.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Pagination — Page Number Buttons',
- description: 'Default pagination with numbered page buttons and ellipsis truncation.',
+ name: 'Pagination — Count Variant',
+ description:
+ 'Pagination showing item count (e.g. "1–20 of 200") instead of page numbers.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Pagination'],
};
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationPageNumberButtons.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationCountPagination.tsx
similarity index 77%
rename from packages/cli/templates/blocks/components/Pagination/PaginationPageNumberButtons.tsx
rename to packages/cli/templates/blocks/components/Pagination/PaginationCountPagination.tsx
index 00f660cb1e..e945ab1568 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationPageNumberButtons.tsx
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationCountPagination.tsx
@@ -3,15 +3,15 @@
import {useState} from 'react';
import {XDSPagination} from '@xds/core/Pagination';
-export default function PaginationPageNumberButtons() {
+export default function PaginationCountPagination() {
const [page, setPage] = useState(1);
-
return (
<XDSPagination
page={page}
onChange={setPage}
totalItems={200}
pageSize={20}
+ variant="count"
/>
);
}
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationDotsPagination.doc.mjs b/packages/cli/templates/blocks/components/Pagination/PaginationDotsPagination.doc.mjs
new file mode 100644
index 0000000000..7ae0795c8f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationDotsPagination.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Pagination — Dots Variant',
+ description:
+ 'Pagination using dot indicators for page position, suited for carousels and slideshows.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Pagination'],
+};
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationCursorBased.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationDotsPagination.tsx
similarity index 70%
rename from packages/cli/templates/blocks/components/Pagination/PaginationCursorBased.tsx
rename to packages/cli/templates/blocks/components/Pagination/PaginationDotsPagination.tsx
index 751204292f..2d229b40e1 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationCursorBased.tsx
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationDotsPagination.tsx
@@ -3,14 +3,14 @@
import {useState} from 'react';
import {XDSPagination} from '@xds/core/Pagination';
-export default function PaginationCursorBased() {
+export default function PaginationDotsPagination() {
const [page, setPage] = useState(1);
-
return (
<XDSPagination
page={page}
onChange={setPage}
- hasMore={page < 10}
+ totalPages={8}
+ variant="dots"
/>
);
}
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationCursorBased.doc.mjs b/packages/cli/templates/blocks/components/Pagination/PaginationWithPageSize.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/Pagination/PaginationCursorBased.doc.mjs
rename to packages/cli/templates/blocks/components/Pagination/PaginationWithPageSize.doc.mjs
index ce7ed78c5f..6d559dd6a0 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationCursorBased.doc.mjs
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationWithPageSize.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Pagination — Cursor Based',
- description: 'Cursor-based pagination where the total page count is unknown.',
+ name: 'Pagination — With Page Size',
+ description:
+ 'Pagination with a page-size selector dropdown for adjustable rows per page.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Pagination'],
};
diff --git a/packages/cli/templates/blocks/components/Pagination/PaginationCountDisplayWithPageSizeSelector.tsx b/packages/cli/templates/blocks/components/Pagination/PaginationWithPageSize.tsx
similarity index 85%
rename from packages/cli/templates/blocks/components/Pagination/PaginationCountDisplayWithPageSizeSelector.tsx
rename to packages/cli/templates/blocks/components/Pagination/PaginationWithPageSize.tsx
index e8e12dd46d..fad4707fdc 100644
--- a/packages/cli/templates/blocks/components/Pagination/PaginationCountDisplayWithPageSizeSelector.tsx
+++ b/packages/cli/templates/blocks/components/Pagination/PaginationWithPageSize.tsx
@@ -3,19 +3,18 @@
import {useState} from 'react';
import {XDSPagination} from '@xds/core/Pagination';
-export default function PaginationCountDisplayWithPageSizeSelector() {
+export default function PaginationWithPageSize() {
const [page, setPage] = useState(1);
const [pageSize, setPageSize] = useState(10);
-
return (
<XDSPagination
page={page}
onChange={setPage}
totalItems={200}
- variant="count"
pageSize={pageSize}
- pageSizeOptions={[10, 20, 50]}
onPageSizeChange={setPageSize}
+ pageSizeOptions={[10, 20, 50]}
+ variant="count"
/>
);
}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverBasic.doc.mjs b/packages/cli/templates/blocks/components/Popover/PopoverBasic.doc.mjs
deleted file mode 100644
index cfefa4bc5e..0000000000
--- a/packages/cli/templates/blocks/components/Popover/PopoverBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Popover — Basic',
- description: 'Click-triggered popover anchored below a button trigger.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Popover', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverBasic.tsx b/packages/cli/templates/blocks/components/Popover/PopoverBasic.tsx
deleted file mode 100644
index 9b3a337d1c..0000000000
--- a/packages/cli/templates/blocks/components/Popover/PopoverBasic.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client';
-
-import {XDSPopover} from '@xds/core/Popover';
-import {XDSButton} from '@xds/core/Button';
-
-function SettingsPanel() {
- return (
- <div style={{padding: 16}}>
- <p>Settings content goes here</p>
- </div>
- );
-}
-
-export default function PopoverBasic() {
- return (
- <XDSPopover
- label="Settings"
- content={<SettingsPanel />}
- placement="below">
- <XDSButton label="Settings" />
- </XDSPopover>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverConfirmAction.doc.mjs b/packages/cli/templates/blocks/components/Popover/PopoverConfirmAction.doc.mjs
new file mode 100644
index 0000000000..177d779bea
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverConfirmAction.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Popover — Confirm Action',
+ description:
+ 'Inline confirmation popover for destructive actions with delete and cancel buttons.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Popover', 'Button', 'Layout', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverConfirmAction.tsx b/packages/cli/templates/blocks/components/Popover/PopoverConfirmAction.tsx
new file mode 100644
index 0000000000..e1c3d575da
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverConfirmAction.tsx
@@ -0,0 +1,49 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPopover} from '@xds/core/Popover';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack, XDSHStack} from '@xds/core/Layout';
+import {XDSHeading, XDSText} from '@xds/core/Text';
+
+export default function PopoverConfirmAction() {
+ const [isOpen, setIsOpen] = useState(false);
+
+ return (
+ <XDSPopover
+ placement="below"
+ label="Confirm deletion"
+ width={300}
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ content={
+ <XDSVStack gap={3}>
+ <XDSHeading level={4}>
+ Delete project?
+ </XDSHeading>
+ <XDSText type="body">
+ This will permanently delete the project and all its data. This
+ action cannot be undone.
+ </XDSText>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton
+ label="Delete"
+ variant="destructive"
+ onClick={() => setIsOpen(false)}>
+ Delete
+ </XDSButton>
+ <XDSButton
+ label="Cancel"
+ variant="ghost"
+ onClick={() => setIsOpen(false)}>
+ Cancel
+ </XDSButton>
+ </XDSHStack>
+ </XDSVStack>
+ }>
+ <XDSButton label="Delete project" variant="destructive">
+ Delete project
+ </XDSButton>
+ </XDSPopover>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverControlled.doc.mjs b/packages/cli/templates/blocks/components/Popover/PopoverControlled.doc.mjs
deleted file mode 100644
index e5e48eda9c..0000000000
--- a/packages/cli/templates/blocks/components/Popover/PopoverControlled.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Popover — Controlled',
- description: 'Controlled popover with external open/close state management.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Popover', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverControlled.tsx b/packages/cli/templates/blocks/components/Popover/PopoverControlled.tsx
deleted file mode 100644
index 2a843ed938..0000000000
--- a/packages/cli/templates/blocks/components/Popover/PopoverControlled.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSPopover} from '@xds/core/Popover';
-import {XDSButton} from '@xds/core/Button';
-
-function FilterForm() {
- return (
- <div style={{padding: 16}}>
- <p>Filter form content</p>
- </div>
- );
-}
-
-export default function PopoverControlled() {
- const [isOpen, setIsOpen] = useState(false);
-
- return (
- <XDSPopover
- isOpen={isOpen}
- onOpenChange={setIsOpen}
- label="Filter"
- content={<FilterForm />}>
- <XDSButton label="Filter" />
- </XDSPopover>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverFilterPanel.doc.mjs b/packages/cli/templates/blocks/components/Popover/PopoverFilterPanel.doc.mjs
new file mode 100644
index 0000000000..c56bcf093a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverFilterPanel.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Popover — Filter Panel',
+ description:
+ 'Controlled popover with checkbox filters, apply and reset actions for filtering list data.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Popover', 'Button', 'Layout', 'Text', 'CheckboxInput', 'Divider'],
+};
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverFilterPanel.tsx b/packages/cli/templates/blocks/components/Popover/PopoverFilterPanel.tsx
new file mode 100644
index 0000000000..61b24f7083
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverFilterPanel.tsx
@@ -0,0 +1,83 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPopover} from '@xds/core/Popover';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack, XDSHStack} from '@xds/core/Layout';
+import {XDSHeading} from '@xds/core/Text';
+import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
+import {XDSDivider} from '@xds/core/Divider';
+
+export default function PopoverFilterPanel() {
+ const [isOpen, setIsOpen] = useState(false);
+ const [filters, setFilters] = useState({
+ active: true,
+ archived: false,
+ drafts: true,
+ shared: false,
+ });
+
+ const toggle = (key: keyof typeof filters) =>
+ setFilters(prev => ({...prev, [key]: !prev[key]}));
+
+ return (
+ <XDSPopover
+ placement="below"
+ label="Filter"
+ width={240}
+ isOpen={isOpen}
+ onOpenChange={setIsOpen}
+ content={
+ <XDSVStack gap={3}>
+ <XDSHeading level={4}>
+ Filter by status
+ </XDSHeading>
+ <XDSDivider />
+ <XDSCheckboxInput
+ label="Active"
+ value={filters.active}
+ onChange={() => toggle('active')}
+ />
+ <XDSCheckboxInput
+ label="Archived"
+ value={filters.archived}
+ onChange={() => toggle('archived')}
+ />
+ <XDSCheckboxInput
+ label="Drafts"
+ value={filters.drafts}
+ onChange={() => toggle('drafts')}
+ />
+ <XDSCheckboxInput
+ label="Shared with me"
+ value={filters.shared}
+ onChange={() => toggle('shared')}
+ />
+ <XDSDivider />
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton
+ label="Apply"
+ variant="primary"
+ onClick={() => setIsOpen(false)}>
+ Apply
+ </XDSButton>
+ <XDSButton
+ label="Reset"
+ variant="ghost"
+ onClick={() =>
+ setFilters({
+ active: true,
+ archived: false,
+ drafts: true,
+ shared: false,
+ })
+ }>
+ Reset
+ </XDSButton>
+ </XDSHStack>
+ </XDSVStack>
+ }>
+ <XDSButton label="Filter">Filter</XDSButton>
+ </XDSPopover>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverKeyboardShortcuts.doc.mjs b/packages/cli/templates/blocks/components/Popover/PopoverKeyboardShortcuts.doc.mjs
new file mode 100644
index 0000000000..a66c5c1bfb
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverKeyboardShortcuts.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Popover — Keyboard Shortcuts',
+ description:
+ 'Popover displaying a list of keyboard shortcuts with key and description pairs.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Popover', 'Button', 'Layout', 'Text', 'Divider'],
+};
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverKeyboardShortcuts.tsx b/packages/cli/templates/blocks/components/Popover/PopoverKeyboardShortcuts.tsx
new file mode 100644
index 0000000000..34ddc00c23
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverKeyboardShortcuts.tsx
@@ -0,0 +1,40 @@
+'use client';
+
+import {XDSPopover} from '@xds/core/Popover';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack, XDSHStack} from '@xds/core/Layout';
+import {XDSHeading, XDSText} from '@xds/core/Text';
+import {XDSDivider} from '@xds/core/Divider';
+
+const shortcuts = [
+ {key: '⌘K', action: 'Command palette'},
+ {key: '⌘/', action: 'Toggle sidebar'},
+ {key: '⌘.', action: 'Quick actions'},
+];
+
+export default function PopoverKeyboardShortcuts() {
+ return (
+ <XDSPopover
+ placement="below"
+ label="Keyboard shortcuts"
+ width={260}
+ content={
+ <XDSVStack gap={2}>
+ <XDSHeading level={4}>
+ Keyboard shortcuts
+ </XDSHeading>
+ <XDSDivider />
+ {shortcuts.map(s => (
+ <XDSHStack key={s.key} gap={3}>
+ <XDSText type="body" weight="bold">
+ {s.key}
+ </XDSText>
+ <XDSText type="body">{s.action}</XDSText>
+ </XDSHStack>
+ ))}
+ </XDSVStack>
+ }>
+ <XDSButton label="Shortcuts">Shortcuts</XDSButton>
+ </XDSPopover>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverSettingsPanel.doc.mjs b/packages/cli/templates/blocks/components/Popover/PopoverSettingsPanel.doc.mjs
new file mode 100644
index 0000000000..d3e14ec634
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverSettingsPanel.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Popover — Settings Panel',
+ description:
+ 'Popover with toggle switches for managing user preferences like notifications, dark mode, and sounds.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Popover', 'Button', 'Layout', 'Text', 'Switch', 'Divider'],
+};
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverSettingsPanel.tsx b/packages/cli/templates/blocks/components/Popover/PopoverSettingsPanel.tsx
new file mode 100644
index 0000000000..59c950c842
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Popover/PopoverSettingsPanel.tsx
@@ -0,0 +1,50 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPopover} from '@xds/core/Popover';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSHeading} from '@xds/core/Text';
+import {XDSSwitch} from '@xds/core/Switch';
+import {XDSDivider} from '@xds/core/Divider';
+
+export default function PopoverSettingsPanel() {
+ const [notifications, setNotifications] = useState(true);
+ const [darkMode, setDarkMode] = useState(false);
+ const [sounds, setSounds] = useState(true);
+
+ return (
+ <XDSPopover
+ placement="below"
+ label="Settings"
+ width={280}
+ content={
+ <XDSVStack gap={3}>
+ <XDSHeading level={4}>
+ Settings
+ </XDSHeading>
+ <XDSDivider />
+ <XDSSwitch
+ label="Notifications"
+ description="Receive push notifications"
+ value={notifications}
+ onChange={setNotifications}
+ />
+ <XDSSwitch
+ label="Dark mode"
+ description="Use dark color theme"
+ value={darkMode}
+ onChange={setDarkMode}
+ />
+ <XDSSwitch
+ label="Sounds"
+ description="Play sounds for actions"
+ value={sounds}
+ onChange={setSounds}
+ />
+ </XDSVStack>
+ }>
+ <XDSButton label="Settings">Settings</XDSButton>
+ </XDSPopover>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverSiblingModeWithAnchorRef.tsx b/packages/cli/templates/blocks/components/Popover/PopoverSiblingModeWithAnchorRef.tsx
deleted file mode 100644
index 26f72a8f18..0000000000
--- a/packages/cli/templates/blocks/components/Popover/PopoverSiblingModeWithAnchorRef.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-'use client';
-
-import type {RefObject} from 'react';
-import {useRef} from 'react';
-import {XDSPopover} from '@xds/core/Popover';
-import {XDSButton} from '@xds/core/Button';
-
-function ActionMenu() {
- return (
- <div style={{padding: 16}}>
- <p>Action menu content</p>
- </div>
- );
-}
-
-export default function PopoverSiblingModeWithAnchorRef() {
- const buttonRef = useRef<HTMLButtonElement>(null);
-
- return (
- <>
- <XDSButton label="Actions" ref={buttonRef} />
- <XDSPopover
- anchorRef={buttonRef as RefObject<HTMLElement>}
- label="Actions"
- content={<ActionMenu />}
- placement="below"
- />
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverUsePopoverHook.doc.mjs b/packages/cli/templates/blocks/components/Popover/PopoverUsePopoverHook.doc.mjs
deleted file mode 100644
index 401eca785c..0000000000
--- a/packages/cli/templates/blocks/components/Popover/PopoverUsePopoverHook.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Popover — Use Popover Hook',
- description: 'Popover created with the useXDSPopover hook for custom trigger control.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Popover'],
-};
diff --git a/packages/cli/templates/blocks/components/Popover/PopoverUsePopoverHook.tsx b/packages/cli/templates/blocks/components/Popover/PopoverUsePopoverHook.tsx
deleted file mode 100644
index 86b00bea57..0000000000
--- a/packages/cli/templates/blocks/components/Popover/PopoverUsePopoverHook.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-'use client';
-
-import {useXDSPopover} from '@xds/core/Popover';
-
-function CalendarContent() {
- return (
- <div style={{padding: 16}}>
- <p>Calendar picker content</p>
- </div>
- );
-}
-
-export default function PopoverUsePopoverHook() {
- const popover = useXDSPopover({
- closeButtonLabel: 'Close calendar',
- });
-
- return (
- <>
- <button
- ref={popover.triggerRef}
- onClick={popover.toggle}
- {...popover.triggerProps}>
- Open Calendar
- </button>
- {popover.render(<CalendarContent />, {
- placement: 'below',
- alignment: 'start',
- })}
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchBasicWithEnumFilters.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchBasicWithEnumFilters.tsx
deleted file mode 100644
index f754070c76..0000000000
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchBasicWithEnumFilters.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSPowerSearch} from '@xds/core/PowerSearch';
-import type {PowerSearchConfig, PowerSearchFilter} from '@xds/core/PowerSearch';
-
-const config: PowerSearchConfig = {
- name: 'TaskSearch',
- fields: [
- {
- key: 'status',
- label: 'Status',
- operators: [
- {
- key: 'is',
- label: 'is',
- value: {
- type: 'enum',
- values: [
- {value: 'open', label: 'Open'},
- {value: 'closed', label: 'Closed'},
- ],
- },
- },
- ],
- },
- {
- key: 'title',
- label: 'Title',
- operators: [
- {
- key: 'contains',
- label: 'contains',
- value: {type: 'string'},
- },
- ],
- },
- ],
-};
-
-export default function PowerSearchBasicWithEnumFilters() {
- const [filters, setFilters] = useState<ReadonlyArray<PowerSearchFilter>>([]);
-
- return (
- <XDSPowerSearch
- config={config}
- filters={filters}
- onChange={(newFilters) => setFilters(newFilters)}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithInitialFilters.doc.mjs b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithInitialFilters.doc.mjs
rename to packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.doc.mjs
index 6675ff0ecc..c51274177c 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithInitialFilters.doc.mjs
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'PowerSearch — With Initial Filters',
- description: 'Structured filter bar pre-populated with an initial filter token.',
+ name: 'PowerSearch — Content Search',
+ description:
+ 'Power search with contentSearchFieldKey so free-text input maps to a title field automatically.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['PowerSearch'],
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx
new file mode 100644
index 0000000000..cde0e24c91
--- /dev/null
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchContentSearch.tsx
@@ -0,0 +1,71 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPowerSearch} from '@xds/core/PowerSearch';
+import type {PowerSearchConfig, PowerSearchFilter} from '@xds/core/PowerSearch';
+
+const statusValues = [
+ {value: 'open', label: 'Open'},
+ {value: 'in_progress', label: 'In Progress'},
+ {value: 'closed', label: 'Closed'},
+];
+
+const priorityValues = [
+ {value: 'p0', label: 'P0 — Critical'},
+ {value: 'p1', label: 'P1 — High'},
+ {value: 'p2', label: 'P2 — Medium'},
+ {value: 'p3', label: 'P3 — Low'},
+];
+
+const config: PowerSearchConfig = {
+ name: 'ContentSearch',
+ contentSearchFieldKey: 'title',
+ fields: [
+ {
+ key: 'title',
+ label: 'Title',
+ defaultOperator: 'contains',
+ operators: [
+ {key: 'contains', label: 'contains', value: {type: 'string'}},
+ {
+ key: 'not_contains',
+ label: 'does not contain',
+ value: {type: 'string'},
+ },
+ ],
+ },
+ {
+ key: 'status',
+ label: 'Status',
+ defaultOperator: 'is',
+ operators: [
+ {key: 'is', label: 'is', value: {type: 'enum', values: statusValues}},
+ ],
+ },
+ {
+ key: 'priority',
+ label: 'Priority',
+ defaultOperator: 'is',
+ operators: [
+ {
+ key: 'is',
+ label: 'is',
+ value: {type: 'enum', values: priorityValues},
+ },
+ ],
+ },
+ ],
+};
+
+export default function PowerSearchContentSearch() {
+ const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
+
+ return (
+ <XDSPowerSearch
+ config={config}
+ filters={filters}
+ onChange={newFilters => setFilters([...newFilters])}
+ placeholder="Type to search by title, or pick a field..."
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithContentSearchFieldKey.doc.mjs b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithContentSearchFieldKey.doc.mjs
rename to packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.doc.mjs
index 228aec5e82..258e1d7e05 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithContentSearchFieldKey.doc.mjs
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'PowerSearch — With Content Search Field Key',
- description: 'Power search with free-text search that maps to a content field.',
+ name: 'PowerSearch — Full Featured',
+ description:
+ 'Power search with all field types: enum, multi-select, entity, integer, date, and text filters.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['PowerSearch'],
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx
new file mode 100644
index 0000000000..81dfd03d67
--- /dev/null
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchFullFeatured.tsx
@@ -0,0 +1,162 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPowerSearch} from '@xds/core/PowerSearch';
+import type {PowerSearchConfig, PowerSearchFilter} from '@xds/core/PowerSearch';
+import type {XDSSearchSource, XDSSearchableItem} from '@xds/core/Typeahead';
+
+const statusValues = [
+ {value: 'open', label: 'Open'},
+ {value: 'in_progress', label: 'In Progress'},
+ {value: 'review', label: 'In Review'},
+ {value: 'closed', label: 'Closed'},
+];
+
+const priorityValues = [
+ {value: 'p0', label: 'P0 — Critical'},
+ {value: 'p1', label: 'P1 — High'},
+ {value: 'p2', label: 'P2 — Medium'},
+ {value: 'p3', label: 'P3 — Low'},
+];
+
+const tagValues = [
+ {value: 'bug', label: 'Bug'},
+ {value: 'feature', label: 'Feature'},
+ {value: 'docs', label: 'Documentation'},
+ {value: 'perf', label: 'Performance'},
+ {value: 'security', label: 'Security'},
+];
+
+const users: XDSSearchableItem[] = [
+ {id: 'user-1', label: 'Alice Johnson'},
+ {id: 'user-2', label: 'Bob Smith'},
+ {id: 'user-3', label: 'Charlie Brown'},
+ {id: 'user-4', label: 'Diana Prince'},
+];
+
+const userSource: XDSSearchSource = {
+ search: (query: string) =>
+ users.filter(u => u.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => users,
+};
+
+const config: PowerSearchConfig = {
+ name: 'FullSearch',
+ fields: [
+ {
+ key: 'status',
+ label: 'Status',
+ defaultOperator: 'any_of',
+ operators: [
+ {
+ key: 'any_of',
+ label: 'is any of',
+ value: {type: 'enum_list', values: statusValues},
+ },
+ {
+ key: 'none_of',
+ label: 'is none of',
+ value: {type: 'enum_list', values: statusValues},
+ },
+ ],
+ },
+ {
+ key: 'title',
+ label: 'Title',
+ defaultOperator: 'contains',
+ operators: [
+ {key: 'contains', label: 'contains', value: {type: 'string'}},
+ {
+ key: 'not_contains',
+ label: 'does not contain',
+ value: {type: 'string'},
+ },
+ ],
+ },
+ {
+ key: 'priority',
+ label: 'Priority',
+ defaultOperator: 'is',
+ operators: [
+ {
+ key: 'is',
+ label: 'is',
+ value: {type: 'enum', values: priorityValues},
+ },
+ ],
+ },
+ {
+ key: 'assignee',
+ label: 'Assignee',
+ defaultOperator: 'any_of',
+ operators: [
+ {
+ key: 'any_of',
+ label: 'is any of',
+ value: {type: 'entity_list', searchSource: userSource},
+ },
+ ],
+ },
+ {
+ key: 'tags',
+ label: 'Tags',
+ defaultOperator: 'include',
+ operators: [
+ {
+ key: 'include',
+ label: 'include',
+ value: {type: 'enum_list', values: tagValues},
+ },
+ {
+ key: 'exclude',
+ label: 'exclude',
+ value: {type: 'enum_list', values: tagValues},
+ },
+ ],
+ },
+ {
+ key: 'line_count',
+ label: 'Line count',
+ defaultOperator: 'gt',
+ operators: [
+ {
+ key: 'gt',
+ label: 'is greater than',
+ value: {type: 'integer', minValue: 0, maxValue: 10000, units: 'lines'},
+ },
+ {
+ key: 'lt',
+ label: 'is less than',
+ value: {type: 'integer', minValue: 0, maxValue: 10000, units: 'lines'},
+ },
+ ],
+ },
+ {
+ key: 'created',
+ label: 'Created',
+ defaultOperator: 'after',
+ operators: [
+ {
+ key: 'after',
+ label: 'is after',
+ value: {type: 'date_absolute', isDateOnly: true},
+ },
+ ],
+ },
+ ],
+};
+
+export default function PowerSearchFullFeatured() {
+ const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
+
+ return (
+ <div style={{width: 700}}>
+ <XDSPowerSearch
+ config={config}
+ filters={filters}
+ onChange={newFilters => setFilters([...newFilters])}
+ placeholder="Search..."
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchBasicWithEnumFilters.doc.mjs b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/PowerSearch/PowerSearchBasicWithEnumFilters.doc.mjs
rename to packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.doc.mjs
index 57f4a271cf..1af5d2ae6f 100644
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchBasicWithEnumFilters.doc.mjs
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'PowerSearch — Basic With Enum Filters',
- description: 'Structured filter bar with enum and string field types.',
+ name: 'PowerSearch — Preset Filters',
+ description:
+ 'Power search initialized with pre-set filter tokens for status and priority.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['PowerSearch'],
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx
new file mode 100644
index 0000000000..43cf76e84f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchPresetFilters.tsx
@@ -0,0 +1,74 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPowerSearch} from '@xds/core/PowerSearch';
+import type {PowerSearchConfig, PowerSearchFilter} from '@xds/core/PowerSearch';
+
+const statusValues = [
+ {value: 'open', label: 'Open'},
+ {value: 'in_progress', label: 'In Progress'},
+ {value: 'review', label: 'In Review'},
+ {value: 'closed', label: 'Closed'},
+];
+
+const priorityValues = [
+ {value: 'p0', label: 'P0 — Critical'},
+ {value: 'p1', label: 'P1 — High'},
+ {value: 'p2', label: 'P2 — Medium'},
+ {value: 'p3', label: 'P3 — Low'},
+];
+
+const config: PowerSearchConfig = {
+ name: 'TaskSearch',
+ fields: [
+ {
+ key: 'status',
+ label: 'Status',
+ defaultOperator: 'is',
+ operators: [
+ {key: 'is', label: 'is', value: {type: 'enum', values: statusValues}},
+ {
+ key: 'is_not',
+ label: 'is not',
+ value: {type: 'enum', values: statusValues},
+ },
+ ],
+ },
+ {
+ key: 'title',
+ label: 'Title',
+ defaultOperator: 'contains',
+ operators: [
+ {key: 'contains', label: 'contains', value: {type: 'string'}},
+ ],
+ },
+ {
+ key: 'priority',
+ label: 'Priority',
+ defaultOperator: 'is',
+ operators: [
+ {
+ key: 'is',
+ label: 'is',
+ value: {type: 'enum', values: priorityValues},
+ },
+ ],
+ },
+ ],
+};
+
+export default function PowerSearchPresetFilters() {
+ const [filters, setFilters] = useState<PowerSearchFilter[]>([
+ {field: 'status', operator: 'is', value: {type: 'enum', value: 'open'}},
+ {field: 'priority', operator: 'is', value: {type: 'enum', value: 'p1'}},
+ ]);
+
+ return (
+ <XDSPowerSearch
+ config={config}
+ filters={filters}
+ onChange={newFilters => setFilters([...newFilters])}
+ placeholder="Add more filters..."
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.doc.mjs b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.doc.mjs
new file mode 100644
index 0000000000..a33ef81fc3
--- /dev/null
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'PowerSearch — Search with Table',
+ description:
+ 'Composition of PowerSearch with Table using usePowerSearchConfig to auto-generate config and filter data.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['PowerSearch', 'Table'],
+};
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx
new file mode 100644
index 0000000000..cbdb252c68
--- /dev/null
+++ b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchSearchWithTable.tsx
@@ -0,0 +1,74 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSPowerSearch, usePowerSearchConfig} from '@xds/core/PowerSearch';
+import type {PowerSearchFilter} from '@xds/core/PowerSearch';
+import {XDSTable, pixel, proportional} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+
+const genreValues = [
+ {value: 'fiction', label: 'Fiction'},
+ {value: 'non-fiction', label: 'Non-Fiction'},
+ {value: 'sci-fi', label: 'Science Fiction'},
+ {value: 'fantasy', label: 'Fantasy'},
+ {value: 'mystery', label: 'Mystery'},
+ {value: 'romance', label: 'Romance'},
+];
+
+const fieldDefs = [
+ {key: 'title', type: 'string', label: 'Title'},
+ {key: 'author', type: 'string', label: 'Author'},
+ {key: 'year', type: 'number', label: 'Publication Year'},
+ {key: 'genre', type: 'enum', label: 'Genre', enumValues: genreValues},
+] as const;
+
+interface Book extends Record<string, unknown> {
+ id: string;
+ title: string;
+ author: string;
+ year: number;
+ genre: string;
+}
+
+const books: Book[] = [
+ {id: '1', title: 'Dune', author: 'Frank Herbert', year: 1965, genre: 'sci-fi'},
+ {id: '2', title: 'Pride and Prejudice', author: 'Jane Austen', year: 1813, genre: 'romance'},
+ {id: '3', title: 'The Great Gatsby', author: 'F. Scott Fitzgerald', year: 1925, genre: 'fiction'},
+ {id: '4', title: '1984', author: 'George Orwell', year: 1949, genre: 'sci-fi'},
+ {id: '5', title: 'To Kill a Mockingbird', author: 'Harper Lee', year: 1960, genre: 'fiction'},
+ {id: '6', title: 'The Hobbit', author: 'J.R.R. Tolkien', year: 1937, genre: 'fantasy'},
+ {id: '7', title: 'Sapiens', author: 'Yuval Noah Harari', year: 2011, genre: 'non-fiction'},
+ {id: '8', title: 'Gone Girl', author: 'Gillian Flynn', year: 2012, genre: 'mystery'},
+];
+
+const columns: XDSTableColumn<Book>[] = [
+ {key: 'title', header: 'Title', width: proportional(2)},
+ {key: 'author', header: 'Author', width: proportional(2)},
+ {key: 'year', header: 'Year', width: pixel(100)},
+ {
+ key: 'genre',
+ header: 'Genre',
+ width: pixel(140),
+ renderCell: (book: Book) =>
+ genreValues.find(g => g.value === book.genre)?.label ?? book.genre,
+ },
+];
+
+export default function PowerSearchSearchWithTable() {
+ const [filters, setFilters] = useState<PowerSearchFilter[]>([]);
+ const {config, applyFilters} = usePowerSearchConfig(fieldDefs, 'Books');
+ const filteredBooks = applyFilters(filters, books);
+
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 16}}>
+ <XDSPowerSearch
+ config={config}
+ filters={filters}
+ onChange={newFilters => setFilters([...newFilters])}
+ placeholder="Filter books by title, author, year, genre..."
+ resultCount={filteredBooks.length}
+ />
+ <XDSTable data={filteredBooks} columns={columns} idKey="id" hasHover />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithContentSearchFieldKey.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithContentSearchFieldKey.tsx
deleted file mode 100644
index 6992fa192d..0000000000
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithContentSearchFieldKey.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSPowerSearch} from '@xds/core/PowerSearch';
-import type {PowerSearchConfig, PowerSearchFilter} from '@xds/core/PowerSearch';
-
-const config: PowerSearchConfig = {
- name: 'IssueSearch',
- contentSearchFieldKey: 'title',
- fields: [
- {
- key: 'title',
- label: 'Title',
- operators: [
- {key: 'contains', label: 'contains', value: {type: 'string'}},
- {key: 'is', label: 'is', value: {type: 'string'}},
- ],
- },
- {
- key: 'status',
- label: 'Status',
- operators: [
- {
- key: 'is',
- label: 'is',
- value: {
- type: 'enum',
- values: [
- {value: 'open', label: 'Open'},
- {value: 'closed', label: 'Closed'},
- ],
- },
- },
- ],
- },
- ],
-};
-
-export default function PowerSearchWithContentSearchFieldKey() {
- const [filters, setFilters] = useState<ReadonlyArray<PowerSearchFilter>>([]);
-
- return (
- <XDSPowerSearch
- config={config}
- filters={filters}
- onChange={(newFilters) => setFilters(newFilters)}
- placeholder="Search issues..."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithInitialFilters.tsx b/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithInitialFilters.tsx
deleted file mode 100644
index 61529569b7..0000000000
--- a/packages/cli/templates/blocks/components/PowerSearch/PowerSearchWithInitialFilters.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSPowerSearch} from '@xds/core/PowerSearch';
-import type {PowerSearchConfig, PowerSearchFilter} from '@xds/core/PowerSearch';
-
-const config: PowerSearchConfig = {
- name: 'TaskSearch',
- fields: [
- {
- key: 'status',
- label: 'Status',
- operators: [
- {
- key: 'is',
- label: 'is',
- value: {
- type: 'enum',
- values: [
- {value: 'open', label: 'Open'},
- {value: 'closed', label: 'Closed'},
- ],
- },
- },
- ],
- },
- ],
-};
-
-export default function PowerSearchWithInitialFilters() {
- const [filters, setFilters] = useState<ReadonlyArray<PowerSearchFilter>>([
- {field: 'status', operator: 'is', value: {type: 'enum' as const, value: 'open'}},
- ]);
-
- return (
- <XDSPowerSearch
- config={config}
- filters={filters}
- onChange={(newFilters) => setFilters(newFilters)}
- placeholder="Add filters..."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithExternalDescription.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithExternalDescription.doc.mjs
deleted file mode 100644
index 36255de07f..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithExternalDescription.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'ProgressBar — Composed With External Description',
- description: 'Progress bar composed with external descriptive text below.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['ProgressBar', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithExternalDescription.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithExternalDescription.tsx
deleted file mode 100644
index 0e87192f70..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithExternalDescription.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-import {XDSText} from '@xds/core/Text';
-
-export default function ProgressBarComposedWithExternalDescription() {
- return (
- <div>
- <XDSProgressBar
- value={40}
- max={100}
- label="Download progress"
- hasValueLabel
- />
- <XDSText type="body" color="secondary" size="sm">
- 40 MB / 100 MB downloaded
- </XDSText>
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithStatusIcon.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithStatusIcon.doc.mjs
deleted file mode 100644
index bae0983e71..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithStatusIcon.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'ProgressBar — Composed With Status Icon',
- description: 'Completed progress bar composed with a success status icon and text.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['ProgressBar', 'Layout', 'Text', 'Icon'],
-};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithStatusIcon.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithStatusIcon.tsx
deleted file mode 100644
index 203e099d65..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarComposedWithStatusIcon.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-import {XDSVStack, XDSHStack} from '@xds/core/Layout';
-import {XDSText} from '@xds/core/Text';
-import {XDSIcon} from '@xds/core/Icon';
-
-function CheckCircleIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" />
- </svg>
- );
-}
-
-export default function ProgressBarComposedWithStatusIcon() {
- return (
- <XDSVStack gap={1}>
- <XDSProgressBar
- value={100}
- label="Upload complete"
- variant="positive"
- hasValueLabel
- />
- <XDSHStack gap={1} vAlign="center">
- <XDSIcon icon={CheckCircleIcon} color="positive" size="sm" />
- <XDSText type="body" color="secondary" size="sm">
- Upload complete
- </XDSText>
- </XDSHStack>
- </XDSVStack>
- );
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarHiddenLabel.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/ProgressBar/ProgressBarHiddenLabel.doc.mjs
rename to packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.doc.mjs
index f222755f85..66bbddfbce 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarHiddenLabel.doc.mjs
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'ProgressBar — Hidden Label',
- description: 'Progress bar with a visually hidden but accessible label.',
+ name: 'ProgressBar — Custom Format',
+ description:
+ 'Progress bar with a custom value label formatter showing disk usage in GB.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['ProgressBar'],
};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.tsx
new file mode 100644
index 0000000000..79f6292d87
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomFormat.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {XDSProgressBar} from '@xds/core/ProgressBar';
+
+export default function ProgressBarCustomFormat() {
+ return (
+ <div style={{width: 300}}>
+ <XDSProgressBar
+ value={3.2}
+ max={5}
+ label="Disk usage"
+ hasValueLabel
+ formatValueLabel={(value: number, max: number) =>
+ `${value} GB / ${max} GB`
+ }
+ />
+ <div
+ style={{
+ fontSize: 12,
+ color: 'var(--color-text-secondary)',
+ marginTop: 4,
+ }}>
+ 1.8 GB remaining
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomValueLabelFormatter.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomValueLabelFormatter.tsx
deleted file mode 100644
index a6066e9229..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomValueLabelFormatter.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-
-export default function ProgressBarCustomValueLabelFormatter() {
- return (
- <XDSProgressBar
- value={3.2}
- max={5}
- label="Disk usage"
- hasValueLabel
- formatValueLabel={(value, max) => `${value} GB / ${max} GB`}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarDeterminate.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarDeterminate.tsx
deleted file mode 100644
index cb38240968..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarDeterminate.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-
-export default function ProgressBarDeterminate() {
- return <XDSProgressBar value={75} label="Upload progress" />;
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarHiddenLabel.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarHiddenLabel.tsx
deleted file mode 100644
index bd41b0d17f..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarHiddenLabel.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-
-export default function ProgressBarHiddenLabel() {
- return <XDSProgressBar value={50} label="Loading" isLabelHidden />;
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomValueLabelFormatter.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomValueLabelFormatter.doc.mjs
rename to packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.doc.mjs
index dcb9c3cf86..c8fa5e5576 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarCustomValueLabelFormatter.doc.mjs
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'ProgressBar — Custom Value Label Formatter',
- description: 'Progress bar with a custom GB value label formatter.',
+ name: 'ProgressBar — Indeterminate',
+ description:
+ 'Indeterminate progress bar for operations with unknown duration.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['ProgressBar'],
};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.tsx
new file mode 100644
index 0000000000..bcfa40e7c2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminate.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+import {XDSProgressBar} from '@xds/core/ProgressBar';
+
+export default function ProgressBarIndeterminate() {
+ return (
+ <div style={{width: 300}}>
+ <XDSProgressBar isIndeterminate label="Loading..." />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminateLoading.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminateLoading.doc.mjs
deleted file mode 100644
index 6631acd4a0..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminateLoading.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'ProgressBar — Indeterminate Loading',
- description: 'Animated indeterminate progress bar for unknown-duration operations.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['ProgressBar'],
-};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminateLoading.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminateLoading.tsx
deleted file mode 100644
index 7fade4cdb5..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarIndeterminateLoading.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-
-export default function ProgressBarIndeterminateLoading() {
- return <XDSProgressBar isIndeterminate label="Loading..." />;
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariant.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariant.doc.mjs
deleted file mode 100644
index 2a2d6901c7..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariant.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'ProgressBar — Semantic Variant',
- description: 'Progress bar using the negative semantic color variant.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['ProgressBar'],
-};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariant.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariant.tsx
deleted file mode 100644
index 2293159d88..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariant.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-
-export default function ProgressBarSemanticVariant() {
- return <XDSProgressBar value={92} label="Disk" variant="negative" />;
-}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.doc.mjs
new file mode 100644
index 0000000000..8f1774abd5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ProgressBar — Semantic Variants',
+ description:
+ 'All five semantic color variants side by side: accent, positive, warning, negative, and neutral.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ProgressBar'],
+};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.tsx
new file mode 100644
index 0000000000..bf1ebf2a26
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarSemanticVariants.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSProgressBar} from '@xds/core/ProgressBar';
+
+export default function ProgressBarSemanticVariants() {
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 16, width: 300}}>
+ <XDSProgressBar value={60} label="Accent" variant="accent" hasValueLabel />
+ <XDSProgressBar value={80} label="Positive" variant="positive" hasValueLabel />
+ <XDSProgressBar value={50} label="Warning" variant="warning" hasValueLabel />
+ <XDSProgressBar value={92} label="Negative" variant="negative" hasValueLabel />
+ <XDSProgressBar value={35} label="Neutral" variant="neutral" hasValueLabel />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarDeterminate.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/ProgressBar/ProgressBarDeterminate.doc.mjs
rename to packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.doc.mjs
index bf4ab6223f..47627516f8 100644
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarDeterminate.doc.mjs
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'ProgressBar — Determinate',
- description: 'Determinate progress bar showing 75% completion.',
+ name: 'ProgressBar — With Value Label',
+ description:
+ 'Progress bar displaying its current percentage alongside the label.',
isReady: true,
- aspectRatio: 16 / 4,
+ aspectRatio: 4 / 3,
componentsUsed: ['ProgressBar'],
};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.tsx
new file mode 100644
index 0000000000..d6853a9d64
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithValueLabel.tsx
@@ -0,0 +1,11 @@
+'use client';
+
+import {XDSProgressBar} from '@xds/core/ProgressBar';
+
+export default function ProgressBarWithValueLabel() {
+ return (
+ <div style={{width: 300}}>
+ <XDSProgressBar value={75} label="Storage used" hasValueLabel />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithVisibleValueLabel.doc.mjs b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithVisibleValueLabel.doc.mjs
deleted file mode 100644
index 12661be324..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithVisibleValueLabel.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'ProgressBar — With Visible Value Label',
- description: 'Progress bar with a visible percentage value label.',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['ProgressBar'],
-};
diff --git a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithVisibleValueLabel.tsx b/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithVisibleValueLabel.tsx
deleted file mode 100644
index 8c1114f79a..0000000000
--- a/packages/cli/templates/blocks/components/ProgressBar/ProgressBarWithVisibleValueLabel.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSProgressBar} from '@xds/core/ProgressBar';
-
-export default function ProgressBarWithVisibleValueLabel() {
- return <XDSProgressBar value={75} label="Storage used" hasValueLabel />;
-}
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListBasic.tsx b/packages/cli/templates/blocks/components/RadioList/RadioListBasic.tsx
deleted file mode 100644
index c4ec361f93..0000000000
--- a/packages/cli/templates/blocks/components/RadioList/RadioListBasic.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
-
-export default function RadioListBasic() {
- const [selected, setSelected] = useState('email');
-
- return (
- <XDSRadioList
- label="Notification preference"
- value={selected}
- onChange={setSelected}>
- <XDSRadioListItem label="Email" value="email" />
- <XDSRadioListItem label="SMS" value="sms" />
- <XDSRadioListItem label="Push" value="push" />
- </XDSRadioList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListDisabledGroup.tsx b/packages/cli/templates/blocks/components/RadioList/RadioListDisabledGroup.tsx
deleted file mode 100644
index 45b5e0fa7a..0000000000
--- a/packages/cli/templates/blocks/components/RadioList/RadioListDisabledGroup.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
-
-export default function RadioListDisabledGroup() {
- return (
- <XDSRadioList
- label="Locked selection"
- value="locked"
- onChange={() => {}}
- isDisabled>
- <XDSRadioListItem label="Locked" value="locked" />
- <XDSRadioListItem label="Unavailable" value="unavailable" />
- </XDSRadioList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.doc.mjs b/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.doc.mjs
index f32a176301..53b3014c6b 100644
--- a/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'RadioList — Horizontal Layout',
- description: 'Radio group displayed in a horizontal row layout.',
+ description:
+ 'Radio list with horizontal orientation for compact inline selection like sizes.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['RadioList'],
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.tsx b/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.tsx
index 1591ec3812..830b44922d 100644
--- a/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.tsx
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListHorizontalLayout.tsx
@@ -4,14 +4,14 @@ import {useState} from 'react';
import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
export default function RadioListHorizontalLayout() {
- const [size, setSize] = useState('md');
+ const [value, setValue] = useState('md');
return (
<XDSRadioList
label="Size"
- value={size}
- onChange={setSize}
- orientation="horizontal">
+ orientation="horizontal"
+ value={value}
+ onChange={setValue}>
<XDSRadioListItem label="Small" value="sm" />
<XDSRadioListItem label="Medium" value="md" />
<XDSRadioListItem label="Large" value="lg" />
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListDisabledGroup.doc.mjs b/packages/cli/templates/blocks/components/RadioList/RadioListPricingTier.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/RadioList/RadioListDisabledGroup.doc.mjs
rename to packages/cli/templates/blocks/components/RadioList/RadioListPricingTier.doc.mjs
index 2697a1bd5b..8d4b8b3464 100644
--- a/packages/cli/templates/blocks/components/RadioList/RadioListDisabledGroup.doc.mjs
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListPricingTier.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'RadioList — Disabled Group',
- description: 'Radio group with all items disabled.',
+ name: 'RadioList — Pricing Tier',
+ description:
+ 'Radio list with end content showing pricing info, a common pattern for plan selection.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['RadioList'],
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListPricingTier.tsx b/packages/cli/templates/blocks/components/RadioList/RadioListPricingTier.tsx
new file mode 100644
index 0000000000..28f6b1eca2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListPricingTier.tsx
@@ -0,0 +1,28 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
+
+export default function RadioListPricingTier() {
+ const [value, setValue] = useState('');
+
+ return (
+ <XDSRadioList label="Plan" value={value} onChange={setValue}>
+ <XDSRadioListItem
+ label="Free"
+ value="free"
+ endContent={<span style={{color: '#0D8626'}}>$0/mo</span>}
+ />
+ <XDSRadioListItem
+ label="Pro"
+ value="pro"
+ endContent={<span style={{color: '#0064E0'}}>$9/mo</span>}
+ />
+ <XDSRadioListItem
+ label="Enterprise"
+ value="enterprise"
+ endContent={<span style={{color: '#5B08D8'}}>Custom</span>}
+ />
+ </XDSRadioList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.doc.mjs b/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.doc.mjs
index d0ab5ff987..67d3163261 100644
--- a/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.doc.mjs
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'RadioList — With Descriptions',
- description: 'Radio group with description text for each option.',
+ description:
+ 'Radio list with description text on both the group and each individual item.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['RadioList'],
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.tsx b/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.tsx
index 9eb0d2cb1d..d1402235e3 100644
--- a/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.tsx
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListWithDescriptions.tsx
@@ -4,19 +4,28 @@ import {useState} from 'react';
import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
export default function RadioListWithDescriptions() {
- const [plan, setPlan] = useState('free');
+ const [value, setValue] = useState('');
return (
- <XDSRadioList label="Plan" value={plan} onChange={setPlan}>
+ <XDSRadioList
+ label="Notification preference"
+ description="Choose how you would like to be notified"
+ value={value}
+ onChange={setValue}>
<XDSRadioListItem
- label="Free"
- value="free"
- description="Basic features, limited usage"
+ label="Email"
+ value="email"
+ description="Receive notifications via email"
/>
<XDSRadioListItem
- label="Pro"
- value="pro"
- description="All features, unlimited usage"
+ label="SMS"
+ value="sms"
+ description="Standard messaging rates apply"
+ />
+ <XDSRadioListItem
+ label="Push notification"
+ value="push"
+ description="Instant alerts on your device"
/>
</XDSRadioList>
);
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListWithStatus.doc.mjs b/packages/cli/templates/blocks/components/RadioList/RadioListWithStatus.doc.mjs
deleted file mode 100644
index 9053856dae..0000000000
--- a/packages/cli/templates/blocks/components/RadioList/RadioListWithStatus.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'RadioList — With Status',
- description: 'Required radio group with an error validation status message.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['RadioList'],
-};
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListWithStatus.tsx b/packages/cli/templates/blocks/components/RadioList/RadioListWithStatus.tsx
deleted file mode 100644
index 3412cba651..0000000000
--- a/packages/cli/templates/blocks/components/RadioList/RadioListWithStatus.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
-
-export default function RadioListWithStatus() {
- const [choice, setChoice] = useState('');
-
- return (
- <XDSRadioList
- label="Required choice"
- value={choice}
- onChange={setChoice}
- isRequired
- status={{type: 'error', message: 'Please select an option'}}>
- <XDSRadioListItem label="Option A" value="a" />
- <XDSRadioListItem label="Option B" value="b" />
- </XDSRadioList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListBasic.doc.mjs b/packages/cli/templates/blocks/components/RadioList/RadioListWithValidation.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/RadioList/RadioListBasic.doc.mjs
rename to packages/cli/templates/blocks/components/RadioList/RadioListWithValidation.doc.mjs
index 67070139e6..11296a45c3 100644
--- a/packages/cli/templates/blocks/components/RadioList/RadioListBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListWithValidation.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'RadioList — Basic',
- description: 'Simple radio group for single-value selection.',
+ name: 'RadioList — With Validation',
+ description:
+ 'Required radio list that shows an error message when no option is selected.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['RadioList'],
diff --git a/packages/cli/templates/blocks/components/RadioList/RadioListWithValidation.tsx b/packages/cli/templates/blocks/components/RadioList/RadioListWithValidation.tsx
new file mode 100644
index 0000000000..088b2fd335
--- /dev/null
+++ b/packages/cli/templates/blocks/components/RadioList/RadioListWithValidation.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
+
+export default function RadioListWithValidation() {
+ const [value, setValue] = useState('');
+
+ return (
+ <XDSRadioList
+ label="Notification preference"
+ isRequired
+ status={
+ value === ''
+ ? {type: 'error', message: 'Please select a notification method'}
+ : undefined
+ }
+ value={value}
+ onChange={setValue}>
+ <XDSRadioListItem label="Email" value="email" />
+ <XDSRadioListItem label="SMS" value="sms" />
+ <XDSRadioListItem label="Push notification" value="push" />
+ </XDSRadioList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Section/SectionFullBleed.tsx b/packages/cli/templates/blocks/components/Section/SectionFullBleed.tsx
deleted file mode 100644
index a8b3f7cc61..0000000000
--- a/packages/cli/templates/blocks/components/Section/SectionFullBleed.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSSection} from '@xds/core/Section';
-import {XDSLayout, XDSLayoutContent} from '@xds/core/Layout';
-
-export default function SectionFullBleed() {
- return (
- <XDSSection variant="wash" padding={0}>
- <XDSLayout
- content={
- <XDSLayoutContent>Edge-to-edge content</XDSLayoutContent>
- }
- />
- </XDSSection>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Section/SectionFullBleed.doc.mjs b/packages/cli/templates/blocks/components/Section/SectionPageLayout.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/Section/SectionFullBleed.doc.mjs
rename to packages/cli/templates/blocks/components/Section/SectionPageLayout.doc.mjs
index c2f3b847e2..9c24ca5f1b 100644
--- a/packages/cli/templates/blocks/components/Section/SectionFullBleed.doc.mjs
+++ b/packages/cli/templates/blocks/components/Section/SectionPageLayout.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Section — Full Bleed',
- description: 'Section with zero padding for edge-to-edge content.',
+ name: 'Section — Page Layout',
+ description:
+ 'Full page layout inside a section with header, sidebar panel, and main content area.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Section', 'Layout'],
diff --git a/packages/cli/templates/blocks/components/Section/SectionPageLayout.tsx b/packages/cli/templates/blocks/components/Section/SectionPageLayout.tsx
new file mode 100644
index 0000000000..7fe0e893b5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Section/SectionPageLayout.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {XDSSection} from '@xds/core/Section';
+import {XDSVStack} from '@xds/core/Layout';
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutPanel,
+} from '@xds/core/Layout';
+
+export default function SectionPageLayout() {
+ return (
+ <XDSSection variant="section" width={600} height={300}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <XDSVStack gap={2}>
+ <h2 style={{margin: 0}}>Page Header</h2>
+ <p style={{margin: 0, fontSize: 14, color: 'var(--color-text-secondary)'}}>
+ Welcome to the application
+ </p>
+ </XDSVStack>
+ </XDSLayoutHeader>
+ }
+ start={
+ <XDSLayoutPanel hasDivider width={150}>
+ <h3 style={{margin: 0}}>Sidebar</h3>
+ </XDSLayoutPanel>
+ }
+ content={
+ <XDSLayoutContent>
+ <XDSVStack gap={2}>
+ <h3 style={{margin: 0}}>Main Content</h3>
+ <p style={{margin: 0, fontSize: 14, color: 'var(--color-text-secondary)'}}>
+ This demonstrates how XDSLayout can be used to create page
+ layouts with header, sidebar, and content areas.
+ </p>
+ </XDSVStack>
+ </XDSLayoutContent>
+ }
+ />
+ </XDSSection>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Section/SectionSimpleContent.doc.mjs b/packages/cli/templates/blocks/components/Section/SectionSimpleContent.doc.mjs
new file mode 100644
index 0000000000..e53514bfe5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Section/SectionSimpleContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Section — Simple Content',
+ description:
+ 'Section with a wash variant containing a title and description using automatic container padding.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Section', 'VStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Section/SectionSimpleContent.tsx b/packages/cli/templates/blocks/components/Section/SectionSimpleContent.tsx
new file mode 100644
index 0000000000..2803e0baff
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Section/SectionSimpleContent.tsx
@@ -0,0 +1,18 @@
+'use client';
+
+import {XDSSection} from '@xds/core/Section';
+import {XDSVStack} from '@xds/core/Layout';
+
+export default function SectionSimpleContent() {
+ return (
+ <XDSSection variant="wash" width={320}>
+ <XDSVStack gap={2}>
+ <h3 style={{margin: 0}}>Section Title</h3>
+ <p style={{margin: 0, fontSize: 14, color: 'var(--color-text-secondary)'}}>
+ This section contains simple content without an inner layout. The
+ container padding is applied automatically.
+ </p>
+ </XDSVStack>
+ </XDSSection>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Section/SectionTransparentVariant.doc.mjs b/packages/cli/templates/blocks/components/Section/SectionTransparentVariant.doc.mjs
deleted file mode 100644
index 6ebb2fee6a..0000000000
--- a/packages/cli/templates/blocks/components/Section/SectionTransparentVariant.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Section — Transparent Variant',
- description: 'Section container with a transparent background.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Section', 'Layout'],
-};
diff --git a/packages/cli/templates/blocks/components/Section/SectionTransparentVariant.tsx b/packages/cli/templates/blocks/components/Section/SectionTransparentVariant.tsx
deleted file mode 100644
index 5d1ad2e970..0000000000
--- a/packages/cli/templates/blocks/components/Section/SectionTransparentVariant.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSSection} from '@xds/core/Section';
-import {XDSLayout, XDSLayoutContent} from '@xds/core/Layout';
-
-export default function SectionTransparentVariant() {
- return (
- <XDSSection variant="transparent">
- <XDSLayout
- content={
- <XDSLayoutContent>Transparent background</XDSLayoutContent>
- }
- />
- </XDSSection>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Section/SectionWashVariant.tsx b/packages/cli/templates/blocks/components/Section/SectionWashVariant.tsx
deleted file mode 100644
index 5ebc9e2e60..0000000000
--- a/packages/cli/templates/blocks/components/Section/SectionWashVariant.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSSection} from '@xds/core/Section';
-import {XDSLayout, XDSLayoutContent} from '@xds/core/Layout';
-
-export default function SectionWashVariant() {
- return (
- <XDSSection variant="wash" width={300} height={250}>
- <XDSLayout
- content={<XDSLayoutContent>Content in wash section</XDSLayoutContent>}
- />
- </XDSSection>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Section/SectionWithDividers.doc.mjs b/packages/cli/templates/blocks/components/Section/SectionWithDividers.doc.mjs
deleted file mode 100644
index 276504cc88..0000000000
--- a/packages/cli/templates/blocks/components/Section/SectionWithDividers.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Section — With Dividers',
- description: 'Section with top and bottom divider borders.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Section', 'Layout'],
-};
diff --git a/packages/cli/templates/blocks/components/Section/SectionWithDividers.tsx b/packages/cli/templates/blocks/components/Section/SectionWithDividers.tsx
deleted file mode 100644
index ded09d69c3..0000000000
--- a/packages/cli/templates/blocks/components/Section/SectionWithDividers.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {XDSSection} from '@xds/core/Section';
-import {XDSLayout, XDSLayoutContent} from '@xds/core/Layout';
-
-export default function SectionWithDividers() {
- return (
- <XDSSection variant="section" dividers={['top', 'bottom']}>
- <XDSLayout
- content={
- <XDSLayoutContent>
- Section with top and bottom borders
- </XDSLayoutContent>
- }
- />
- </XDSSection>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Section/SectionWithInnerLayout.doc.mjs b/packages/cli/templates/blocks/components/Section/SectionWithInnerLayout.doc.mjs
new file mode 100644
index 0000000000..38ab15fa0f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Section/SectionWithInnerLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Section — With Inner Layout',
+ description:
+ 'Section containing an XDSLayout with header, scrollable content, and footer with action button.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Section', 'Layout', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/Section/SectionWithInnerLayout.tsx b/packages/cli/templates/blocks/components/Section/SectionWithInnerLayout.tsx
new file mode 100644
index 0000000000..4db90ec6ca
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Section/SectionWithInnerLayout.tsx
@@ -0,0 +1,42 @@
+'use client';
+
+import {XDSSection} from '@xds/core/Section';
+import {XDSHStack} from '@xds/core/Layout';
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+
+export default function SectionWithInnerLayout() {
+ return (
+ <XDSSection variant="wash" width={350} height={250}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <h3 style={{margin: 0}}>Section with Layout</h3>
+ </XDSLayoutHeader>
+ }
+ content={
+ <XDSLayoutContent>
+ <p style={{margin: 0, fontSize: 14, color: 'var(--color-text-secondary)'}}>
+ When using XDSLayout, the layout manages its own padding
+ independently from the container padding.
+ </p>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter hasDivider>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton label="Action" variant="primary">
+ Action
+ </XDSButton>
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSSection>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlBasic.tsx b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlBasic.tsx
deleted file mode 100644
index 6da70d28a2..0000000000
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlBasic.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {
- XDSSegmentedControl,
- XDSSegmentedControlItem,
-} from '@xds/core/SegmentedControl';
-
-export default function SegmentedControlBasic() {
- const [view, setView] = useState('grid');
-
- return (
- <XDSSegmentedControl value={view} onChange={setView} label="View mode">
- <XDSSegmentedControlItem value="grid" label="Grid" />
- <XDSSegmentedControlItem value="list" label="List" />
- <XDSSegmentedControlItem value="table" label="Table" />
- </XDSSegmentedControl>
- );
-}
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabled.tsx b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabled.tsx
deleted file mode 100644
index 8489f17eff..0000000000
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabled.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {
- XDSSegmentedControl,
- XDSSegmentedControlItem,
-} from '@xds/core/SegmentedControl';
-
-export default function SegmentedControlDisabled() {
- const [view, setView] = useState('grid');
-
- return (
- <XDSSegmentedControl
- value={view}
- onChange={setView}
- label="View mode"
- isDisabled>
- <XDSSegmentedControlItem value="grid" label="Grid" />
- <XDSSegmentedControlItem value="list" label="List" />
- </XDSSegmentedControl>
- );
-}
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlBasic.doc.mjs b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabledItem.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlBasic.doc.mjs
rename to packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabledItem.doc.mjs
index ab021289ba..dce6e1aa9b 100644
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabledItem.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'SegmentedControl — Basic',
- description: 'Segmented control for switching between view modes.',
+ name: 'SegmentedControl — Disabled Item',
+ description:
+ 'Segmented control with an individually disabled option for unavailable choices.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['SegmentedControl'],
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabledItem.tsx b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabledItem.tsx
new file mode 100644
index 0000000000..845dfd942a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabledItem.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {useState} from 'react';
+import {
+ XDSSegmentedControl,
+ XDSSegmentedControlItem,
+} from '@xds/core/SegmentedControl';
+
+export default function SegmentedControlDisabledItem() {
+ const [value, setValue] = useState('hourly');
+ return (
+ <XDSSegmentedControl
+ value={value}
+ onChange={setValue}
+ label="Data granularity">
+ <XDSSegmentedControlItem value="hourly" label="Hourly" />
+ <XDSSegmentedControlItem value="daily" label="Daily" />
+ <XDSSegmentedControlItem value="weekly" label="Weekly" isDisabled />
+ </XDSSegmentedControl>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabled.doc.mjs b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnly.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabled.doc.mjs
rename to packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnly.doc.mjs
index 790d7b5934..fcc831e9a4 100644
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlDisabled.doc.mjs
+++ b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnly.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'SegmentedControl — Disabled',
- description: 'Disabled segmented control with all items non-interactive.',
+ name: 'SegmentedControl — Icon Only',
+ description:
+ 'Compact segmented control with hidden labels, showing only icons for space-constrained layouts.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['SegmentedControl'],
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnly.tsx b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnly.tsx
new file mode 100644
index 0000000000..8dc7402483
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnly.tsx
@@ -0,0 +1,51 @@
+'use client';
+
+import {useState} from 'react';
+import {
+ XDSSegmentedControl,
+ XDSSegmentedControlItem,
+} from '@xds/core/SegmentedControl';
+
+const GridIcon = () => (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round">
+ <rect x="3" y="3" width="7" height="7" rx="1" />
+ <rect x="14" y="3" width="7" height="7" rx="1" />
+ <rect x="3" y="14" width="7" height="7" rx="1" />
+ <rect x="14" y="14" width="7" height="7" rx="1" />
+ </svg>
+);
+
+const ListIcon = () => (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round">
+ <line x1="9" y1="6" x2="20" y2="6" />
+ <line x1="9" y1="12" x2="20" y2="12" />
+ <line x1="9" y1="18" x2="20" y2="18" />
+ <circle cx="5" cy="6" r="1" fill="currentColor" />
+ <circle cx="5" cy="12" r="1" fill="currentColor" />
+ <circle cx="5" cy="18" r="1" fill="currentColor" />
+ </svg>
+);
+
+export default function SegmentedControlIconOnly() {
+ const [value, setValue] = useState('grid');
+ return (
+ <XDSSegmentedControl
+ value={value}
+ onChange={setValue}
+ label="View mode"
+ size="sm">
+ <XDSSegmentedControlItem
+ value="grid"
+ label="Grid"
+ isLabelHidden
+ icon={<GridIcon />}
+ />
+ <XDSSegmentedControlItem
+ value="list"
+ label="List"
+ isLabelHidden
+ icon={<ListIcon />}
+ />
+ </XDSSegmentedControl>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnlyCompact.doc.mjs b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnlyCompact.doc.mjs
deleted file mode 100644
index a95ff8ba08..0000000000
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnlyCompact.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'SegmentedControl — Icon Only Compact',
- description: 'Compact icon-only segmented control for toolbar use.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['SegmentedControl', 'Icon'],
-};
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnlyCompact.tsx b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnlyCompact.tsx
deleted file mode 100644
index 931033d0ad..0000000000
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlIconOnlyCompact.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {
- XDSSegmentedControl,
- XDSSegmentedControlItem,
-} from '@xds/core/SegmentedControl';
-import {XDSIcon} from '@xds/core/Icon';
-
-function Squares2X2Icon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z" />
- </svg>
- );
-}
-
-function ListBulletIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M3 4h2v2H3V4zm4 0h14v2H7V4zM3 10h2v2H3v-2zm4 0h14v2H7v-2zM3 16h2v2H3v-2zm4 0h14v2H7v-2z" />
- </svg>
- );
-}
-
-export default function SegmentedControlIconOnlyCompact() {
- const [view, setView] = useState('grid');
-
- return (
- <XDSSegmentedControl
- value={view}
- onChange={setView}
- label="View mode"
- size="sm">
- <XDSSegmentedControlItem
- value="grid"
- label="Grid"
- isLabelHidden
- icon={<XDSIcon icon={Squares2X2Icon} color="inherit" />}
- />
- <XDSSegmentedControlItem
- value="list"
- label="List"
- isLabelHidden
- icon={<XDSIcon icon={ListBulletIcon} color="inherit" />}
- />
- </XDSSegmentedControl>
- );
-}
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.doc.mjs b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.doc.mjs
index 7fb20411a3..2d1e183c22 100644
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.doc.mjs
+++ b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.doc.mjs
@@ -2,8 +2,9 @@
export const doc = {
type: 'block',
name: 'SegmentedControl — With Icons',
- description: 'Segmented control with icon and label pairs for each segment.',
+ description:
+ 'Segmented control with icon and label pairs for a view mode switcher.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['SegmentedControl', 'Icon'],
+ componentsUsed: ['SegmentedControl'],
};
diff --git a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.tsx b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.tsx
index 16a8d92dc8..5124ad6cca 100644
--- a/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.tsx
+++ b/packages/cli/templates/blocks/components/SegmentedControl/SegmentedControlWithIcons.tsx
@@ -5,51 +5,46 @@ import {
XDSSegmentedControl,
XDSSegmentedControlItem,
} from '@xds/core/SegmentedControl';
-import {XDSIcon} from '@xds/core/Icon';
-function Squares2X2Icon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z" />
- </svg>
- );
-}
+const GridIcon = () => (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round">
+ <rect x="3" y="3" width="7" height="7" rx="1" />
+ <rect x="14" y="3" width="7" height="7" rx="1" />
+ <rect x="3" y="14" width="7" height="7" rx="1" />
+ <rect x="14" y="14" width="7" height="7" rx="1" />
+ </svg>
+);
-function ListBulletIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M3 4h2v2H3V4zm4 0h14v2H7V4zM3 10h2v2H3v-2zm4 0h14v2H7v-2zM3 16h2v2H3v-2zm4 0h14v2H7v-2z" />
- </svg>
- );
-}
+const ListIcon = () => (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round">
+ <line x1="9" y1="6" x2="20" y2="6" />
+ <line x1="9" y1="12" x2="20" y2="12" />
+ <line x1="9" y1="18" x2="20" y2="18" />
+ <circle cx="5" cy="6" r="1" fill="currentColor" />
+ <circle cx="5" cy="12" r="1" fill="currentColor" />
+ <circle cx="5" cy="18" r="1" fill="currentColor" />
+ </svg>
+);
-function TableCellsIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M3 3h18v18H3V3zm2 4v4h6V7H5zm8 0v4h6V7h-6zM5 13v4h6v-4H5zm8 0v4h6v-4h-6z" />
- </svg>
- );
-}
+const TableIcon = () => (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round">
+ <rect x="3" y="3" width="18" height="18" rx="2" />
+ <line x1="3" y1="9" x2="21" y2="9" />
+ <line x1="3" y1="15" x2="21" y2="15" />
+ <line x1="9" y1="3" x2="9" y2="21" />
+ </svg>
+);
export default function SegmentedControlWithIcons() {
- const [view, setView] = useState('grid');
-
+ const [value, setValue] = useState('grid');
return (
- <XDSSegmentedControl value={view} onChange={setView} label="View mode">
- <XDSSegmentedControlItem
- value="grid"
- label="Grid"
- icon={<XDSIcon icon={Squares2X2Icon} color="inherit" />}
- />
- <XDSSegmentedControlItem
- value="list"
- label="List"
- icon={<XDSIcon icon={ListBulletIcon} color="inherit" />}
- />
+ <XDSSegmentedControl value={value} onChange={setValue} label="View mode">
+ <XDSSegmentedControlItem value="grid" label="Grid" icon={<GridIcon />} />
+ <XDSSegmentedControlItem value="list" label="List" icon={<ListIcon />} />
<XDSSegmentedControlItem
value="table"
label="Table"
- icon={<XDSIcon icon={TableCellsIcon} color="inherit" />}
+ icon={<TableIcon />}
/>
</XDSSegmentedControl>
);
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorBasic.tsx b/packages/cli/templates/blocks/components/Selector/SelectorBasic.tsx
deleted file mode 100644
index 44e7369df5..0000000000
--- a/packages/cli/templates/blocks/components/Selector/SelectorBasic.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSelector} from '@xds/core/Selector';
-
-export default function SelectorBasic() {
- const [value, setValue] = useState('');
-
- return (
- <XDSSelector
- label="Fruit"
- options={['Apple', 'Banana', 'Orange']}
- value={value}
- onChange={(v) => setValue(v)}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorBasic.doc.mjs b/packages/cli/templates/blocks/components/Selector/SelectorClearable.doc.mjs
similarity index 59%
rename from packages/cli/templates/blocks/components/Selector/SelectorBasic.doc.mjs
rename to packages/cli/templates/blocks/components/Selector/SelectorClearable.doc.mjs
index 14553726bf..df2c00066d 100644
--- a/packages/cli/templates/blocks/components/Selector/SelectorBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/Selector/SelectorClearable.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Selector — Basic',
- description: 'Simple dropdown selector with string options.',
+ name: 'Selector — Clearable',
+ description:
+ 'Selector with a clear button to reset the selection back to empty.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Selector'],
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorClearable.tsx b/packages/cli/templates/blocks/components/Selector/SelectorClearable.tsx
new file mode 100644
index 0000000000..4e717135cf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Selector/SelectorClearable.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSelector} from '@xds/core/Selector';
+
+export default function SelectorClearable() {
+ const [value, setValue] = useState<string | null>('Banana');
+ return (
+ <div style={{width: 250}}>
+ <XDSSelector
+ label="Fruit"
+ options={['Apple', 'Banana', 'Cherry', 'Date']}
+ value={value}
+ onChange={setValue}
+ placeholder="Select a fruit..."
+ hasClear
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorCustomRendering.tsx b/packages/cli/templates/blocks/components/Selector/SelectorCustomRendering.tsx
deleted file mode 100644
index 511819e713..0000000000
--- a/packages/cli/templates/blocks/components/Selector/SelectorCustomRendering.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSelector, XDSSelectorItem} from '@xds/core/Selector';
-
-function UserIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
- </svg>
- );
-}
-
-const users = [
- {value: 'alice', label: 'Alice', email: '[email protected]'},
- {value: 'bob', label: 'Bob', email: '[email protected]'},
-];
-
-export default function SelectorCustomRendering() {
- const [value, setValue] = useState('');
-
- return (
- <XDSSelector
- label="User"
- options={users}
- value={value}
- onChange={(v) => setValue(v)}>
- {(option) => (
- <XDSSelectorItem
- icon={UserIcon}
- label={option.label}
- description={users.find(u => u.value === option.value)?.email}
- />
- )}
- </XDSSelector>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorSections.tsx b/packages/cli/templates/blocks/components/Selector/SelectorSections.tsx
deleted file mode 100644
index 1793470e6c..0000000000
--- a/packages/cli/templates/blocks/components/Selector/SelectorSections.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSelector} from '@xds/core/Selector';
-
-export default function SelectorSections() {
- const [value, setValue] = useState('');
-
- return (
- <XDSSelector
- label="Fruit"
- options={[
- {value: 'apple', label: 'Apple'},
- {
- type: 'section' as const,
- title: 'Citrus',
- options: [{value: 'orange', label: 'Orange'}],
- },
- ]}
- value={value}
- onChange={(v) => setValue(v)}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorWithObjectItems.doc.mjs b/packages/cli/templates/blocks/components/Selector/SelectorWithObjectItems.doc.mjs
deleted file mode 100644
index 4fd0e3c995..0000000000
--- a/packages/cli/templates/blocks/components/Selector/SelectorWithObjectItems.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Selector — With Object Items',
- description: 'Selector with object items including icons and disabled state.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Selector'],
-};
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorWithObjectItems.tsx b/packages/cli/templates/blocks/components/Selector/SelectorWithObjectItems.tsx
deleted file mode 100644
index 4a87d9e5af..0000000000
--- a/packages/cli/templates/blocks/components/Selector/SelectorWithObjectItems.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSelector} from '@xds/core/Selector';
-
-function UserIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
- </svg>
- );
-}
-
-function CogIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
- <path d="M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 00.12-.61l-1.92-3.32a.49.49 0 00-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 00-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96a.49.49 0 00-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58a.49.49 0 00-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6A3.6 3.6 0 1112 8.4a3.6 3.6 0 010 7.2z" />
- </svg>
- );
-}
-
-export default function SelectorWithObjectItems() {
- const [value, setValue] = useState('');
-
- return (
- <XDSSelector
- label="Settings"
- options={[
- {value: 'profile', label: 'Profile', icon: UserIcon},
- {value: 'settings', label: 'Settings', icon: CogIcon, disabled: true},
- ]}
- value={value}
- onChange={(v) => setValue(v)}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorCustomRendering.doc.mjs b/packages/cli/templates/blocks/components/Selector/SelectorWithSections.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/Selector/SelectorCustomRendering.doc.mjs
rename to packages/cli/templates/blocks/components/Selector/SelectorWithSections.doc.mjs
index c6a04f50bb..722015cc08 100644
--- a/packages/cli/templates/blocks/components/Selector/SelectorCustomRendering.doc.mjs
+++ b/packages/cli/templates/blocks/components/Selector/SelectorWithSections.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Selector — Custom Rendering',
- description: 'Selector with custom item rendering using XDSSelectorItem.',
+ name: 'Selector — Grouped Sections',
+ description:
+ 'Selector with options organized into labeled sections for categorized choices.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Selector'],
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorWithSections.tsx b/packages/cli/templates/blocks/components/Selector/SelectorWithSections.tsx
new file mode 100644
index 0000000000..c1b2d32c70
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Selector/SelectorWithSections.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSelector} from '@xds/core/Selector';
+
+export default function SelectorWithSections() {
+ const [value, setValue] = useState<string | undefined>();
+ return (
+ <div style={{width: 250}}>
+ <XDSSelector
+ label="Fruit"
+ options={[
+ {value: 'apple', label: 'Apple'},
+ {value: 'banana', label: 'Banana'},
+ {
+ type: 'section',
+ title: 'Citrus',
+ options: [
+ {value: 'orange', label: 'Orange'},
+ {value: 'lemon', label: 'Lemon'},
+ {value: 'lime', label: 'Lime'},
+ ],
+ },
+ {
+ type: 'section',
+ title: 'Tropical',
+ options: [
+ {value: 'mango', label: 'Mango'},
+ {value: 'pineapple', label: 'Pineapple'},
+ ],
+ },
+ ]}
+ value={value}
+ onChange={setValue}
+ placeholder="Select a fruit..."
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorSections.doc.mjs b/packages/cli/templates/blocks/components/Selector/SelectorWithStatus.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/Selector/SelectorSections.doc.mjs
rename to packages/cli/templates/blocks/components/Selector/SelectorWithStatus.doc.mjs
index 88f4a825bc..8fa8907e58 100644
--- a/packages/cli/templates/blocks/components/Selector/SelectorSections.doc.mjs
+++ b/packages/cli/templates/blocks/components/Selector/SelectorWithStatus.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Selector — Sections',
- description: 'Selector dropdown with labeled option sections.',
+ name: 'Selector — Validation States',
+ description:
+ 'Selector fields showing error, warning, and success validation states with messages.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Selector'],
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorWithStatus.tsx b/packages/cli/templates/blocks/components/Selector/SelectorWithStatus.tsx
new file mode 100644
index 0000000000..f109c88c5c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Selector/SelectorWithStatus.tsx
@@ -0,0 +1,46 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSelector} from '@xds/core/Selector';
+
+export default function SelectorWithStatus() {
+ const [value1, setValue1] = useState<string | undefined>();
+ const [value2, setValue2] = useState<string | undefined>('banana');
+ const [value3, setValue3] = useState<string | undefined>('apple');
+ return (
+ <div
+ style={{display: 'flex', flexDirection: 'column', gap: 16, width: 250}}>
+ <XDSSelector
+ label="Error status"
+ options={[
+ {value: 'apple', label: 'Apple'},
+ {value: 'banana', label: 'Banana'},
+ ]}
+ value={value1}
+ onChange={setValue1}
+ placeholder="Select a fruit..."
+ status={{type: 'error', message: 'Please select a fruit'}}
+ />
+ <XDSSelector
+ label="Warning status"
+ options={[
+ {value: 'apple', label: 'Apple'},
+ {value: 'banana', label: 'Banana'},
+ ]}
+ value={value2}
+ onChange={setValue2}
+ status={{type: 'warning', message: 'Banana is out of season'}}
+ />
+ <XDSSelector
+ label="Success status"
+ options={[
+ {value: 'apple', label: 'Apple'},
+ {value: 'banana', label: 'Banana'},
+ ]}
+ value={value3}
+ onChange={setValue3}
+ status={{type: 'success'}}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorWithStatusAndFieldProps.doc.mjs b/packages/cli/templates/blocks/components/Selector/SelectorWithStatusAndFieldProps.doc.mjs
deleted file mode 100644
index e1930eee9d..0000000000
--- a/packages/cli/templates/blocks/components/Selector/SelectorWithStatusAndFieldProps.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Selector — With Status And Field Props',
- description: 'Required selector with error validation status.',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Selector'],
-};
diff --git a/packages/cli/templates/blocks/components/Selector/SelectorWithStatusAndFieldProps.tsx b/packages/cli/templates/blocks/components/Selector/SelectorWithStatusAndFieldProps.tsx
deleted file mode 100644
index 0c3f71e6df..0000000000
--- a/packages/cli/templates/blocks/components/Selector/SelectorWithStatusAndFieldProps.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSelector} from '@xds/core/Selector';
-
-export default function SelectorWithStatusAndFieldProps() {
- const [value, setValue] = useState('');
-
- return (
- <XDSSelector
- label="Fruit"
- isRequired
- status={{type: 'error', message: 'Required'}}
- options={['Apple', 'Banana']}
- value={value}
- onChange={(v) => setValue(v)}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavCollapsibleSidebar.doc.mjs b/packages/cli/templates/blocks/components/SideNav/SideNavCollapsibleSidebar.doc.mjs
deleted file mode 100644
index 389d023e12..0000000000
--- a/packages/cli/templates/blocks/components/SideNav/SideNavCollapsibleSidebar.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'SideNav — Collapsible sidebar',
- description: 'Collapsible sidebar',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['AppShell', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavCollapsibleSidebar.tsx b/packages/cli/templates/blocks/components/SideNav/SideNavCollapsibleSidebar.tsx
deleted file mode 100644
index a758ead659..0000000000
--- a/packages/cli/templates/blocks/components/SideNav/SideNavCollapsibleSidebar.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSSideNav, XDSSideNavCollapseButton, XDSSideNavHeading, XDSSideNavItem, XDSSideNavSection} from '@xds/core/SideNav';
-
-function HomeIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function FolderIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function Content() {
- return <div style={{padding: 8}}>Content</div>;
-}
-
-export default function SideNavCollapsibleSidebar() {
- return (
- <XDSAppShell
- sideNav={
- <XDSSideNav
- collapsible
- header={<XDSSideNavHeading heading="My App" headingHref="/" />}
- footerIcons={<XDSSideNavCollapseButton />}>
- <XDSSideNavSection title="Main" isHeaderHidden>
- <XDSSideNavItem label="Dashboard" icon={HomeIcon} isSelected href="/dashboard" />
- <XDSSideNavItem label="Projects" icon={FolderIcon} href="/projects" />
- </XDSSideNavSection>
- </XDSSideNav>
- }>
- <Content />
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavEndContent.doc.mjs b/packages/cli/templates/blocks/components/SideNav/SideNavEndContent.doc.mjs
new file mode 100644
index 0000000000..03b22b031e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SideNav/SideNavEndContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'SideNav — End Content',
+ description:
+ 'Side navigation items with badges, counts, and context menus as trailing content.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['SideNav', 'Badge', 'Text', 'MoreMenu'],
+};
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavEndContent.tsx b/packages/cli/templates/blocks/components/SideNav/SideNavEndContent.tsx
new file mode 100644
index 0000000000..946f08c143
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SideNav/SideNavEndContent.tsx
@@ -0,0 +1,93 @@
+'use client';
+
+import type {ComponentProps} from 'react';
+import {
+ XDSSideNav,
+ XDSSideNavHeading,
+ XDSSideNavItem,
+ XDSSideNavSection,
+} from '@xds/core/SideNav';
+import {XDSBadge} from '@xds/core/Badge';
+import {XDSText} from '@xds/core/Text';
+import {XDSMoreMenu} from '@xds/core/MoreMenu';
+
+function HomeIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
+ </svg>
+ );
+}
+
+function FolderIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z" />
+ </svg>
+ );
+}
+
+function ChartBarIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function UserGroupIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
+ </svg>
+ );
+}
+
+export default function SideNavEndContent() {
+ return (
+ <div style={{height: 400}}>
+ <XDSSideNav
+ header={<XDSSideNavHeading heading="My App" headingHref="/" />}>
+ <XDSSideNavSection title="Navigation" isHeaderHidden>
+ <XDSSideNavItem
+ label="Dashboard"
+ icon={HomeIcon}
+ isSelected
+ href="/dashboard"
+ endContent={
+ <XDSMoreMenu
+ size="sm"
+ items={[
+ {label: 'Pin to top', onClick: () => {}},
+ {label: 'Rename', onClick: () => {}},
+ ]}
+ />
+ }
+ />
+ <XDSSideNavItem
+ label="Projects"
+ icon={FolderIcon}
+ href="/projects"
+ endContent={<XDSBadge label={12} />}
+ />
+ <XDSSideNavItem
+ label="Analytics"
+ icon={ChartBarIcon}
+ href="/analytics"
+ endContent={<XDSBadge label="New" />}
+ />
+ <XDSSideNavItem
+ label="Team"
+ icon={UserGroupIcon}
+ href="/team"
+ endContent={
+ <XDSText type="supporting" color="secondary">
+ 8 members
+ </XDSText>
+ }
+ />
+ </XDSSideNavSection>
+ </XDSSideNav>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavNestedItems.doc.mjs b/packages/cli/templates/blocks/components/SideNav/SideNavNestedItems.doc.mjs
new file mode 100644
index 0000000000..872510375c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SideNav/SideNavNestedItems.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'SideNav — Nested Items',
+ description:
+ 'Side navigation with collapsible nested items for settings or hierarchical menus.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['SideNav'],
+};
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavNestedItems.tsx b/packages/cli/templates/blocks/components/SideNav/SideNavNestedItems.tsx
new file mode 100644
index 0000000000..28e5cc05a8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SideNav/SideNavNestedItems.tsx
@@ -0,0 +1,46 @@
+'use client';
+
+import type {ComponentProps} from 'react';
+import {
+ XDSSideNav,
+ XDSSideNavHeading,
+ XDSSideNavItem,
+ XDSSideNavSection,
+} from '@xds/core/SideNav';
+
+function HomeIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
+ </svg>
+ );
+}
+
+function CogIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+export default function SideNavNestedItems() {
+ return (
+ <div style={{height: 400}}>
+ <XDSSideNav header={<XDSSideNavHeading heading="My App" />}>
+ <XDSSideNavSection title="Main">
+ <XDSSideNavItem label="Dashboard" icon={HomeIcon} isSelected />
+ <XDSSideNavItem label="Settings" icon={CogIcon}>
+ <XDSSideNavItem label="General" href="/settings/general" />
+ <XDSSideNavItem label="Security" href="/settings/security" />
+ <XDSSideNavItem
+ label="Notifications"
+ href="/settings/notifications"
+ />
+ </XDSSideNavItem>
+ </XDSSideNavSection>
+ </XDSSideNav>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavStandaloneNoTopNav.doc.mjs b/packages/cli/templates/blocks/components/SideNav/SideNavStandaloneNoTopNav.doc.mjs
deleted file mode 100644
index e065241d43..0000000000
--- a/packages/cli/templates/blocks/components/SideNav/SideNavStandaloneNoTopNav.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'SideNav — Standalone (no TopNav)',
- description: 'Standalone (no TopNav)',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['AppShell', 'Badge', 'SideNav'],
-};
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavStandaloneNoTopNav.tsx b/packages/cli/templates/blocks/components/SideNav/SideNavStandaloneNoTopNav.tsx
deleted file mode 100644
index 3ca074b66a..0000000000
--- a/packages/cli/templates/blocks/components/SideNav/SideNavStandaloneNoTopNav.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSBadge} from '@xds/core/Badge';
-import {XDSSideNav, XDSSideNavHeading, XDSSideNavItem, XDSSideNavSection} from '@xds/core/SideNav';
-
-export default function SideNavStandaloneNoTopNav() {
- return (
- <XDSAppShell
- sideNav={
- <XDSSideNav
- header={
- <XDSSideNavHeading heading="My App" headingHref="/" />
- }
- >
- <XDSSideNavSection title="Main">
- <XDSSideNavItem
- label="Dashboard"
- isSelected
- href="/dashboard"
- />
- <XDSSideNavItem
- label="Projects"
- href="/projects"
- endContent={<XDSBadge label={3} />}
- />
- </XDSSideNavSection>
-
- <XDSSideNavSection title="Settings">
- <XDSSideNavItem label="General" href="/settings/general" />
- <XDSSideNavItem label="Security" href="/settings/security" />
- </XDSSideNavSection>
- </XDSSideNav>
- }
- >
- <div style={{padding: 24}}>
- <h2>Page Content</h2>
- <p>Standalone side navigation without a top navigation bar.</p>
- </div>
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs b/packages/cli/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs
new file mode 100644
index 0000000000..6eb842b24b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'SideNav — Header with Menu',
+ description:
+ 'Side navigation with an account switcher dropdown in the header for multi-account apps.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['SideNav', 'List', 'NavIcon'],
+};
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx b/packages/cli/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx
new file mode 100644
index 0000000000..fbad615a72
--- /dev/null
+++ b/packages/cli/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx
@@ -0,0 +1,73 @@
+'use client';
+
+import type {ComponentProps} from 'react';
+import {
+ XDSSideNav,
+ XDSSideNavHeading,
+ XDSSideNavItem,
+ XDSSideNavSection,
+} from '@xds/core/SideNav';
+import {XDSListItem} from '@xds/core/List';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+
+function HomeIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
+ </svg>
+ );
+}
+
+function CogIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+export default function SideNavWithHeaderMenu() {
+ return (
+ <div style={{height: 400}}>
+ <XDSSideNav
+ header={
+ <XDSSideNavHeading
+ icon={
+ <XDSNavIcon
+ icon={
+ <svg
+ style={{width: 16, height: 16}}
+ fill="none"
+ viewBox="0 0 24 24"
+ strokeWidth={1.5}
+ stroke="currentColor">
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"
+ />
+ </svg>
+ }
+ />
+ }
+ heading="Product Name"
+ subheading="Business Account"
+ menu={
+ <>
+ <XDSListItem label="Personal Account" href="#" />
+ <XDSListItem label="Acme Corp" href="#" />
+ <XDSListItem label="Add account" href="#" />
+ <XDSListItem label="Sign out" href="#" />
+ </>
+ }
+ />
+ }>
+ <XDSSideNavSection title="Navigation">
+ <XDSSideNavItem label="Dashboard" icon={HomeIcon} isSelected />
+ <XDSSideNavItem label="Settings" icon={CogIcon} />
+ </XDSSideNavSection>
+ </XDSSideNav>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavWithXDSAppShellTopNavNoHeader.doc.mjs b/packages/cli/templates/blocks/components/SideNav/SideNavWithXDSAppShellTopNavNoHeader.doc.mjs
deleted file mode 100644
index 47e35cd93a..0000000000
--- a/packages/cli/templates/blocks/components/SideNav/SideNavWithXDSAppShellTopNavNoHeader.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'SideNav — With XDSAppShell + TopNav (no header)',
- description: 'With XDSAppShell + TopNav (no header)',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['AppShell', 'SideNav', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/SideNav/SideNavWithXDSAppShellTopNavNoHeader.tsx b/packages/cli/templates/blocks/components/SideNav/SideNavWithXDSAppShellTopNavNoHeader.tsx
deleted file mode 100644
index 800a3c7d6a..0000000000
--- a/packages/cli/templates/blocks/components/SideNav/SideNavWithXDSAppShellTopNavNoHeader.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-'use client';
-
-import {XDSAppShell} from '@xds/core/AppShell';
-import {XDSSideNav, XDSSideNavItem, XDSSideNavSection} from '@xds/core/SideNav';
-import {XDSTopNav, XDSTopNavHeading} from '@xds/core/TopNav';
-
-function HomeIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function FolderIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function Content() {
- return <div style={{padding: 8}}>Content</div>;
-}
-
-export default function SideNavWithXDSAppShellTopNavNoHeader() {
- return (
- <XDSAppShell
- topNav={<XDSTopNav heading={<XDSTopNavHeading heading="My App" />} />}
- sideNav={
- <XDSSideNav>
- <XDSSideNavSection title="Main" isHeaderHidden>
- <XDSSideNavItem
- label="Dashboard"
- icon={HomeIcon}
- isSelected
- href="/dashboard"
- />
- <XDSSideNavItem label="Projects" icon={FolderIcon} href="/projects" />
- </XDSSideNavSection>
- </XDSSideNav>
- }>
- <Content />
- </XDSAppShell>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonBasicTextPlaceholder.doc.mjs b/packages/cli/templates/blocks/components/Skeleton/SkeletonBasicTextPlaceholder.doc.mjs
deleted file mode 100644
index de3cb6dbde..0000000000
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonBasicTextPlaceholder.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Skeleton — Basic text placeholder',
- description: 'Basic text placeholder',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Skeleton'],
-};
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonBasicTextPlaceholder.tsx b/packages/cli/templates/blocks/components/Skeleton/SkeletonBasicTextPlaceholder.tsx
deleted file mode 100644
index 56ace30357..0000000000
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonBasicTextPlaceholder.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSSkeleton} from '@xds/core/Skeleton';
-
-export default function SkeletonBasicTextPlaceholder() {
- return (
- <XDSSkeleton width={200} height={16} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonCardSkeleton.doc.mjs b/packages/cli/templates/blocks/components/Skeleton/SkeletonCardSkeleton.doc.mjs
new file mode 100644
index 0000000000..96c3a87a71
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Skeleton/SkeletonCardSkeleton.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Skeleton — Card Loading',
+ description:
+ 'Card skeleton with avatar, name, and content lines for loading states.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Skeleton', 'Card', 'HStack', 'VStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonCardSkeleton.tsx b/packages/cli/templates/blocks/components/Skeleton/SkeletonCardSkeleton.tsx
new file mode 100644
index 0000000000..cd5c193faf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Skeleton/SkeletonCardSkeleton.tsx
@@ -0,0 +1,24 @@
+'use client';
+
+import {XDSSkeleton} from '@xds/core/Skeleton';
+import {XDSCard} from '@xds/core/Card';
+import {XDSHStack, XDSVStack} from '@xds/core/Layout';
+
+export default function SkeletonCardSkeleton() {
+ return (
+ <XDSCard width={320}>
+ <XDSVStack gap={3}>
+ <XDSHStack gap={3} vAlign="center">
+ <XDSSkeleton width={40} height={40} radius="rounded" index={0} />
+ <XDSVStack gap={1}>
+ <XDSSkeleton width={120} height={14} index={1} />
+ <XDSSkeleton width={80} height={12} index={2} />
+ </XDSVStack>
+ </XDSHStack>
+ <XDSSkeleton width="100%" height={14} index={3} />
+ <XDSSkeleton width="90%" height={14} index={4} />
+ <XDSSkeleton width="75%" height={14} index={5} />
+ </XDSVStack>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonCircularAvatarPlaceholder.doc.mjs b/packages/cli/templates/blocks/components/Skeleton/SkeletonCircularAvatarPlaceholder.doc.mjs
deleted file mode 100644
index 1e7c0bc994..0000000000
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonCircularAvatarPlaceholder.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Skeleton — Circular avatar placeholder',
- description: 'Circular avatar placeholder',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Skeleton'],
-};
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonCircularAvatarPlaceholder.tsx b/packages/cli/templates/blocks/components/Skeleton/SkeletonCircularAvatarPlaceholder.tsx
deleted file mode 100644
index 57196dad09..0000000000
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonCircularAvatarPlaceholder.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSSkeleton} from '@xds/core/Skeleton';
-
-export default function SkeletonCircularAvatarPlaceholder() {
- return (
- <XDSSkeleton width={40} height={40} radius="rounded" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonFullwidthWithPercentage.doc.mjs b/packages/cli/templates/blocks/components/Skeleton/SkeletonFullwidthWithPercentage.doc.mjs
deleted file mode 100644
index 3624d4fc1c..0000000000
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonFullwidthWithPercentage.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Skeleton — Full-width with percentage',
- description: 'Full-width with percentage',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Skeleton'],
-};
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonFullwidthWithPercentage.tsx b/packages/cli/templates/blocks/components/Skeleton/SkeletonFullwidthWithPercentage.tsx
deleted file mode 100644
index aa0f1d30e0..0000000000
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonFullwidthWithPercentage.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSSkeleton} from '@xds/core/Skeleton';
-
-export default function SkeletonFullwidthWithPercentage() {
- return (
- <XDSSkeleton width="100%" height={20} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredAnimationForMultipleSkeletons.doc.mjs b/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredAnimationForMultipleSkeletons.doc.mjs
deleted file mode 100644
index 6b9c80dceb..0000000000
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredAnimationForMultipleSkeletons.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Skeleton — Staggered animation for multiple skeletons',
- description: 'Staggered animation for multiple skeletons',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Skeleton'],
-};
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredList.doc.mjs b/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredList.doc.mjs
new file mode 100644
index 0000000000..364e44df43
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredList.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Skeleton — Staggered List',
+ description:
+ 'Staggered skeleton lines with varying widths and sequential animation timing.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Skeleton', 'VStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredAnimationForMultipleSkeletons.tsx b/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredList.tsx
similarity index 50%
rename from packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredAnimationForMultipleSkeletons.tsx
rename to packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredList.tsx
index ec1f4b0ea6..d1a23d054d 100644
--- a/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredAnimationForMultipleSkeletons.tsx
+++ b/packages/cli/templates/blocks/components/Skeleton/SkeletonStaggeredList.tsx
@@ -1,13 +1,16 @@
'use client';
import {XDSSkeleton} from '@xds/core/Skeleton';
+import {XDSVStack} from '@xds/core/Layout';
-export default function SkeletonStaggeredAnimationForMultipleSkeletons() {
+export default function SkeletonStaggeredList() {
return (
- <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
+ <XDSVStack gap={2}>
<XDSSkeleton width={300} height={16} index={0} />
<XDSSkeleton width={280} height={16} index={1} />
<XDSSkeleton width={320} height={16} index={2} />
- </div>
+ <XDSSkeleton width={260} height={16} index={3} />
+ <XDSSkeleton width={290} height={16} index={4} />
+ </XDSVStack>
);
}
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonTableRowSkeleton.doc.mjs b/packages/cli/templates/blocks/components/Skeleton/SkeletonTableRowSkeleton.doc.mjs
new file mode 100644
index 0000000000..e4906bd304
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Skeleton/SkeletonTableRowSkeleton.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Skeleton — Table Rows',
+ description:
+ 'Multi-row table skeleton with staggered column widths for data table loading states.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Skeleton', 'HStack', 'VStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Skeleton/SkeletonTableRowSkeleton.tsx b/packages/cli/templates/blocks/components/Skeleton/SkeletonTableRowSkeleton.tsx
new file mode 100644
index 0000000000..5cedaaf356
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Skeleton/SkeletonTableRowSkeleton.tsx
@@ -0,0 +1,19 @@
+'use client';
+
+import {XDSSkeleton} from '@xds/core/Skeleton';
+import {XDSHStack, XDSVStack} from '@xds/core/Layout';
+
+export default function SkeletonTableRowSkeleton() {
+ return (
+ <XDSVStack gap={2}>
+ {[0, 1, 2, 3].map(rowIndex => (
+ <XDSHStack key={rowIndex} gap={4} vAlign="center">
+ <XDSSkeleton width={50} height={16} index={rowIndex * 4} />
+ <XDSSkeleton width={180} height={16} index={rowIndex * 4 + 1} />
+ <XDSSkeleton width={100} height={16} index={rowIndex * 4 + 2} />
+ <XDSSkeleton width={80} height={16} index={rowIndex * 4 + 3} />
+ </XDSHStack>
+ ))}
+ </XDSVStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderBasicSingleValue.tsx b/packages/cli/templates/blocks/components/Slider/SliderBasicSingleValue.tsx
deleted file mode 100644
index b8a9fe760b..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderBasicSingleValue.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSlider} from '@xds/core/Slider';
-
-export default function SliderBasicSingleValue() {
- const [value, setValue] = useState(50);
-
- return (
- <XDSSlider label="Volume" value={50} onChange={setValue} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderDisabled.tsx b/packages/cli/templates/blocks/components/Slider/SliderDisabled.tsx
deleted file mode 100644
index ad5e5124fd..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderDisabled.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSSlider} from '@xds/core/Slider';
-
-export default function SliderDisabled() {
- return (
- <XDSSlider
- label="Locked"
- value={50}
- onChange={() => {}}
- isDisabled
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderRangeWithMinimumGap.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderFormattedValue.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/Slider/SliderRangeWithMinimumGap.doc.mjs
rename to packages/cli/templates/blocks/components/Slider/SliderFormattedValue.doc.mjs
index e9a6efd508..89c327f034 100644
--- a/packages/cli/templates/blocks/components/Slider/SliderRangeWithMinimumGap.doc.mjs
+++ b/packages/cli/templates/blocks/components/Slider/SliderFormattedValue.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Slider — Range with minimum gap',
- description: 'Range with minimum gap',
+ name: 'Slider — Formatted Value',
+ description:
+ 'Slider with a custom value formatter displaying the current value as text with units.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Slider'],
diff --git a/packages/cli/templates/blocks/components/Slider/SliderFormattedValue.tsx b/packages/cli/templates/blocks/components/Slider/SliderFormattedValue.tsx
new file mode 100644
index 0000000000..0a8094bf32
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Slider/SliderFormattedValue.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSlider} from '@xds/core/Slider';
+
+export default function SliderFormattedValue() {
+ const [value, setValue] = useState(72);
+ return (
+ <XDSSlider
+ label="Temperature"
+ value={value}
+ onChange={setValue}
+ valueDisplay="text"
+ min={60}
+ max={90}
+ step={1}
+ formatValue={(v: number) => `${v}\u00B0F`}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.doc.mjs
index 372a742c65..4af71cd57d 100644
--- a/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.doc.mjs
+++ b/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Slider — Range slider',
- description: 'Range slider',
+ name: 'Slider — Range',
+ description:
+ 'Dual-thumb range slider for selecting a value range like price or date bounds.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Slider'],
diff --git a/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.tsx b/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.tsx
index 99e94118fe..b83ee76cd8 100644
--- a/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.tsx
+++ b/packages/cli/templates/blocks/components/Slider/SliderRangeSlider.tsx
@@ -4,13 +4,6 @@ import {useState} from 'react';
import {XDSSlider} from '@xds/core/Slider';
export default function SliderRangeSlider() {
- const [range, setRange] = useState<[number, number]>([20, 80]);
-
- return (
- <XDSSlider
- label="Price range"
- value={[20, 80]}
- onChange={setRange}
- />
- );
+ const [value, setValue] = useState<[number, number]>([20, 80]);
+ return <XDSSlider label="Price range" value={value} onChange={setValue} />;
}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderRangeWithMinimumGap.tsx b/packages/cli/templates/blocks/components/Slider/SliderRangeWithMinimumGap.tsx
deleted file mode 100644
index 9aa201e83f..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderRangeWithMinimumGap.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSlider} from '@xds/core/Slider';
-
-export default function SliderRangeWithMinimumGap() {
- const [dateRange, setDateRange] = useState<[number, number]>([10, 90]);
-
- return (
- <XDSSlider
- label="Date range"
- value={[10, 90]}
- onChange={setDateRange}
- minStepsBetweenThumbs={5}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderTextValueDisplay.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderTextValueDisplay.doc.mjs
deleted file mode 100644
index 739989430e..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderTextValueDisplay.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Slider — Text value display',
- description: 'Text value display',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Slider'],
-};
diff --git a/packages/cli/templates/blocks/components/Slider/SliderTextValueDisplay.tsx b/packages/cli/templates/blocks/components/Slider/SliderTextValueDisplay.tsx
deleted file mode 100644
index 88b9948d27..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderTextValueDisplay.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSlider} from '@xds/core/Slider';
-
-export default function SliderTextValueDisplay() {
- const [opacity, setOpacity] = useState(50);
-
- return (
- <XDSSlider
- label="Opacity"
- value={75}
- onChange={setOpacity}
- formatValue={(v) => `${v}%`}
- valueDisplay="text"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderVerticalOrientation.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderVerticalOrientation.doc.mjs
deleted file mode 100644
index 0854a39b07..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderVerticalOrientation.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Slider — Vertical orientation',
- description: 'Vertical orientation',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Slider'],
-};
diff --git a/packages/cli/templates/blocks/components/Slider/SliderVerticalOrientation.tsx b/packages/cli/templates/blocks/components/Slider/SliderVerticalOrientation.tsx
deleted file mode 100644
index cb8b920509..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderVerticalOrientation.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSlider} from '@xds/core/Slider';
-
-export default function SliderVerticalOrientation() {
- const [level, setLevel] = useState(50);
-
- return (
- <XDSSlider
- label="Level"
- value={60}
- onChange={setLevel}
- orientation="vertical"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithCustomFormatting.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderWithCustomFormatting.doc.mjs
deleted file mode 100644
index 760db43b7b..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderWithCustomFormatting.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Slider — With custom formatting',
- description: 'With custom formatting',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Slider'],
-};
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithCustomFormatting.tsx b/packages/cli/templates/blocks/components/Slider/SliderWithCustomFormatting.tsx
deleted file mode 100644
index 00c63e3d49..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderWithCustomFormatting.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSlider} from '@xds/core/Slider';
-
-export default function SliderWithCustomFormatting() {
- const [temp, setTemp] = useState(72);
-
- return (
- <XDSSlider
- label="Temperature"
- value={72}
- onChange={setTemp}
- min={32}
- max={212}
- formatValue={(v) => `${v}°F`}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderBasicSingleValue.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderWithMarks.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/Slider/SliderBasicSingleValue.doc.mjs
rename to packages/cli/templates/blocks/components/Slider/SliderWithMarks.doc.mjs
index 2f9f0b73b8..9f1f2d881c 100644
--- a/packages/cli/templates/blocks/components/Slider/SliderBasicSingleValue.doc.mjs
+++ b/packages/cli/templates/blocks/components/Slider/SliderWithMarks.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Slider — Basic single value',
- description: 'Basic single value',
+ name: 'Slider — With Marks',
+ description:
+ 'Slider with labeled tick marks at fixed intervals for guided value selection.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Slider'],
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithMarks.tsx b/packages/cli/templates/blocks/components/Slider/SliderWithMarks.tsx
new file mode 100644
index 0000000000..8977f06395
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Slider/SliderWithMarks.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSlider} from '@xds/core/Slider';
+
+export default function SliderWithMarks() {
+ const [value, setValue] = useState(50);
+ return (
+ <XDSSlider
+ label="Volume"
+ value={value}
+ onChange={setValue}
+ marks={[
+ {value: 0, label: '0'},
+ {value: 25, label: '25'},
+ {value: 50, label: '50'},
+ {value: 75, label: '75'},
+ {value: 100, label: '100'},
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithOnChangeEndForCommittingValue.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderWithOnChangeEndForCommittingValue.doc.mjs
deleted file mode 100644
index d736238044..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderWithOnChangeEndForCommittingValue.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Slider — With onChangeEnd for committing value',
- description: 'With onChangeEnd for committing value',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Slider'],
-};
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithOnChangeEndForCommittingValue.tsx b/packages/cli/templates/blocks/components/Slider/SliderWithOnChangeEndForCommittingValue.tsx
deleted file mode 100644
index cc32803d07..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderWithOnChangeEndForCommittingValue.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSlider} from '@xds/core/Slider';
-
-const commitBrightness = (_v: number) => {};
-
-export default function SliderWithOnChangeEndForCommittingValue() {
- const [brightness, setBrightness] = useState(50);
-
- return (
- <XDSSlider
- label="Brightness"
- value={brightness}
- onChange={setBrightness}
- onChangeEnd={commitBrightness}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderDisabled.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderWithStatus.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/Slider/SliderDisabled.doc.mjs
rename to packages/cli/templates/blocks/components/Slider/SliderWithStatus.doc.mjs
index 8c680783f3..d2facb6e2a 100644
--- a/packages/cli/templates/blocks/components/Slider/SliderDisabled.doc.mjs
+++ b/packages/cli/templates/blocks/components/Slider/SliderWithStatus.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Slider — Disabled',
- description: 'Disabled',
+ name: 'Slider — Validation States',
+ description:
+ 'Sliders with error, warning, and success status messages for system monitoring.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Slider'],
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithStatus.tsx b/packages/cli/templates/blocks/components/Slider/SliderWithStatus.tsx
new file mode 100644
index 0000000000..0de938596a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Slider/SliderWithStatus.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSlider} from '@xds/core/Slider';
+
+export default function SliderWithStatus() {
+ const [value1, setValue1] = useState(95);
+ const [value2, setValue2] = useState(50);
+ const [value3, setValue3] = useState(75);
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 24,
+ maxWidth: 400,
+ }}>
+ <XDSSlider
+ label="CPU Usage"
+ value={value1}
+ onChange={setValue1}
+ status={{type: 'error', message: 'CPU usage is critically high'}}
+ />
+ <XDSSlider
+ label="Memory"
+ value={value2}
+ onChange={setValue2}
+ status={{type: 'warning', message: 'Memory usage is moderate'}}
+ />
+ <XDSSlider
+ label="Disk"
+ value={value3}
+ onChange={setValue3}
+ status={{type: 'success', message: 'Disk usage is healthy'}}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithStepAndMarks.doc.mjs b/packages/cli/templates/blocks/components/Slider/SliderWithStepAndMarks.doc.mjs
deleted file mode 100644
index ab1bb8f4db..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderWithStepAndMarks.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Slider — With step and marks',
- description: 'With step and marks',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Slider'],
-};
diff --git a/packages/cli/templates/blocks/components/Slider/SliderWithStepAndMarks.tsx b/packages/cli/templates/blocks/components/Slider/SliderWithStepAndMarks.tsx
deleted file mode 100644
index 0e47e35670..0000000000
--- a/packages/cli/templates/blocks/components/Slider/SliderWithStepAndMarks.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSlider} from '@xds/core/Slider';
-
-export default function SliderWithStepAndMarks() {
- const [rating, setRating] = useState(3);
-
- return (
- <XDSSlider
- label="Rating"
- value={3}
- onChange={setRating}
- min={1}
- max={5}
- step={1}
- marks={[
- { value: 1, label: 'Poor' },
- { value: 3, label: 'Average' },
- { value: 5, label: 'Excellent' },
- ]}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerA11yOnlyNoVisibleText.tsx b/packages/cli/templates/blocks/components/Spinner/SpinnerA11yOnlyNoVisibleText.tsx
deleted file mode 100644
index bb1fb1f413..0000000000
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerA11yOnlyNoVisibleText.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSSpinner} from '@xds/core/Spinner';
-
-export default function SpinnerA11yOnlyNoVisibleText() {
- return (
- <XDSSpinner aria-label="Loading data" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerDefault.tsx b/packages/cli/templates/blocks/components/Spinner/SpinnerDefault.tsx
deleted file mode 100644
index fbeb41139d..0000000000
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerDefault.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSSpinner} from '@xds/core/Spinner';
-
-export default function SpinnerDefault() {
- return (
- <XDSSpinner />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerDefault.doc.mjs b/packages/cli/templates/blocks/components/Spinner/SpinnerOnMedia.doc.mjs
similarity index 51%
rename from packages/cli/templates/blocks/components/Spinner/SpinnerDefault.doc.mjs
rename to packages/cli/templates/blocks/components/Spinner/SpinnerOnMedia.doc.mjs
index e45b1be912..9fdf96c2eb 100644
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerDefault.doc.mjs
+++ b/packages/cli/templates/blocks/components/Spinner/SpinnerOnMedia.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Spinner — Default',
- description: 'Default',
+ name: 'Spinner — On Media Shade',
+ description:
+ 'Default and onMedia shade spinners for light and dark backgrounds.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Spinner'],
};
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerOnMedia.tsx b/packages/cli/templates/blocks/components/Spinner/SpinnerOnMedia.tsx
new file mode 100644
index 0000000000..890d8140c0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Spinner/SpinnerOnMedia.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {XDSSpinner} from '@xds/core/Spinner';
+import {XDSHStack} from '@xds/core/Layout';
+
+export default function SpinnerOnMedia() {
+ return (
+ <XDSHStack gap={4} vAlign="center">
+ <XDSSpinner shade="default" />
+ <div
+ style={{
+ backgroundColor: '#1a1a2e',
+ padding: 16,
+ borderRadius: 8,
+ }}>
+ <XDSSpinner shade="onMedia" />
+ </div>
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerRichLabelWithComposition.doc.mjs b/packages/cli/templates/blocks/components/Spinner/SpinnerRichLabelWithComposition.doc.mjs
deleted file mode 100644
index da3b7a22f4..0000000000
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerRichLabelWithComposition.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Spinner — Rich label with composition',
- description: 'Rich label with composition',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layout', 'Spinner', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerRichLabelWithComposition.tsx b/packages/cli/templates/blocks/components/Spinner/SpinnerRichLabelWithComposition.tsx
deleted file mode 100644
index efae06913b..0000000000
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerRichLabelWithComposition.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-'use client';
-
-import {XDSVStack} from '@xds/core/Layout';
-import {XDSSpinner} from '@xds/core/Spinner';
-import {XDSText} from '@xds/core/Text';
-
-export default function SpinnerRichLabelWithComposition() {
- return (
- <XDSSpinner
- size="lg"
- label={
- <XDSVStack gap={0} hAlign="center">
- <XDSText type="body" weight="bold">Fetching data</XDSText>
- <XDSText type="supporting" color="secondary">This may take a moment</XDSText>
- </XDSVStack>
- }
- aria-label="Fetching data"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerA11yOnlyNoVisibleText.doc.mjs b/packages/cli/templates/blocks/components/Spinner/SpinnerSizes.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/Spinner/SpinnerA11yOnlyNoVisibleText.doc.mjs
rename to packages/cli/templates/blocks/components/Spinner/SpinnerSizes.doc.mjs
index f455c56053..5dc65484fc 100644
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerA11yOnlyNoVisibleText.doc.mjs
+++ b/packages/cli/templates/blocks/components/Spinner/SpinnerSizes.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Spinner — A11y only (no visible text)',
- description: 'A11y only (no visible text)',
+ name: 'Spinner — Sizes',
+ description: 'All four spinner sizes displayed side by side.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Spinner'],
};
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerSizes.tsx b/packages/cli/templates/blocks/components/Spinner/SpinnerSizes.tsx
new file mode 100644
index 0000000000..ff130bbbbf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Spinner/SpinnerSizes.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSSpinner} from '@xds/core/Spinner';
+import {XDSHStack} from '@xds/core/Layout';
+
+export default function SpinnerSizes() {
+ return (
+ <XDSHStack gap={4} vAlign="center">
+ <XDSSpinner size="sm" />
+ <XDSSpinner size="md" />
+ <XDSSpinner size="lg" />
+ <XDSSpinner size="xl" />
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.doc.mjs b/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.doc.mjs
index 9aa7e1d7cd..dd15bc63f7 100644
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.doc.mjs
+++ b/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Spinner — With label',
- description: 'With label',
+ name: 'Spinner — With Label',
+ description:
+ 'Spinners with simple text and rich multi-line label content.',
isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Spinner'],
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Spinner', 'Text'],
};
diff --git a/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.tsx b/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.tsx
index b4209adb79..5f0915895d 100644
--- a/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.tsx
+++ b/packages/cli/templates/blocks/components/Spinner/SpinnerWithLabel.tsx
@@ -1,9 +1,27 @@
'use client';
import {XDSSpinner} from '@xds/core/Spinner';
+import {XDSText} from '@xds/core/Text';
+import {XDSHStack, XDSVStack} from '@xds/core/Layout';
export default function SpinnerWithLabel() {
return (
- <XDSSpinner label="Loading..." />
+ <XDSHStack gap={8} vAlign="start">
+ <XDSSpinner size="lg" label="Loading..." />
+ <XDSSpinner
+ size="lg"
+ label={
+ <XDSVStack gap={0} hAlign="center">
+ <XDSText type="body" weight="bold">
+ Fetching data
+ </XDSText>
+ <XDSText type="supporting" color="secondary">
+ This may take a moment
+ </XDSText>
+ </XDSVStack>
+ }
+ aria-label="Fetching data"
+ />
+ </XDSHStack>
);
}
diff --git a/packages/cli/templates/blocks/components/Card/CardMutedBackground.doc.mjs b/packages/cli/templates/blocks/components/Stack/StackDirections.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/Card/CardMutedBackground.doc.mjs
rename to packages/cli/templates/blocks/components/Stack/StackDirections.doc.mjs
index 46460e2de7..29d217b180 100644
--- a/packages/cli/templates/blocks/components/Card/CardMutedBackground.doc.mjs
+++ b/packages/cli/templates/blocks/components/Stack/StackDirections.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Card — Muted Background',
- description: 'De-emphasised card with wash background variant.',
+ name: 'Stack — Directions',
+ description: 'Horizontal and vertical stack directions side by side.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Card'],
+ componentsUsed: ['Stack'],
};
diff --git a/packages/cli/templates/blocks/components/Stack/StackDirections.tsx b/packages/cli/templates/blocks/components/Stack/StackDirections.tsx
new file mode 100644
index 0000000000..2b271f48bd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Stack/StackDirections.tsx
@@ -0,0 +1,35 @@
+'use client';
+
+import {XDSStack} from '@xds/core/Layout';
+
+const boxStyle = {
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#e8f0fe',
+ color: '#1a73e8',
+ border: '1px solid #c6dafc',
+ fontWeight: 500,
+} as const;
+
+export default function StackDirections() {
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 24}}>
+ <div>
+ <h4 style={{margin: '0 0 8px'}}>Horizontal</h4>
+ <XDSStack direction="horizontal" gap={2}>
+ <div style={boxStyle}>Item 1</div>
+ <div style={boxStyle}>Item 2</div>
+ <div style={boxStyle}>Item 3</div>
+ </XDSStack>
+ </div>
+ <div>
+ <h4 style={{margin: '0 0 8px'}}>Vertical</h4>
+ <XDSStack direction="vertical" gap={2}>
+ <div style={boxStyle}>Item 1</div>
+ <div style={boxStyle}>Item 2</div>
+ <div style={boxStyle}>Item 3</div>
+ </XDSStack>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.doc.mjs b/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.doc.mjs
index 09d5cc999f..805e9f424f 100644
--- a/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Stack — Header layout',
- description: 'Header layout',
+ name: 'Stack — Header Layout',
+ description:
+ 'Common header pattern with logo, flexible navigation, and action areas.',
isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layout'],
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Stack', 'StackItem'],
};
diff --git a/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.tsx b/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.tsx
index 6433bba1a2..ca5fc89578 100644
--- a/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.tsx
+++ b/packages/cli/templates/blocks/components/Stack/StackHeaderLayout.tsx
@@ -1,31 +1,37 @@
'use client';
-import {XDSHStack, XDSStackItem} from '@xds/core/Layout';
+import {XDSStack, XDSStackItem} from '@xds/core/Layout';
-function Logo() {
- return <div style={{padding: 8}}>Logo</div>;
-}
-
-function Navigation() {
- return <div style={{padding: 8}}>Navigation</div>;
-}
+const sideStyle = {
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#f3f4f6',
+ color: '#4b5563',
+ border: '1px solid #d1d5db',
+ fontWeight: 500,
+} as const;
-function UserMenu() {
- return <div style={{padding: 8}}>UserMenu</div>;
-}
+const mainStyle = {
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#e8f0fe',
+ color: '#1a73e8',
+ border: '1px solid #c6dafc',
+ fontWeight: 500,
+} as const;
export default function StackHeaderLayout() {
return (
- <XDSHStack element="header" gap={2}>
+ <XDSStack direction="horizontal" gap={2}>
<XDSStackItem size="static">
- <Logo />
+ <div style={sideStyle}>Logo</div>
</XDSStackItem>
<XDSStackItem size="fill">
- <Navigation />
+ <div style={mainStyle}>Navigation</div>
</XDSStackItem>
<XDSStackItem size="static">
- <UserMenu />
+ <div style={sideStyle}>Actions</div>
</XDSStackItem>
- </XDSHStack>
+ </XDSStack>
);
}
diff --git a/packages/cli/templates/blocks/components/Stack/StackItemFill.doc.mjs b/packages/cli/templates/blocks/components/Stack/StackItemFill.doc.mjs
new file mode 100644
index 0000000000..f5e3448f96
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Stack/StackItemFill.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Stack — Fill Item',
+ description:
+ 'Static items on the edges with a fill item that grows to take remaining space.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Stack', 'StackItem'],
+};
diff --git a/packages/cli/templates/blocks/components/Stack/StackItemFill.tsx b/packages/cli/templates/blocks/components/Stack/StackItemFill.tsx
new file mode 100644
index 0000000000..2ea9f335f1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Stack/StackItemFill.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {XDSStack, XDSStackItem} from '@xds/core/Layout';
+
+const staticStyle = {
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#f3f4f6',
+ color: '#4b5563',
+ border: '1px solid #d1d5db',
+ fontWeight: 500,
+} as const;
+
+const fillStyle = {
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#e8f0fe',
+ color: '#1a73e8',
+ border: '1px solid #c6dafc',
+ fontWeight: 500,
+} as const;
+
+export default function StackItemFill() {
+ return (
+ <XDSStack direction="horizontal" gap={2}>
+ <XDSStackItem size="static">
+ <div style={staticStyle}>Static</div>
+ </XDSStackItem>
+ <XDSStackItem size="fill">
+ <div style={fillStyle}>Fill (grows to remaining space)</div>
+ </XDSStackItem>
+ <XDSStackItem size="static">
+ <div style={staticStyle}>Static</div>
+ </XDSStackItem>
+ </XDSStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Stack/StackOverrideAlignmentPerItem.doc.mjs b/packages/cli/templates/blocks/components/Stack/StackOverrideAlignmentPerItem.doc.mjs
deleted file mode 100644
index 258861c711..0000000000
--- a/packages/cli/templates/blocks/components/Stack/StackOverrideAlignmentPerItem.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Stack — Override alignment per item',
- description: 'Override alignment per item',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layout'],
-};
diff --git a/packages/cli/templates/blocks/components/Stack/StackOverrideAlignmentPerItem.tsx b/packages/cli/templates/blocks/components/Stack/StackOverrideAlignmentPerItem.tsx
deleted file mode 100644
index 2f538dfe41..0000000000
--- a/packages/cli/templates/blocks/components/Stack/StackOverrideAlignmentPerItem.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {XDSHStack, XDSStackItem} from '@xds/core/Layout';
-
-export default function StackOverrideAlignmentPerItem() {
- return (
- <XDSHStack vAlign="start">
- <XDSStackItem crossAlignSelf="center">Centered</XDSStackItem>
- <XDSStackItem>Top-aligned</XDSStackItem>
- </XDSHStack>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Stack/StackPageLayout.doc.mjs b/packages/cli/templates/blocks/components/Stack/StackPageLayout.doc.mjs
deleted file mode 100644
index c4db181fb3..0000000000
--- a/packages/cli/templates/blocks/components/Stack/StackPageLayout.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Stack — Page layout',
- description: 'Page layout',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layout'],
-};
diff --git a/packages/cli/templates/blocks/components/Stack/StackPageLayout.tsx b/packages/cli/templates/blocks/components/Stack/StackPageLayout.tsx
deleted file mode 100644
index a4b8c6d838..0000000000
--- a/packages/cli/templates/blocks/components/Stack/StackPageLayout.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-'use client';
-
-import {XDSStackItem, XDSVStack} from '@xds/core/Layout';
-
-function PageHeader() {
- return <div style={{padding: 8}}>PageHeader</div>;
-}
-
-function PageContent() {
- return <div style={{padding: 8}}>PageContent</div>;
-}
-
-function PageFooter() {
- return <div style={{padding: 8}}>PageFooter</div>;
-}
-
-export default function StackPageLayout() {
- return (
- <XDSVStack element="main" gap={6}>
- <XDSStackItem size="static">
- <PageHeader />
- </XDSStackItem>
- <XDSStackItem size="fill">
- <PageContent />
- </XDSStackItem>
- <XDSStackItem size="static">
- <PageFooter />
- </XDSStackItem>
- </XDSVStack>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.doc.mjs b/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.doc.mjs
index 69537444c5..7558898d09 100644
--- a/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.doc.mjs
+++ b/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Stack — Sidebar layout',
- description: 'Sidebar layout',
+ name: 'Stack — Sidebar Layout',
+ description:
+ 'Fixed-width sidebar alongside a flexible main content area.',
isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layout'],
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Stack', 'StackItem'],
};
diff --git a/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.tsx b/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.tsx
index 981612fdae..9ad9e0a24f 100644
--- a/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.tsx
+++ b/packages/cli/templates/blocks/components/Stack/StackSidebarLayout.tsx
@@ -1,24 +1,40 @@
'use client';
-import {XDSHStack, XDSStackItem} from '@xds/core/Layout';
+import {XDSStack, XDSStackItem} from '@xds/core/Layout';
-function Sidebar() {
- return <div style={{padding: 8}}>Sidebar</div>;
-}
+const sidebarStyle = {
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#f3f4f6',
+ color: '#4b5563',
+ border: '1px solid #d1d5db',
+ fontWeight: 500,
+ height: '100%',
+ boxSizing: 'border-box',
+} as const;
-function MainContent() {
- return <div style={{padding: 8}}>MainContent</div>;
-}
+const contentStyle = {
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#e8f0fe',
+ color: '#1a73e8',
+ border: '1px solid #c6dafc',
+ fontWeight: 500,
+ height: '100%',
+ boxSizing: 'border-box',
+} as const;
export default function StackSidebarLayout() {
return (
- <XDSHStack gap={4}>
- <XDSStackItem size="static">
- <Sidebar />
- </XDSStackItem>
- <XDSStackItem size="fill">
- <MainContent />
- </XDSStackItem>
- </XDSHStack>
+ <div style={{height: 200}}>
+ <XDSStack direction="horizontal" gap={2}>
+ <XDSStackItem size="static">
+ <div style={{...sidebarStyle, width: 150}}>Sidebar</div>
+ </XDSStackItem>
+ <XDSStackItem size="fill">
+ <div style={contentStyle}>Main Content</div>
+ </XDSStackItem>
+ </XDSStack>
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/Stack/StackStyleXUtilityAdvancedUse.doc.mjs b/packages/cli/templates/blocks/components/Stack/StackStyleXUtilityAdvancedUse.doc.mjs
deleted file mode 100644
index f4c842718e..0000000000
--- a/packages/cli/templates/blocks/components/Stack/StackStyleXUtilityAdvancedUse.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Stack — StyleX utility — advanced use',
- description: 'StyleX utility — advanced use',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Layout'],
-};
diff --git a/packages/cli/templates/blocks/components/Stack/StackStyleXUtilityAdvancedUse.tsx b/packages/cli/templates/blocks/components/Stack/StackStyleXUtilityAdvancedUse.tsx
deleted file mode 100644
index 1a8c5114f6..0000000000
--- a/packages/cli/templates/blocks/components/Stack/StackStyleXUtilityAdvancedUse.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {stack} from '@xds/core/Layout';
-import * as stylex from '@stylexjs/stylex';
-
-function Child() {
- return <div style={{padding: 8}}>Child</div>;
-}
-
-export default function StackStyleXUtilityAdvancedUse() {
- return (
- <div {...(stylex.props(...stack({direction: 'horizontal', gap: 2})) as React.HTMLAttributes<HTMLDivElement>)}>
- <Child />
- <Child />
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotBasicStatusIndicators.tsx b/packages/cli/templates/blocks/components/StatusDot/StatusDotBasicStatusIndicators.tsx
deleted file mode 100644
index b610931cd7..0000000000
--- a/packages/cli/templates/blocks/components/StatusDot/StatusDotBasicStatusIndicators.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-'use client';
-
-import {XDSStatusDot} from '@xds/core/StatusDot';
-
-export default function StatusDotBasicStatusIndicators() {
- return (
- <>
- <XDSStatusDot variant="positive" label="Online" />
- <XDSStatusDot variant="negative" label="Offline" />
- <XDSStatusDot variant="warning" label="Away" />
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsingAnimation.doc.mjs b/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsing.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/StatusDot/StatusDotPulsingAnimation.doc.mjs
rename to packages/cli/templates/blocks/components/StatusDot/StatusDotPulsing.doc.mjs
index 897af6be49..cebf53a6c5 100644
--- a/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsingAnimation.doc.mjs
+++ b/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsing.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'StatusDot — Pulsing animation',
- description: 'Pulsing animation',
+ name: 'StatusDot — Pulsing',
+ description: 'Animated pulsing dots for live, processing, and error states.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['StatusDot'],
};
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsing.tsx b/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsing.tsx
new file mode 100644
index 0000000000..183e953840
--- /dev/null
+++ b/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsing.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSStatusDot} from '@xds/core/StatusDot';
+
+export default function StatusDotPulsing() {
+ return (
+ <div style={{display: 'flex', gap: 8, alignItems: 'center'}}>
+ <XDSStatusDot variant="positive" label="Live" isPulsing />
+ <XDSStatusDot variant="warning" label="Processing" isPulsing />
+ <XDSStatusDot variant="negative" label="Error" isPulsing />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsingAnimation.tsx b/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsingAnimation.tsx
deleted file mode 100644
index a2d831ca2a..0000000000
--- a/packages/cli/templates/blocks/components/StatusDot/StatusDotPulsingAnimation.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSStatusDot} from '@xds/core/StatusDot';
-
-export default function StatusDotPulsingAnimation() {
- return (
- <XDSStatusDot variant="positive" label="Live" isPulsing />
- );
-}
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotStatusIndicators.doc.mjs b/packages/cli/templates/blocks/components/StatusDot/StatusDotStatusIndicators.doc.mjs
new file mode 100644
index 0000000000..a9802e54b4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/StatusDot/StatusDotStatusIndicators.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'StatusDot — Status Indicators',
+ description:
+ 'Labeled status dot list for presence indicators like online, away, and offline.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['StatusDot'],
+};
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotStatusIndicators.tsx b/packages/cli/templates/blocks/components/StatusDot/StatusDotStatusIndicators.tsx
new file mode 100644
index 0000000000..8018d50314
--- /dev/null
+++ b/packages/cli/templates/blocks/components/StatusDot/StatusDotStatusIndicators.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {XDSStatusDot} from '@xds/core/StatusDot';
+
+const statuses = [
+ {variant: 'positive', label: 'Online'},
+ {variant: 'warning', label: 'Away'},
+ {variant: 'negative', label: 'Offline'},
+ {variant: 'neutral', label: 'Unknown'},
+] as const;
+
+export default function StatusDotStatusIndicators() {
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 8}}>
+ {statuses.map(({variant, label}) => (
+ <div
+ key={variant}
+ style={{display: 'flex', gap: 8, alignItems: 'center'}}>
+ <XDSStatusDot variant={variant} label={label} />
+ <span>{label}</span>
+ </div>
+ ))}
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotBasicStatusIndicators.doc.mjs b/packages/cli/templates/blocks/components/StatusDot/StatusDotVariants.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/StatusDot/StatusDotBasicStatusIndicators.doc.mjs
rename to packages/cli/templates/blocks/components/StatusDot/StatusDotVariants.doc.mjs
index ac06bc45c2..9e06b4a6d8 100644
--- a/packages/cli/templates/blocks/components/StatusDot/StatusDotBasicStatusIndicators.doc.mjs
+++ b/packages/cli/templates/blocks/components/StatusDot/StatusDotVariants.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'StatusDot — Basic status indicators',
- description: 'Basic status indicators',
+ name: 'StatusDot — Variants',
+ description: 'All five semantic color variants displayed in a row.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['StatusDot'],
};
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotVariants.tsx b/packages/cli/templates/blocks/components/StatusDot/StatusDotVariants.tsx
new file mode 100644
index 0000000000..258c401844
--- /dev/null
+++ b/packages/cli/templates/blocks/components/StatusDot/StatusDotVariants.tsx
@@ -0,0 +1,15 @@
+'use client';
+
+import {XDSStatusDot} from '@xds/core/StatusDot';
+
+export default function StatusDotVariants() {
+ return (
+ <div style={{display: 'flex', gap: 8, alignItems: 'center'}}>
+ <XDSStatusDot variant="positive" label="Positive" />
+ <XDSStatusDot variant="warning" label="Warning" />
+ <XDSStatusDot variant="negative" label="Negative" />
+ <XDSStatusDot variant="info" label="Info" />
+ <XDSStatusDot variant="neutral" label="Neutral" />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotWithPulse.doc.mjs b/packages/cli/templates/blocks/components/StatusDot/StatusDotWithPulse.doc.mjs
deleted file mode 100644
index 6ad279ad10..0000000000
--- a/packages/cli/templates/blocks/components/StatusDot/StatusDotWithPulse.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'StatusDot — With pulse',
- description: 'With pulse',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['StatusDot'],
-};
diff --git a/packages/cli/templates/blocks/components/StatusDot/StatusDotWithPulse.tsx b/packages/cli/templates/blocks/components/StatusDot/StatusDotWithPulse.tsx
deleted file mode 100644
index 3e31dcc00f..0000000000
--- a/packages/cli/templates/blocks/components/StatusDot/StatusDotWithPulse.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSStatusDot} from '@xds/core/StatusDot';
-
-export default function StatusDotWithPulse() {
- return (
- <XDSStatusDot variant="positive" label="Active" isPulsing />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchBasic.tsx b/packages/cli/templates/blocks/components/Switch/SwitchBasic.tsx
deleted file mode 100644
index 25be8c7f8c..0000000000
--- a/packages/cli/templates/blocks/components/Switch/SwitchBasic.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSwitch} from '@xds/core/Switch';
-
-export default function SwitchBasic() {
- const [enabled, setEnabled] = useState(false);
-
- return (
- <XDSSwitch
- label="Enable notifications"
- value={enabled}
- onChange={setEnabled}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchBasic.doc.mjs b/packages/cli/templates/blocks/components/Switch/SwitchDisabled.doc.mjs
similarity index 61%
rename from packages/cli/templates/blocks/components/Switch/SwitchBasic.doc.mjs
rename to packages/cli/templates/blocks/components/Switch/SwitchDisabled.doc.mjs
index b40238914e..3fe51582f2 100644
--- a/packages/cli/templates/blocks/components/Switch/SwitchBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/Switch/SwitchDisabled.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Switch — Basic',
- description: 'Basic',
+ name: 'Switch — Disabled',
+ description: 'Disabled switch with label and description for gated features.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Switch'],
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchDisabled.tsx b/packages/cli/templates/blocks/components/Switch/SwitchDisabled.tsx
new file mode 100644
index 0000000000..7cb6a2cf3c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Switch/SwitchDisabled.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSwitch} from '@xds/core/Switch';
+
+export default function SwitchDisabled() {
+ const [value, setValue] = useState(false);
+ return (
+ <XDSSwitch
+ label="Premium feature"
+ description="Upgrade to enable this option"
+ value={value}
+ onChange={setValue}
+ isDisabled
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithAsyncActionAndOptimisticUI.doc.mjs b/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanel.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/Switch/SwitchWithAsyncActionAndOptimisticUI.doc.mjs
rename to packages/cli/templates/blocks/components/Switch/SwitchSettingsPanel.doc.mjs
index ca4df129e6..a53a78bdc8 100644
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithAsyncActionAndOptimisticUI.doc.mjs
+++ b/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanel.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Switch — With async action and optimistic UI',
- description: 'With async action and optimistic UI',
+ name: 'Switch — Settings Panel',
+ description:
+ 'Real-world settings panel with spread-spaced label-start switches in a card.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Switch'],
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanel.tsx b/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanel.tsx
new file mode 100644
index 0000000000..633e993e69
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanel.tsx
@@ -0,0 +1,45 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSwitch} from '@xds/core/Switch';
+
+export default function SwitchSettingsPanel() {
+ const [notifications, setNotifications] = useState(false);
+ const [darkMode, setDarkMode] = useState(true);
+ const [autoSave, setAutoSave] = useState(false);
+
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 16,
+ width: 350,
+ border: '1px solid #e0e0e0',
+ borderRadius: 8,
+ padding: 16,
+ }}>
+ <XDSSwitch
+ label="Enable notifications"
+ value={notifications}
+ onChange={setNotifications}
+ labelPosition="start"
+ labelSpacing="spread"
+ />
+ <XDSSwitch
+ label="Dark mode"
+ value={darkMode}
+ onChange={setDarkMode}
+ labelPosition="start"
+ labelSpacing="spread"
+ />
+ <XDSSwitch
+ label="Auto-save"
+ value={autoSave}
+ onChange={setAutoSave}
+ labelPosition="start"
+ labelSpacing="spread"
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanelStyleLabelStartSpreadSpacing.doc.mjs b/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanelStyleLabelStartSpreadSpacing.doc.mjs
deleted file mode 100644
index 0c676127d1..0000000000
--- a/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanelStyleLabelStartSpreadSpacing.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Switch — Settings panel style (label start, spread spacing)',
- description: 'Settings panel style (label start, spread spacing)',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Switch'],
-};
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanelStyleLabelStartSpreadSpacing.tsx b/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanelStyleLabelStartSpreadSpacing.tsx
deleted file mode 100644
index a0d51fc5c2..0000000000
--- a/packages/cli/templates/blocks/components/Switch/SwitchSettingsPanelStyleLabelStartSpreadSpacing.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSwitch} from '@xds/core/Switch';
-
-export default function SwitchSettingsPanelStyleLabelStartSpreadSpacing() {
- const [enabled, setEnabled] = useState(false);
-
- return (
- <XDSSwitch
- label="Enable notifications"
- value={enabled}
- onChange={setEnabled}
- labelPosition="start"
- labelSpacing="spread"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithAsyncActionAndOptimisticUI.tsx b/packages/cli/templates/blocks/components/Switch/SwitchWithAsyncActionAndOptimisticUI.tsx
deleted file mode 100644
index 05dd5ed94b..0000000000
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithAsyncActionAndOptimisticUI.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSwitch} from '@xds/core/Switch';
-
-const updateSetting = async (_key: string, _v: boolean) => {};
-
-export default function SwitchWithAsyncActionAndOptimisticUI() {
- const [syncEnabled, setSyncEnabled] = useState(false);
-
- return (
- <XDSSwitch
- label="Sync to cloud"
- value={syncEnabled}
- onChange={setSyncEnabled}
- onChangeAction={async (checked) => {
- await updateSetting('sync', checked);
- }}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.doc.mjs b/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.doc.mjs
index a9fe8c0728..038c84bdc2 100644
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.doc.mjs
+++ b/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Switch — With description',
- description: 'With description',
+ name: 'Switch — With Description',
+ description: 'Toggle with a label and supporting description text.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Switch'],
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.tsx b/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.tsx
index 149c88d409..03e11ed4da 100644
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.tsx
+++ b/packages/cli/templates/blocks/components/Switch/SwitchWithDescription.tsx
@@ -4,14 +4,13 @@ import {useState} from 'react';
import {XDSSwitch} from '@xds/core/Switch';
export default function SwitchWithDescription() {
- const [darkMode, setDarkMode] = useState(false);
-
+ const [value, setValue] = useState(false);
return (
<XDSSwitch
label="Dark mode"
- description="Switch to a darker color scheme"
- value={darkMode}
- onChange={setDarkMode}
+ description="Switch to a darker color scheme for reduced eye strain."
+ value={value}
+ onChange={setValue}
/>
);
}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithErrorStatus.doc.mjs b/packages/cli/templates/blocks/components/Switch/SwitchWithErrorStatus.doc.mjs
deleted file mode 100644
index 38ee44f3da..0000000000
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithErrorStatus.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Switch — With error status',
- description: 'With error status',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Switch'],
-};
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithErrorStatus.tsx b/packages/cli/templates/blocks/components/Switch/SwitchWithErrorStatus.tsx
deleted file mode 100644
index b6a0a6ced0..0000000000
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithErrorStatus.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSwitch} from '@xds/core/Switch';
-
-export default function SwitchWithErrorStatus() {
- const [twoFactor, setTwoFactor] = useState(false);
-
- return (
- <XDSSwitch
- label="Two-factor authentication"
- value={twoFactor}
- onChange={setTwoFactor}
- status={{type: 'error', message: 'Failed to save setting'}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithLabelIconAndTooltip.tsx b/packages/cli/templates/blocks/components/Switch/SwitchWithLabelIconAndTooltip.tsx
deleted file mode 100644
index 77175b91cf..0000000000
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithLabelIconAndTooltip.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSSwitch} from '@xds/core/Switch';
-
-function CloudArrowUpIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function SwitchWithLabelIconAndTooltip() {
- const [autoSave, setAutoSave] = useState(false);
-
- return (
- <XDSSwitch
- label="Auto-save"
- labelIcon={CloudArrowUpIcon}
- labelTooltip="Automatically save changes"
- value={autoSave}
- onChange={setAutoSave}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithLabelIconAndTooltip.doc.mjs b/packages/cli/templates/blocks/components/Switch/SwitchWithStatus.doc.mjs
similarity index 59%
rename from packages/cli/templates/blocks/components/Switch/SwitchWithLabelIconAndTooltip.doc.mjs
rename to packages/cli/templates/blocks/components/Switch/SwitchWithStatus.doc.mjs
index 10059d8095..3d232b08a6 100644
--- a/packages/cli/templates/blocks/components/Switch/SwitchWithLabelIconAndTooltip.doc.mjs
+++ b/packages/cli/templates/blocks/components/Switch/SwitchWithStatus.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Switch — With label icon and tooltip',
- description: 'With label icon and tooltip',
+ name: 'Switch — With Status',
+ description:
+ 'Switches with error, warning, and success validation status messages.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Switch'],
diff --git a/packages/cli/templates/blocks/components/Switch/SwitchWithStatus.tsx b/packages/cli/templates/blocks/components/Switch/SwitchWithStatus.tsx
new file mode 100644
index 0000000000..c6df86779c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Switch/SwitchWithStatus.tsx
@@ -0,0 +1,47 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSSwitch} from '@xds/core/Switch';
+
+export default function SwitchWithStatus() {
+ const [terms, setTerms] = useState(false);
+ const [sharing, setSharing] = useState(true);
+ const [twoFactor, setTwoFactor] = useState(true);
+
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 24,
+ maxWidth: 400,
+ }}>
+ <XDSSwitch
+ label="Accept terms and conditions"
+ value={terms}
+ onChange={setTerms}
+ isRequired
+ status={{
+ type: 'error',
+ message: 'You must accept the terms to continue',
+ }}
+ />
+ <XDSSwitch
+ label="Share usage data"
+ description="Help us improve by sharing anonymous usage statistics"
+ value={sharing}
+ onChange={setSharing}
+ status={{
+ type: 'warning',
+ message: 'This data may be shared with partners',
+ }}
+ />
+ <XDSSwitch
+ label="Two-factor authentication"
+ value={twoFactor}
+ onChange={setTwoFactor}
+ status={{type: 'success', message: 'Your account is now more secure'}}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListBasic.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListBasic.doc.mjs
deleted file mode 100644
index c0d42f3adc..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TabList — Basic',
- description: 'Basic',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['TabList'],
-};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListBasic.tsx b/packages/cli/templates/blocks/components/TabList/TabListBasic.tsx
deleted file mode 100644
index 903bd14d08..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListBasic.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTab, XDSTabList} from '@xds/core/TabList';
-
-export default function TabListBasic() {
- const [activeTab, setActiveTab] = useState('home');
-
- return (
- <XDSTabList value={activeTab} onChange={setActiveTab}>
- <XDSTab value="home" label="Home" />
- <XDSTab value="settings" label="Settings" />
- </XDSTabList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListTabsFillLayout.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListTabsFillLayout.doc.mjs
new file mode 100644
index 0000000000..e78a5292d5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsFillLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TabList — Fill Layout',
+ description:
+ 'Tabs that stretch to fill the available width with a bottom divider.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TabList', 'Tab'],
+};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListTabsFillLayout.tsx b/packages/cli/templates/blocks/components/TabList/TabListTabsFillLayout.tsx
new file mode 100644
index 0000000000..b01816fb70
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsFillLayout.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTabList, XDSTab} from '@xds/core/TabList';
+
+export default function TabListTabsFillLayout() {
+ const [value, setValue] = useState('home');
+ return (
+ <div style={{width: 500}}>
+ <XDSTabList value={value} onChange={setValue} layout="fill" hasDivider>
+ <XDSTab value="home" label="Home" />
+ <XDSTab value="projects" label="Projects" />
+ <XDSTab value="settings" label="Settings" />
+ </XDSTabList>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListTabsWithActions.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListTabsWithActions.doc.mjs
new file mode 100644
index 0000000000..435d797af0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsWithActions.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TabList — With Actions',
+ description:
+ 'Page header pattern with tabs on the left and action buttons pushed to the right.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TabList', 'Tab', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListTabsWithActions.tsx b/packages/cli/templates/blocks/components/TabList/TabListTabsWithActions.tsx
new file mode 100644
index 0000000000..5ada2e3688
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsWithActions.tsx
@@ -0,0 +1,69 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTabList, XDSTab} from '@xds/core/TabList';
+import {XDSButton} from '@xds/core/Button';
+
+const FilterIcon = (
+ <svg
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={2}
+ width="100%"
+ height="100%">
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"
+ />
+ </svg>
+);
+
+const PlusIcon = (
+ <svg
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={2}
+ width="100%"
+ height="100%">
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="M12 4.5v15m7.5-7.5h-15"
+ />
+ </svg>
+);
+
+export default function TabListTabsWithActions() {
+ const [value, setValue] = useState('all');
+ return (
+ <XDSTabList value={value} onChange={setValue} size="lg" hasDivider>
+ <XDSTab value="all" label="All items" />
+ <XDSTab value="active" label="Active" />
+ <XDSTab value="archived" label="Archived" />
+ <div
+ style={{
+ marginInlineStart: 'auto',
+ display: 'flex',
+ alignItems: 'center',
+ gap: 4,
+ }}>
+ <XDSButton
+ label="Filter"
+ variant="ghost"
+ size="sm"
+ icon={FilterIcon}
+ isIconOnly
+ />
+ <XDSButton
+ label="New item"
+ variant="primary"
+ size="sm"
+ icon={PlusIcon}
+ />
+ </div>
+ </XDSTabList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Grid/GridAutoFitMaxColumns.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListTabsWithIcons.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/Grid/GridAutoFitMaxColumns.doc.mjs
rename to packages/cli/templates/blocks/components/TabList/TabListTabsWithIcons.doc.mjs
index fbb64051cd..d0cf078a1f 100644
--- a/packages/cli/templates/blocks/components/Grid/GridAutoFitMaxColumns.doc.mjs
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsWithIcons.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Grid — Auto-Fit Max Columns',
- description: 'Auto-fit grid with a maximum column count cap.',
+ name: 'TabList — With Icons',
+ description: 'Tabs with leading icons alongside text labels.',
isReady: true,
aspectRatio: 4 / 3,
- componentsUsed: ['Grid'],
+ componentsUsed: ['TabList', 'Tab'],
};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListTabsWithIcons.tsx b/packages/cli/templates/blocks/components/TabList/TabListTabsWithIcons.tsx
new file mode 100644
index 0000000000..e9f464a743
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsWithIcons.tsx
@@ -0,0 +1,30 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTabList, XDSTab} from '@xds/core/TabList';
+
+const HomeIcon = (
+ <svg viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%">
+ <path d="M8.543 2.232a.75.75 0 0 0-1.085 0l-5.25 5.5A.75.75 0 0 0 2.75 9H4v4a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2h1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V9h1.25a.75.75 0 0 0 .543-1.268l-5.25-5.5Z" />
+ </svg>
+);
+
+const CogIcon = (
+ <svg viewBox="0 0 16 16" fill="currentColor" width="100%" height="100%">
+ <path
+ fillRule="evenodd"
+ d="M6.955 1.45A.5.5 0 0 1 7.452 1h1.096a.5.5 0 0 1 .497.45l.17 1.699c.484.12.94.312 1.356.562l1.321-.816a.5.5 0 0 1 .67.087l.774.774a.5.5 0 0 1 .087.67l-.816 1.321c.25.416.442.872.562 1.356l1.699.17a.5.5 0 0 1 .45.497v1.096a.5.5 0 0 1-.45.497l-1.699.17c-.12.484-.312.94-.562 1.356l.816 1.321a.5.5 0 0 1-.087.67l-.774.774a.5.5 0 0 1-.67.087l-1.321-.816c-.416.25-.872.442-1.356.562l-.17 1.699a.5.5 0 0 1-.497.45H7.452a.5.5 0 0 1-.497-.45l-.17-1.699a4.973 4.973 0 0 1-1.356-.562l-1.321.816a.5.5 0 0 1-.67-.087l-.774-.774a.5.5 0 0 1-.087-.67l.816-1.321a4.972 4.972 0 0 1-.562-1.356l-1.699-.17A.5.5 0 0 1 1 8.548V7.452a.5.5 0 0 1 .45-.497l1.699-.17c.12-.484.312-.94.562-1.356l-.816-1.321a.5.5 0 0 1 .087-.67l.774-.774a.5.5 0 0 1 .67-.087l1.321.816c.416-.25.872-.442 1.356-.562l.17-1.699ZM8 10.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"
+ clipRule="evenodd"
+ />
+ </svg>
+);
+
+export default function TabListTabsWithIcons() {
+ const [value, setValue] = useState('home');
+ return (
+ <XDSTabList value={value} onChange={setValue}>
+ <XDSTab value="home" label="Home" icon={HomeIcon} />
+ <XDSTab value="settings" label="Settings" icon={CogIcon} />
+ </XDSTabList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListTabsWithMenu.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListTabsWithMenu.doc.mjs
new file mode 100644
index 0000000000..a7ad2dbf9e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsWithMenu.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TabList — With Overflow Menu',
+ description:
+ 'Tab list with a dropdown menu for additional items that do not fit inline.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TabList', 'Tab', 'TabMenu'],
+};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListTabsWithMenu.tsx b/packages/cli/templates/blocks/components/TabList/TabListTabsWithMenu.tsx
new file mode 100644
index 0000000000..f6f56f45ff
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TabList/TabListTabsWithMenu.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTabList, XDSTab, XDSTabMenu} from '@xds/core/TabList';
+
+export default function TabListTabsWithMenu() {
+ const [value, setValue] = useState('home');
+ return (
+ <XDSTabList value={value} onChange={setValue}>
+ <XDSTab value="home" label="Home" />
+ <XDSTab value="projects" label="Projects" />
+ <XDSTabMenu
+ label="More"
+ options={[
+ {value: 'analytics', label: 'Analytics'},
+ {value: 'reports', label: 'Reports'},
+ {value: 'billing', label: 'Billing'},
+ ]}
+ />
+ </XDSTabList>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithBottomDivider.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListWithBottomDivider.doc.mjs
deleted file mode 100644
index 615fb1781d..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithBottomDivider.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TabList — With bottom divider',
- description: 'With bottom divider',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['TabList'],
-};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithBottomDivider.tsx b/packages/cli/templates/blocks/components/TabList/TabListWithBottomDivider.tsx
deleted file mode 100644
index 52093366c9..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithBottomDivider.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTab, XDSTabList} from '@xds/core/TabList';
-
-export default function TabListWithBottomDivider() {
- const [activeTab, setActiveTab] = useState('home');
-
- return (
- <XDSTabList value={activeTab} onChange={setActiveTab} hasDivider>
- <XDSTab value="home" label="Home" />
- <XDSTab value="settings" label="Settings" />
- </XDSTabList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithIcons.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListWithIcons.doc.mjs
deleted file mode 100644
index fcf6828d61..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithIcons.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TabList — With icons',
- description: 'With icons',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['TabList'],
-};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithIcons.tsx b/packages/cli/templates/blocks/components/TabList/TabListWithIcons.tsx
deleted file mode 100644
index dd8e956311..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithIcons.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTab, XDSTabList} from '@xds/core/TabList';
-
-function HomeIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function HomeFilledIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function CogIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function TabListWithIcons() {
- const [activeTab, setActiveTab] = useState('home');
-
- return (
- <XDSTabList value={activeTab} onChange={setActiveTab}>
- <XDSTab value="home" label="Home" icon={<HomeIcon />} selectedIcon={<HomeFilledIcon />} />
- <XDSTab value="settings" label="Settings" icon={<CogIcon />} />
- </XDSTabList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithLinks.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListWithLinks.doc.mjs
deleted file mode 100644
index 193475b700..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithLinks.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TabList — With links',
- description: 'With links',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['TabList'],
-};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithLinks.tsx b/packages/cli/templates/blocks/components/TabList/TabListWithLinks.tsx
deleted file mode 100644
index faf83c5cfc..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithLinks.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTab, XDSTabList} from '@xds/core/TabList';
-
-export default function TabListWithLinks() {
- const [activeTab, setActiveTab] = useState('home');
-
- return (
- <XDSTabList value={activeTab} onChange={setActiveTab}>
- <XDSTab value="home" label="Home" href="/home" />
- <XDSTab value="settings" label="Settings" href="/settings" />
- </XDSTabList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithOverflowMenu.doc.mjs b/packages/cli/templates/blocks/components/TabList/TabListWithOverflowMenu.doc.mjs
deleted file mode 100644
index 2730971096..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithOverflowMenu.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TabList — With overflow menu',
- description: 'With overflow menu',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['TabList'],
-};
diff --git a/packages/cli/templates/blocks/components/TabList/TabListWithOverflowMenu.tsx b/packages/cli/templates/blocks/components/TabList/TabListWithOverflowMenu.tsx
deleted file mode 100644
index 6a92c4fbaf..0000000000
--- a/packages/cli/templates/blocks/components/TabList/TabListWithOverflowMenu.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTab, XDSTabList, XDSTabMenu} from '@xds/core/TabList';
-
-function ChartBarIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function DocumentTextIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function TabListWithOverflowMenu() {
- const [activeTab, setActiveTab] = useState('home');
-
- return (
- <XDSTabList value={activeTab} onChange={setActiveTab}>
- <XDSTab value="home" label="Home" />
- <XDSTab value="settings" label="Settings" />
- <XDSTabMenu
- label="More"
- options={[
- {value: 'analytics', label: 'Analytics', icon: ChartBarIcon},
- {value: 'reports', label: 'Reports', icon: DocumentTextIcon},
- ]}
- />
- </XDSTabList>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableAutogeneratedColumns.tsx b/packages/cli/templates/blocks/components/Table/TableAutogeneratedColumns.tsx
deleted file mode 100644
index c849963652..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableAutogeneratedColumns.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import {XDSTable} from '@xds/core/Table';
-
-const users = [
- {name: 'Alice', email: '[email protected]', role: 'Admin'},
- {name: 'Bob', email: '[email protected]', role: 'User'},
-];
-
-export default function TableAutogeneratedColumns() {
- return (
- <XDSTable data={users} isStriped />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableBasicDatadrivenTable.doc.mjs b/packages/cli/templates/blocks/components/Table/TableBasicDatadrivenTable.doc.mjs
deleted file mode 100644
index d190c7f2d7..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableBasicDatadrivenTable.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Table — Basic data-driven table',
- description: 'Basic data-driven table',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Avatar', 'Badge', 'Layout', 'StatusDot', 'Table', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Table/TableBasicDatadrivenTable.tsx b/packages/cli/templates/blocks/components/Table/TableBasicDatadrivenTable.tsx
deleted file mode 100644
index a4b4575ba9..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableBasicDatadrivenTable.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-'use client';
-
-import {XDSAvatar} from '@xds/core/Avatar';
-import {XDSBadge} from '@xds/core/Badge';
-import {XDSHStack, XDSVStack} from '@xds/core/Layout';
-import {XDSStatusDot} from '@xds/core/StatusDot';
-import {XDSTable, pixel} from '@xds/core/Table';
-import {XDSText} from '@xds/core/Text';
-
-const users = [
- {name: 'Alice', email: '[email protected]', isActive: true, role: 'Admin'},
- {name: 'Bob', email: '[email protected]', isActive: false, role: 'User'},
-];
-
-export default function TableBasicDatadrivenTable() {
- return (
- <XDSTable
- data={users}
- columns={[
- {
- key: 'name',
- header: 'Name',
- renderCell: user => (
- <XDSHStack gap={2} vAlign="center">
- <XDSAvatar name={user.name} size="small" />
- <XDSVStack gap={1}>
- <XDSText type="body" weight="semibold">
- {user.name}
- </XDSText>
- <XDSText type="supporting" color="secondary">
- {user.email}
- </XDSText>
- </XDSVStack>
- </XDSHStack>
- ),
- },
- {
- key: 'status',
- header: 'Status',
- width: pixel(140),
- renderCell: user => (
- <XDSHStack gap={2} vAlign="center">
- <XDSStatusDot variant={user.isActive ? 'positive' : 'negative'} label={user.isActive ? 'Active' : 'Inactive'} />
- <XDSBadge variant={user.isActive ? 'success' : 'error'} label={user.isActive ? 'Active' : 'Inactive'} />
- </XDSHStack>
- ),
- },
- {
- key: 'role',
- header: 'Role',
- renderCell: user => (
- <XDSText type="label" color="secondary">
- {user.role}
- </XDSText>
- ),
- },
- ]}
- density="balanced"
- dividers="rows"
- hasHover
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableAutogeneratedColumns.doc.mjs b/packages/cli/templates/blocks/components/Table/TableBasicTable.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/Table/TableAutogeneratedColumns.doc.mjs
rename to packages/cli/templates/blocks/components/Table/TableBasicTable.doc.mjs
index 07329b33cc..f9bac59370 100644
--- a/packages/cli/templates/blocks/components/Table/TableAutogeneratedColumns.doc.mjs
+++ b/packages/cli/templates/blocks/components/Table/TableBasicTable.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Table — Auto-generated columns',
- description: 'Auto-generated columns',
+ name: 'Table — Basic Data Table',
+ description:
+ 'Simple data-driven table with striped rows and hover highlighting.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Table'],
diff --git a/packages/cli/templates/blocks/components/Table/TableBasicTable.tsx b/packages/cli/templates/blocks/components/Table/TableBasicTable.tsx
new file mode 100644
index 0000000000..c6a24a6175
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableBasicTable.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import {XDSTable, proportional, pixel} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+
+interface User extends Record<string, unknown> {
+ id: string;
+ name: string;
+ email: string;
+ role: string;
+ age: number;
+}
+
+const users: User[] = [
+ {id: '1', name: 'Alice Johnson', email: '[email protected]', role: 'Engineer', age: 30},
+ {id: '2', name: 'Bob Smith', email: '[email protected]', role: 'Designer', age: 25},
+ {id: '3', name: 'Charlie Brown', email: '[email protected]', role: 'PM', age: 35},
+ {id: '4', name: 'Diana Prince', email: '[email protected]', role: 'Engineer', age: 28},
+ {id: '5', name: 'Eve Davis', email: '[email protected]', role: 'Designer', age: 32},
+];
+
+const columns: XDSTableColumn<User>[] = [
+ {key: 'name', header: 'Name'},
+ {key: 'email', header: 'Email', width: proportional(2)},
+ {key: 'role', header: 'Role'},
+ {key: 'age', header: 'Age', width: pixel(80)},
+];
+
+export default function TableBasicTable() {
+ return (
+ <XDSTable
+ data={users}
+ columns={columns}
+ idKey="id"
+ isStriped
+ hasHover
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Table/TableChildrenMode.tsx b/packages/cli/templates/blocks/components/Table/TableChildrenMode.tsx
deleted file mode 100644
index 98d8812b08..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableChildrenMode.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-'use client';
-
-import {XDSAvatar} from '@xds/core/Avatar';
-import {XDSBadge} from '@xds/core/Badge';
-import {XDSHStack} from '@xds/core/Layout';
-import {XDSTable, XDSTableCell, XDSTableRow} from '@xds/core/Table';
-import {XDSText} from '@xds/core/Text';
-
-export default function TableChildrenMode() {
- return (
- <XDSTable density="balanced" dividers="rows" isStriped hasHover>
- <XDSTableRow>
- <XDSTableCell>
- <XDSHStack gap={2} vAlign="center">
- <XDSAvatar name="Alice" size="small" />
- <XDSText type="body" weight="semibold">Alice</XDSText>
- </XDSHStack>
- </XDSTableCell>
- <XDSTableCell>
- <XDSBadge variant="success" label="Active" />
- </XDSTableCell>
- </XDSTableRow>
- </XDSTable>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableColumnAlignmentAndVerticalAlignment.tsx b/packages/cli/templates/blocks/components/Table/TableColumnAlignmentAndVerticalAlignment.tsx
deleted file mode 100644
index a93c69b020..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableColumnAlignmentAndVerticalAlignment.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client';
-
-import {XDSTable, pixel} from '@xds/core/Table';
-
-const transactions = [
- {description: 'Payment', quantity: 1, amount: 100},
- {description: 'Refund', quantity: 2, amount: -25},
-];
-
-export default function TableColumnAlignmentAndVerticalAlignment() {
- return (
- <XDSTable
- data={transactions}
- columns={[
- { key: 'description', header: 'Description' },
- { key: 'quantity', header: 'Qty', align: 'center', width: pixel(80) },
- { key: 'amount', header: 'Amount', align: 'end', width: pixel(120) },
- ]}
- verticalAlign="top"
- density="balanced"
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableColumnResizePlugin.tsx b/packages/cli/templates/blocks/components/Table/TableColumnResizePlugin.tsx
deleted file mode 100644
index 97d21d80ac..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableColumnResizePlugin.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTable, useXDSTableColumnResize} from '@xds/core/Table';
-
-const users = [
- {id: '1', name: 'Alice', email: '[email protected]'},
- {id: '2', name: 'Bob', email: '[email protected]'},
-];
-const columns = [
- {key: 'name', header: 'Name'},
- {key: 'email', header: 'Email'},
-];
-
-export default function TableColumnResizePlugin() {
- const [columnWidths, setColumnWidths] = useState<Record<string, number>>({});
- const resizePlugin = useXDSTableColumnResize({
- columnWidths,
- columns,
- onColumnResizeEnd: (updates) => setColumnWidths(prev => ({...prev, ...updates})),
- });
-
- return (
- <XDSTable
- data={users}
- columns={columns}
- idKey="id"
- plugins={{columnResize: resizePlugin}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableCustomPlugin.tsx b/packages/cli/templates/blocks/components/Table/TableCustomPlugin.tsx
deleted file mode 100644
index aca1c7cace..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableCustomPlugin.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-'use client';
-
-import {XDSTable, type TablePlugin} from '@xds/core/Table';
-
-type User = {name: string; isActive: boolean};
-const activeRowStyle = {};
-const users: User[] = [
- {name: 'Alice', isActive: true},
- {name: 'Bob', isActive: false},
-];
-
-export default function TableCustomPlugin() {
- const highlightPlugin: TablePlugin<User> = {
- transformBodyRow(props, item) {
- if (item.isActive) {
- return {...props, styles: [...props.styles, activeRowStyle]};
- }
- return props;
- },
- };
-
- return (
- <XDSTable data={users} plugins={{highlight: highlightPlugin}} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableFilterableTable.doc.mjs b/packages/cli/templates/blocks/components/Table/TableFilterableTable.doc.mjs
new file mode 100644
index 0000000000..9d4a54c44e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableFilterableTable.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Table — Column Filtering',
+ description:
+ 'Table with per-column filtering using text and enum filter types.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Table', 'PowerSearch'],
+};
diff --git a/packages/cli/templates/blocks/components/Table/TableFilterableTable.tsx b/packages/cli/templates/blocks/components/Table/TableFilterableTable.tsx
new file mode 100644
index 0000000000..b848131d29
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableFilterableTable.tsx
@@ -0,0 +1,75 @@
+'use client';
+
+import {
+ XDSTable,
+ useXDSTableFiltering,
+ useXDSTableFilterState,
+ toSearchFilters,
+} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+import {usePowerSearchConfig} from '@xds/core/PowerSearch';
+import type {PowerSearchFilter} from '@xds/core/PowerSearch';
+
+interface Employee extends Record<string, unknown> {
+ id: string;
+ name: string;
+ email: string;
+ role: string;
+ department: string;
+}
+
+const employees: Employee[] = [
+ {id: '1', name: 'Alice', email: '[email protected]', role: 'Engineer', department: 'Platform'},
+ {id: '2', name: 'Bob', email: '[email protected]', role: 'Designer', department: 'Product'},
+ {id: '3', name: 'Charlie', email: '[email protected]', role: 'Manager', department: 'Platform'},
+ {id: '4', name: 'Diana', email: '[email protected]', role: 'Engineer', department: 'Infrastructure'},
+ {id: '5', name: 'Eve', email: '[email protected]', role: 'Admin', department: 'Operations'},
+];
+
+const fieldDefs = [
+ {key: 'name', type: 'string', label: 'Name'},
+ {key: 'email', type: 'string', label: 'Email'},
+ {
+ key: 'role',
+ type: 'enum',
+ label: 'Role',
+ enumValues: [
+ {value: 'Engineer', label: 'Engineer'},
+ {value: 'Designer', label: 'Designer'},
+ {value: 'Manager', label: 'Manager'},
+ {value: 'Admin', label: 'Admin'},
+ ],
+ },
+] as const;
+
+const columns: XDSTableColumn<Employee>[] = [
+ {key: 'name', header: 'Name', filter: 'name'},
+ {key: 'email', header: 'Email', filter: 'email'},
+ {key: 'role', header: 'Role', filter: 'role'},
+ {key: 'department', header: 'Department'},
+];
+
+export default function TableFilterableTable() {
+ const {config, applyFilters} = usePowerSearchConfig(fieldDefs);
+ const {filters, onFilterChange} = useXDSTableFilterState();
+
+ const filterPlugin = useXDSTableFiltering<Employee>({
+ filters,
+ onFilterChange,
+ searchConfig: config,
+ });
+
+ const data = applyFilters(
+ toSearchFilters(filters, columns, config) as PowerSearchFilter[],
+ employees,
+ );
+
+ return (
+ <XDSTable
+ data={data}
+ columns={columns}
+ idKey="id"
+ plugins={{filter: filterPlugin}}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Table/TableInCard.doc.mjs b/packages/cli/templates/blocks/components/Table/TableInCard.doc.mjs
new file mode 100644
index 0000000000..537eb4e1a5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableInCard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Table — In Card',
+ description:
+ 'Table composed inside a card with a heading, demonstrating container bleed alignment.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Table', 'Card', 'Layout', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Table/TableInCard.tsx b/packages/cli/templates/blocks/components/Table/TableInCard.tsx
new file mode 100644
index 0000000000..a950f6d74a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableInCard.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {XDSTable} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+import {XDSCard} from '@xds/core/Card';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSHeading} from '@xds/core/Text';
+
+interface User extends Record<string, unknown> {
+ id: string;
+ name: string;
+ role: string;
+ email: string;
+}
+
+const users: User[] = [
+ {id: '1', name: 'Alice Johnson', role: 'Engineer', email: '[email protected]'},
+ {id: '2', name: 'Bob Smith', role: 'Designer', email: '[email protected]'},
+ {id: '3', name: 'Charlie Brown', role: 'PM', email: '[email protected]'},
+ {id: '4', name: 'Diana Prince', role: 'Engineer', email: '[email protected]'},
+];
+
+const columns: XDSTableColumn<User>[] = [
+ {key: 'name', header: 'Name'},
+ {key: 'role', header: 'Role'},
+ {key: 'email', header: 'Email'},
+];
+
+export default function TableInCard() {
+ return (
+ <XDSCard width={520}>
+ <XDSVStack gap={3}>
+ <XDSHeading level={3}>Team Members</XDSHeading>
+ <XDSTable data={users} columns={columns} idKey="id" hasHover />
+ </XDSVStack>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Table/TableColumnResizePlugin.doc.mjs b/packages/cli/templates/blocks/components/Table/TablePaginatedTable.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/Table/TableColumnResizePlugin.doc.mjs
rename to packages/cli/templates/blocks/components/Table/TablePaginatedTable.doc.mjs
index a77217c2a8..0b1c6b4393 100644
--- a/packages/cli/templates/blocks/components/Table/TableColumnResizePlugin.doc.mjs
+++ b/packages/cli/templates/blocks/components/Table/TablePaginatedTable.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Table — Column resize plugin',
- description: 'Column resize plugin',
+ name: 'Table — Paginated Data',
+ description:
+ 'Paginated data table navigating through a larger dataset page by page.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Table'],
diff --git a/packages/cli/templates/blocks/components/Table/TablePaginatedTable.tsx b/packages/cli/templates/blocks/components/Table/TablePaginatedTable.tsx
new file mode 100644
index 0000000000..246aae6289
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TablePaginatedTable.tsx
@@ -0,0 +1,46 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTable, useXDSTablePagination, paginateData} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+
+interface User extends Record<string, unknown> {
+ id: string;
+ name: string;
+ email: string;
+ role: string;
+}
+
+const users: User[] = Array.from({length: 50}, (_, i) => ({
+ id: String(i + 1),
+ name: `User ${i + 1}`,
+ email: `user${i + 1}@example.com`,
+ role: ['Engineer', 'Designer', 'Manager', 'Admin', 'Analyst'][i % 5],
+}));
+
+const columns: XDSTableColumn<User>[] = [
+ {key: 'name', header: 'Name'},
+ {key: 'email', header: 'Email'},
+ {key: 'role', header: 'Role'},
+];
+
+export default function TablePaginatedTable() {
+ const [page, setPage] = useState(1);
+ const pageSize = 10;
+
+ const plugin = useXDSTablePagination<User>({
+ page,
+ onPageChange: setPage,
+ totalItems: users.length,
+ pageSize,
+ });
+
+ return (
+ <XDSTable
+ data={paginateData(users, page, pageSize)}
+ columns={columns}
+ idKey="id"
+ plugins={{pagination: plugin}}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Table/TableRichCellContentWithRenderCell.doc.mjs b/packages/cli/templates/blocks/components/Table/TableRichCellContentWithRenderCell.doc.mjs
deleted file mode 100644
index c2335c1aba..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableRichCellContentWithRenderCell.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Table — Rich cell content with renderCell',
- description: 'Rich cell content with renderCell',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Badge', 'Layout', 'Table', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Table/TableRichCellContentWithRenderCell.tsx b/packages/cli/templates/blocks/components/Table/TableRichCellContentWithRenderCell.tsx
deleted file mode 100644
index 42fbe8a9c8..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableRichCellContentWithRenderCell.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-'use client';
-
-import {XDSBadge} from '@xds/core/Badge';
-import {XDSVStack} from '@xds/core/Layout';
-import {XDSTable} from '@xds/core/Table';
-import {XDSText} from '@xds/core/Text';
-
-const transactions = [
- {description: 'Payment', amount: 100, date: '2024-01-15', status: 'completed'},
- {description: 'Refund', amount: -25, date: '2024-01-16', status: 'pending'},
-];
-
-export default function TableRichCellContentWithRenderCell() {
- return (
- <XDSTable
- data={transactions}
- columns={[
- {
- key: 'description',
- header: 'Transaction',
- renderCell: tx => (
- <XDSVStack gap={1}>
- <XDSText type="body" weight="semibold">{tx.description}</XDSText>
- <XDSText type="supporting" color="secondary">
- {tx.date}
- </XDSText>
- </XDSVStack>
- ),
- },
- {
- key: 'amount',
- header: 'Amount',
- renderCell: tx => (
- <XDSText
- type="body"
- weight="semibold">
- {tx.amount > 0 ? '+' : ''}
- {tx.amount.toFixed(2)}
- </XDSText>
- ),
- },
- {
- key: 'status',
- header: 'Status',
- renderCell: tx => (
- <XDSBadge
- variant={
- tx.status === 'completed'
- ? 'success'
- : tx.status === 'pending'
- ? 'warning'
- : 'error'
- }
- label={tx.status}
- />
- ),
- },
- ]}
- density="balanced"
- dividers="rows"
- hasHover
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableRichCellTable.doc.mjs b/packages/cli/templates/blocks/components/Table/TableRichCellTable.doc.mjs
new file mode 100644
index 0000000000..eb77531a94
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableRichCellTable.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Table — Rich Cell Content',
+ description:
+ 'Table with custom cell renderers including clickable emails and colored role badges.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Table'],
+};
diff --git a/packages/cli/templates/blocks/components/Table/TableRichCellTable.tsx b/packages/cli/templates/blocks/components/Table/TableRichCellTable.tsx
new file mode 100644
index 0000000000..42b135fef8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableRichCellTable.tsx
@@ -0,0 +1,67 @@
+'use client';
+
+import {XDSTable, proportional, pixel} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+import {
+ colorDefaults,
+ spacingDefaults,
+ radiusDefaults,
+ textSizeDefaults,
+} from '@xds/core/theme';
+
+interface User extends Record<string, unknown> {
+ id: string;
+ name: string;
+ email: string;
+ role: string;
+ age: number;
+}
+
+const users: User[] = [
+ {id: '1', name: 'Alice Johnson', email: '[email protected]', role: 'Engineer', age: 30},
+ {id: '2', name: 'Bob Smith', email: '[email protected]', role: 'Designer', age: 25},
+ {id: '3', name: 'Charlie Brown', email: '[email protected]', role: 'PM', age: 35},
+ {id: '4', name: 'Diana Prince', email: '[email protected]', role: 'Engineer', age: 28},
+ {id: '5', name: 'Eve Davis', email: '[email protected]', role: 'Designer', age: 32},
+];
+
+const columns: XDSTableColumn<User>[] = [
+ {key: 'name', header: 'Name'},
+ {
+ key: 'email',
+ header: 'Email',
+ width: proportional(2),
+ renderCell: (item) => (
+ <a href={`mailto:${item.email}`} style={{color: 'inherit'}}>
+ {item.email}
+ </a>
+ ),
+ },
+ {
+ key: 'role',
+ header: 'Role',
+ renderCell: (item) => (
+ <span
+ style={{
+ padding: `${spacingDefaults['--spacing-0-5']} ${spacingDefaults['--spacing-2']}`,
+ borderRadius: radiusDefaults['--radius-inner'],
+ fontSize: textSizeDefaults['--font-size-xs'],
+ backgroundColor:
+ item.role === 'Engineer'
+ ? colorDefaults['--color-background-blue']
+ : colorDefaults['--color-background-purple'],
+ color:
+ item.role === 'Engineer'
+ ? colorDefaults['--color-text-blue']
+ : colorDefaults['--color-text-purple'],
+ }}>
+ {item.role}
+ </span>
+ ),
+ },
+ {key: 'age', header: 'Age', width: pixel(80)},
+];
+
+export default function TableRichCellTable() {
+ return <XDSTable data={users} columns={columns} idKey="id" hasHover />;
+}
diff --git a/packages/cli/templates/blocks/components/Table/TableColumnAlignmentAndVerticalAlignment.doc.mjs b/packages/cli/templates/blocks/components/Table/TableSelectableTable.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/Table/TableColumnAlignmentAndVerticalAlignment.doc.mjs
rename to packages/cli/templates/blocks/components/Table/TableSelectableTable.doc.mjs
index 0a8b373615..5a5ccfdf45 100644
--- a/packages/cli/templates/blocks/components/Table/TableColumnAlignmentAndVerticalAlignment.doc.mjs
+++ b/packages/cli/templates/blocks/components/Table/TableSelectableTable.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Table — Column alignment and vertical alignment',
- description: 'Column alignment and vertical alignment',
+ name: 'Table — Row Selection',
+ description:
+ 'Table with row selection checkboxes and a select-all header checkbox.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Table'],
diff --git a/packages/cli/templates/blocks/components/Table/TableSelectableTable.tsx b/packages/cli/templates/blocks/components/Table/TableSelectableTable.tsx
new file mode 100644
index 0000000000..6463eaeff6
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableSelectableTable.tsx
@@ -0,0 +1,51 @@
+'use client';
+
+import {useState} from 'react';
+import {
+ XDSTable,
+ useXDSTableSelection,
+ useXDSTableSelectionState,
+} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+
+interface User extends Record<string, unknown> {
+ id: string;
+ name: string;
+ email: string;
+ role: string;
+}
+
+const users: User[] = [
+ {id: '1', name: 'Alice', email: '[email protected]', role: 'Engineer'},
+ {id: '2', name: 'Bob', email: '[email protected]', role: 'Designer'},
+ {id: '3', name: 'Charlie', email: '[email protected]', role: 'Manager'},
+ {id: '4', name: 'Diana', email: '[email protected]', role: 'Engineer'},
+ {id: '5', name: 'Eve', email: '[email protected]', role: 'Admin'},
+];
+
+const columns: XDSTableColumn<User>[] = [
+ {key: 'name', header: 'Name'},
+ {key: 'email', header: 'Email'},
+ {key: 'role', header: 'Role'},
+];
+
+export default function TableSelectableTable() {
+ const [selectedKeys, setSelectedKeys] = useState<Set<string>>(new Set());
+
+ const {selectionConfig} = useXDSTableSelectionState<User>({
+ data: users,
+ idKey: 'id',
+ selectedKeys,
+ setSelectedKeys,
+ });
+ const selectionPlugin = useXDSTableSelection<User>(selectionConfig);
+
+ return (
+ <XDSTable
+ data={users}
+ columns={columns}
+ idKey="id"
+ plugins={{selection: selectionPlugin}}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Table/TableSelectionPlugin.doc.mjs b/packages/cli/templates/blocks/components/Table/TableSelectionPlugin.doc.mjs
deleted file mode 100644
index 67121cc527..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableSelectionPlugin.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Table — Selection plugin',
- description: 'Selection plugin',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Table'],
-};
diff --git a/packages/cli/templates/blocks/components/Table/TableSelectionPlugin.tsx b/packages/cli/templates/blocks/components/Table/TableSelectionPlugin.tsx
deleted file mode 100644
index 177d09b5a4..0000000000
--- a/packages/cli/templates/blocks/components/Table/TableSelectionPlugin.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTable, useXDSTableSelection, useXDSTableSelectionState} from '@xds/core/Table';
-
-type User = {id: string; name: string; email: string};
-const users: User[] = [
- {id: '1', name: 'Alice', email: '[email protected]'},
- {id: '2', name: 'Bob', email: '[email protected]'},
-];
-const columns = [
- {key: 'name', header: 'Name'},
- {key: 'email', header: 'Email'},
-];
-
-export default function TableSelectionPlugin() {
- const [selectedKeys, setSelectedKeys] = useState<Set<string>>(new Set());
-
- const {selectionConfig} = useXDSTableSelectionState<User>({
- data: users,
- idKey: 'id',
- selectedKeys,
- setSelectedKeys,
- });
- const selectionPlugin = useXDSTableSelection<User>(selectionConfig);
-
- return (
- <XDSTable
- data={users}
- columns={columns}
- plugins={{selection: selectionPlugin}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Table/TableCustomPlugin.doc.mjs b/packages/cli/templates/blocks/components/Table/TableSortableTable.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/Table/TableCustomPlugin.doc.mjs
rename to packages/cli/templates/blocks/components/Table/TableSortableTable.doc.mjs
index 4dfa9d64bb..cdc3d27256 100644
--- a/packages/cli/templates/blocks/components/Table/TableCustomPlugin.doc.mjs
+++ b/packages/cli/templates/blocks/components/Table/TableSortableTable.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Table — Custom plugin',
- description: 'Custom plugin',
+ name: 'Table — Sortable Columns',
+ description:
+ 'Table with sortable columns, click headers to sort ascending or descending.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Table'],
diff --git a/packages/cli/templates/blocks/components/Table/TableSortableTable.tsx b/packages/cli/templates/blocks/components/Table/TableSortableTable.tsx
new file mode 100644
index 0000000000..3db20ee459
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Table/TableSortableTable.tsx
@@ -0,0 +1,49 @@
+'use client';
+
+import {
+ XDSTable,
+ useXDSTableSortable,
+ useXDSTableSortableState,
+} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+
+interface Employee extends Record<string, unknown> {
+ id: string;
+ name: string;
+ email: string;
+ role: string;
+ age: number;
+}
+
+const employees: Employee[] = [
+ {id: '1', name: 'Alice', email: '[email protected]', role: 'Engineer', age: 32},
+ {id: '2', name: 'Bob', email: '[email protected]', role: 'Designer', age: 28},
+ {id: '3', name: 'Charlie', email: '[email protected]', role: 'Manager', age: 45},
+ {id: '4', name: 'Diana', email: '[email protected]', role: 'Engineer', age: 37},
+ {id: '5', name: 'Eve', email: '[email protected]', role: 'Admin', age: 29},
+];
+
+const columns: XDSTableColumn<Employee>[] = [
+ {key: 'name', header: 'Name', sortable: true},
+ {key: 'email', header: 'Email', sortable: true},
+ {key: 'role', header: 'Role', sortable: true},
+ {key: 'age', header: 'Age', sortable: true},
+];
+
+export default function TableSortableTable() {
+ const {sortedData, sortConfig} = useXDSTableSortableState<Employee>({
+ data: employees,
+ defaultSort: [{sortKey: 'name', direction: 'ascending'}],
+ });
+
+ const sortablePlugin = useXDSTableSortable<Employee>(sortConfig);
+
+ return (
+ <XDSTable
+ data={sortedData}
+ columns={columns}
+ idKey="id"
+ plugins={{sortable: sortablePlugin}}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Text/TextBodyText.doc.mjs b/packages/cli/templates/blocks/components/Text/TextBodyText.doc.mjs
deleted file mode 100644
index 9ee58a18a9..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextBodyText.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Text — Body text',
- description: 'Body text',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Text/TextBodyText.tsx b/packages/cli/templates/blocks/components/Text/TextBodyText.tsx
deleted file mode 100644
index c8f78ec3bc..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextBodyText.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSText} from '@xds/core/Text';
-
-export default function TextBodyText() {
- return (
- <XDSText type="body">Body text content.</XDSText>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Text/TextFontWrapperForNativeHTML.doc.mjs b/packages/cli/templates/blocks/components/Text/TextFontWrapperForNativeHTML.doc.mjs
deleted file mode 100644
index f46c59b3eb..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextFontWrapperForNativeHTML.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Text — Font wrapper for native HTML',
- description: 'Font wrapper for native HTML',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: [],
-};
diff --git a/packages/cli/templates/blocks/components/Text/TextFontWrapperForNativeHTML.tsx b/packages/cli/templates/blocks/components/Text/TextFontWrapperForNativeHTML.tsx
deleted file mode 100644
index 17fe8f7089..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextFontWrapperForNativeHTML.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-
-const markdownContent = '# Hello\n\nSome **markdown** content.';
-
-export default function TextFontWrapperForNativeHTML() {
- return (
- <div className="xds-typography">
- <article dangerouslySetInnerHTML={{__html: markdownContent}} />
- </div>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Text/TextHeading.doc.mjs b/packages/cli/templates/blocks/components/Text/TextHeading.doc.mjs
deleted file mode 100644
index 3da487ea24..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextHeading.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Text — Heading',
- description: 'Heading',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Text/TextHeading.tsx b/packages/cli/templates/blocks/components/Text/TextHeading.tsx
deleted file mode 100644
index bc43b10535..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextHeading.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSHeading} from '@xds/core/Text';
-
-export default function TextHeading() {
- return (
- <XDSHeading level={1}>Page Title</XDSHeading>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Text/TextHierarchy.doc.mjs b/packages/cli/templates/blocks/components/Text/TextHierarchy.doc.mjs
new file mode 100644
index 0000000000..acde80767c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextHierarchy.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Text — Content Hierarchy',
+ description:
+ 'Form-like content sections using label, body, and supporting text types for visual hierarchy.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Text/TextHierarchy.tsx b/packages/cli/templates/blocks/components/Text/TextHierarchy.tsx
new file mode 100644
index 0000000000..212f9c7d9a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextHierarchy.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import {XDSText} from '@xds/core/Text';
+
+export default function TextHierarchy() {
+ return (
+ <div
+ style={{
+ maxWidth: 300,
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 16,
+ }}>
+ <div>
+ <XDSText type="label" display="block">
+ Section title as label
+ </XDSText>
+ <XDSText type="body" display="block">
+ Body text provides the main content or instructions for this section.
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ Supporting text adds extra context or constraints.
+ </XDSText>
+ </div>
+ <div>
+ <XDSText type="label" display="block">
+ Another section
+ </XDSText>
+ <XDSText type="body" display="block">
+ These text types create a natural visual hierarchy without any
+ additional styling.
+ </XDSText>
+ <XDSText type="supporting" color="active" display="block">
+ Active supporting text draws attention to important details.
+ </XDSText>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Text/TextMetricsDisplay.doc.mjs b/packages/cli/templates/blocks/components/Text/TextMetricsDisplay.doc.mjs
new file mode 100644
index 0000000000..c11097ad6e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextMetricsDisplay.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Text — Metrics Display',
+ description:
+ 'Dashboard metrics using tabular numbers for consistent alignment across values.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Text/TextMetricsDisplay.tsx b/packages/cli/templates/blocks/components/Text/TextMetricsDisplay.tsx
new file mode 100644
index 0000000000..551be01c91
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextMetricsDisplay.tsx
@@ -0,0 +1,34 @@
+'use client';
+
+import {XDSText} from '@xds/core/Text';
+
+export default function TextMetricsDisplay() {
+ return (
+ <div style={{display: 'flex', gap: 24}}>
+ <div style={{textAlign: 'start'}}>
+ <XDSText type="body" color="secondary" display="block">
+ Revenue
+ </XDSText>
+ <XDSText type="large" weight="bold" hasTabularNumbers>
+ $1,234,567.89
+ </XDSText>
+ </div>
+ <div style={{textAlign: 'start'}}>
+ <XDSText type="body" color="secondary" display="block">
+ Users
+ </XDSText>
+ <XDSText type="large" weight="bold" hasTabularNumbers>
+ 12,345
+ </XDSText>
+ </div>
+ <div style={{textAlign: 'start'}}>
+ <XDSText type="body" color="secondary" display="block">
+ Conversion
+ </XDSText>
+ <XDSText type="large" weight="bold" color="active" hasTabularNumbers>
+ 23.4%
+ </XDSText>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Text/TextProductCard.doc.mjs b/packages/cli/templates/blocks/components/Text/TextProductCard.doc.mjs
new file mode 100644
index 0000000000..f5c393ca34
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextProductCard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Text — Product Card',
+ description:
+ 'Card-like layout using text hierarchy with label, truncated body, and supporting timestamp.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Text/TextProductCard.tsx b/packages/cli/templates/blocks/components/Text/TextProductCard.tsx
new file mode 100644
index 0000000000..c8e8244814
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextProductCard.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {XDSText} from '@xds/core/Text';
+
+export default function TextProductCard() {
+ return (
+ <div
+ style={{
+ maxWidth: 300,
+ padding: 16,
+ borderRadius: 8,
+ border: '1px solid #e0e0e0',
+ boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
+ }}>
+ <XDSText type="label" display="block">
+ Product Name
+ </XDSText>
+ <XDSText type="body" maxLines={2} display="block">
+ This is a product description that might be quite long and needs to be
+ truncated after two lines to keep the card compact.
+ </XDSText>
+ <XDSText type="supporting" display="block">
+ Updated 5 minutes ago
+ </XDSText>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Text/TextSupportingText.doc.mjs b/packages/cli/templates/blocks/components/Text/TextSupportingText.doc.mjs
deleted file mode 100644
index 64484384ba..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextSupportingText.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Text — Supporting text',
- description: 'Supporting text',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Text/TextSupportingText.tsx b/packages/cli/templates/blocks/components/Text/TextSupportingText.tsx
deleted file mode 100644
index d35ea8845d..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextSupportingText.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSText} from '@xds/core/Text';
-
-export default function TextSupportingText() {
- return (
- <XDSText type="supporting">Helper text beneath a field.</XDSText>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Text/TextTruncatedContent.doc.mjs b/packages/cli/templates/blocks/components/Text/TextTruncatedContent.doc.mjs
new file mode 100644
index 0000000000..2ee151e12b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextTruncatedContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Text — Truncated Content',
+ description:
+ 'Text truncation with configurable line limits and automatic ellipsis tooltips.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Text/TextTruncatedContent.tsx b/packages/cli/templates/blocks/components/Text/TextTruncatedContent.tsx
new file mode 100644
index 0000000000..94da1d9ebf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Text/TextTruncatedContent.tsx
@@ -0,0 +1,50 @@
+'use client';
+
+import {XDSText} from '@xds/core/Text';
+
+export default function TextTruncatedContent() {
+ return (
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 16,
+ maxWidth: 300,
+ }}>
+ <div>
+ <XDSText type="label" display="block">
+ 1 Line:
+ </XDSText>
+ <div style={{border: '1px solid #ccc', padding: 8}}>
+ <XDSText type="body" maxLines={1}>
+ This is a very long text that will be truncated to one line with
+ ellipsis.
+ </XDSText>
+ </div>
+ </div>
+ <div>
+ <XDSText type="label" display="block">
+ 2 Lines:
+ </XDSText>
+ <div style={{border: '1px solid #ccc', padding: 8}}>
+ <XDSText type="body" maxLines={2}>
+ This is a very long text that will be truncated to two lines. The
+ second line will end with an ellipsis if the content is too long.
+ </XDSText>
+ </div>
+ </div>
+ <div>
+ <XDSText type="label" display="block">
+ 3 Lines:
+ </XDSText>
+ <div style={{border: '1px solid #ccc', padding: 8}}>
+ <XDSText type="body" maxLines={3}>
+ This is a very long text that will be truncated to three lines. It
+ allows for more content to be shown but still limits the vertical
+ space. The third line will end with an ellipsis.
+ </XDSText>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Text/TextTruncatedTextWithTooltip.doc.mjs b/packages/cli/templates/blocks/components/Text/TextTruncatedTextWithTooltip.doc.mjs
deleted file mode 100644
index b7c827b937..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextTruncatedTextWithTooltip.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Text — Truncated text with tooltip',
- description: 'Truncated text with tooltip',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Text/TextTruncatedTextWithTooltip.tsx b/packages/cli/templates/blocks/components/Text/TextTruncatedTextWithTooltip.tsx
deleted file mode 100644
index 5d24285ab9..0000000000
--- a/packages/cli/templates/blocks/components/Text/TextTruncatedTextWithTooltip.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSText} from '@xds/core/Text';
-
-export default function TextTruncatedTextWithTooltip() {
- return (
- <XDSText type="body" maxLines={2}>Very long text that will be clamped after two lines and show a tooltip on hover.</XDSText>
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaBasic.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaBasic.tsx
deleted file mode 100644
index 328c5b79f5..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaBasic.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextArea} from '@xds/core/TextArea';
-
-export default function TextAreaBasic() {
- const [description, setDescription] = useState('');
-
- return (
- <XDSTextArea label="Description" value={description} onChange={setDescription} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaBasic.doc.mjs b/packages/cli/templates/blocks/components/TextArea/TextAreaBasicTextArea.doc.mjs
similarity index 69%
rename from packages/cli/templates/blocks/components/TextArea/TextAreaBasic.doc.mjs
rename to packages/cli/templates/blocks/components/TextArea/TextAreaBasicTextArea.doc.mjs
index 64df387a16..40656405fc 100644
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/TextArea/TextAreaBasicTextArea.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'TextArea — Basic',
- description: 'Basic',
+ description:
+ 'Simple textarea with label and description for multi-line text entry.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextArea'],
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaBasicTextArea.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaBasicTextArea.tsx
new file mode 100644
index 0000000000..f36a2b1602
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TextArea/TextAreaBasicTextArea.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTextArea} from '@xds/core/TextArea';
+
+export default function TextAreaBasicTextArea() {
+ const [value, setValue] = useState('');
+ return (
+ <XDSTextArea
+ label="Bio"
+ description="Tell us about yourself in a few sentences."
+ value={value}
+ onChange={setValue}
+ placeholder="Write your bio here..."
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaDisabled.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaDisabled.tsx
deleted file mode 100644
index 834d54d991..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaDisabled.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSTextArea} from '@xds/core/TextArea';
-
-export default function TextAreaDisabled() {
- return (
- <XDSTextArea label="Read-only notes" isDisabled value="Cannot edit this" onChange={() => {}} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaErrorStatusWithMessage.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaErrorStatusWithMessage.tsx
deleted file mode 100644
index 09dd36d311..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaErrorStatusWithMessage.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextArea} from '@xds/core/TextArea';
-
-export default function TextAreaErrorStatusWithMessage() {
- const [feedback, setFeedback] = useState('');
-
- return (
- <XDSTextArea
- label="Feedback"
- isRequired
- value={feedback}
- onChange={setFeedback}
- status={{type: 'error', message: 'Feedback is required'}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaHiddenLabel.doc.mjs b/packages/cli/templates/blocks/components/TextArea/TextAreaHiddenLabel.doc.mjs
deleted file mode 100644
index 7879e7d068..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaHiddenLabel.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextArea — Hidden label',
- description: 'Hidden label',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextArea'],
-};
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaHiddenLabel.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaHiddenLabel.tsx
deleted file mode 100644
index 838ce41daf..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaHiddenLabel.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextArea} from '@xds/core/TextArea';
-
-export default function TextAreaHiddenLabel() {
- const [comments, setComments] = useState('');
-
- return (
- <XDSTextArea label="Comments" isLabelHidden value={comments} onChange={setComments} placeholder="Add a comment..." />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaDisabled.doc.mjs b/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCount.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/TextArea/TextAreaDisabled.doc.mjs
rename to packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCount.doc.mjs
index b85971bf3f..1914529d93 100644
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaDisabled.doc.mjs
+++ b/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCount.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TextArea — Disabled',
- description: 'Disabled',
+ name: 'TextArea — Character Count',
+ description:
+ 'Textarea with a maximum character limit and live counter display.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextArea'],
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCount.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCount.tsx
new file mode 100644
index 0000000000..5eb1f2ceaf
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCount.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTextArea} from '@xds/core/TextArea';
+
+export default function TextAreaWithCharacterCount() {
+ const [value, setValue] = useState('');
+ return (
+ <XDSTextArea
+ label="Bio"
+ value={value}
+ onChange={setValue}
+ placeholder="Tell us about yourself..."
+ maxLength={150}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCounter.doc.mjs b/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCounter.doc.mjs
deleted file mode 100644
index 9a98c296bd..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCounter.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextArea — With character counter',
- description: 'With character counter',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextArea'],
-};
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCounter.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCounter.tsx
deleted file mode 100644
index 3f098ffd7b..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaWithCharacterCounter.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextArea} from '@xds/core/TextArea';
-
-export default function TextAreaWithCharacterCounter() {
- const [summary, setSummary] = useState('');
-
- return (
- <XDSTextArea label="Summary" maxLength={280} value={summary} onChange={setSummary} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithDescriptionAndOptionalIndicator.doc.mjs b/packages/cli/templates/blocks/components/TextArea/TextAreaWithDescriptionAndOptionalIndicator.doc.mjs
deleted file mode 100644
index 3c4a4e3349..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaWithDescriptionAndOptionalIndicator.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextArea — With description and optional indicator',
- description: 'With description and optional indicator',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextArea'],
-};
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithDescriptionAndOptionalIndicator.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaWithDescriptionAndOptionalIndicator.tsx
deleted file mode 100644
index ce51c4bdab..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaWithDescriptionAndOptionalIndicator.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextArea} from '@xds/core/TextArea';
-
-export default function TextAreaWithDescriptionAndOptionalIndicator() {
- const [bio, setBio] = useState('');
-
- return (
- <XDSTextArea label="Bio" description="Tell us about yourself" isOptional value={bio} onChange={setBio} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithPlaceholderAndCustomRows.doc.mjs b/packages/cli/templates/blocks/components/TextArea/TextAreaWithPlaceholderAndCustomRows.doc.mjs
deleted file mode 100644
index 83b3add1d6..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaWithPlaceholderAndCustomRows.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextArea — With placeholder and custom rows',
- description: 'With placeholder and custom rows',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextArea'],
-};
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithPlaceholderAndCustomRows.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaWithPlaceholderAndCustomRows.tsx
deleted file mode 100644
index 8fb6fe1914..0000000000
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaWithPlaceholderAndCustomRows.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextArea} from '@xds/core/TextArea';
-
-export default function TextAreaWithPlaceholderAndCustomRows() {
- const [notes, setNotes] = useState('');
-
- return (
- <XDSTextArea label="Notes" rows={5} value={notes} onChange={setNotes} placeholder="Enter your notes..." />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaErrorStatusWithMessage.doc.mjs b/packages/cli/templates/blocks/components/TextArea/TextAreaWithValidation.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/TextArea/TextAreaErrorStatusWithMessage.doc.mjs
rename to packages/cli/templates/blocks/components/TextArea/TextAreaWithValidation.doc.mjs
index 64ef035ef6..610504e33f 100644
--- a/packages/cli/templates/blocks/components/TextArea/TextAreaErrorStatusWithMessage.doc.mjs
+++ b/packages/cli/templates/blocks/components/TextArea/TextAreaWithValidation.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TextArea — Error status with message',
- description: 'Error status with message',
+ name: 'TextArea — Dynamic Validation',
+ description:
+ 'Textarea with dynamic validation feedback that changes status as the user types.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextArea'],
diff --git a/packages/cli/templates/blocks/components/TextArea/TextAreaWithValidation.tsx b/packages/cli/templates/blocks/components/TextArea/TextAreaWithValidation.tsx
new file mode 100644
index 0000000000..5bbf172808
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TextArea/TextAreaWithValidation.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTextArea} from '@xds/core/TextArea';
+
+export default function TextAreaWithValidation() {
+ const [value, setValue] = useState('');
+ return (
+ <div style={{maxWidth: 400}}>
+ <XDSTextArea
+ label="Description"
+ description="Provide a comprehensive description of your project"
+ value={value}
+ onChange={setValue}
+ placeholder="Enter description..."
+ isRequired
+ status={
+ value.length > 0 && value.length < 20
+ ? {type: 'warning', message: 'Consider adding more detail'}
+ : value.length >= 20
+ ? {type: 'success', message: 'Description looks good!'}
+ : undefined
+ }
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputAsyncActionWithLoadingState.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputAsyncActionWithLoadingState.tsx
deleted file mode 100644
index 503930b445..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputAsyncActionWithLoadingState.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-const checkAvailability = async (_value: string) => true;
-
-export default function TextInputAsyncActionWithLoadingState() {
- const [username, setUsername] = useState('');
-
- return (
- <XDSTextInput
- label="Username"
- value={username}
- onChange={setUsername}
- onChangeAction={async (value) => {
- await checkAvailability(value);
- }}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputBasic.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputBasic.tsx
deleted file mode 100644
index 50843126c1..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputBasic.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-export default function TextInputBasic() {
- const [name, setName] = useState('');
-
- return (
- <XDSTextInput label="Name" value={name} onChange={setName} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputBasic.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputBasicTextInput.doc.mjs
similarity index 69%
rename from packages/cli/templates/blocks/components/TextInput/TextInputBasic.doc.mjs
rename to packages/cli/templates/blocks/components/TextInput/TextInputBasicTextInput.doc.mjs
index 418c49bcfd..ebe421df10 100644
--- a/packages/cli/templates/blocks/components/TextInput/TextInputBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputBasicTextInput.doc.mjs
@@ -2,7 +2,8 @@
export const doc = {
type: 'block',
name: 'TextInput — Basic',
- description: 'Basic',
+ description:
+ 'Simple text input with label and description for single-line data entry.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextInput'],
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputBasicTextInput.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputBasicTextInput.tsx
new file mode 100644
index 0000000000..6f53c39ccb
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputBasicTextInput.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTextInput} from '@xds/core/TextInput';
+
+export default function TextInputBasicTextInput() {
+ const [value, setValue] = useState('');
+ return (
+ <XDSTextInput
+ label="Email"
+ description="We'll never share your email with anyone."
+ value={value}
+ onChange={setValue}
+ placeholder="Enter your email"
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputHiddenLabel.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputHiddenLabel.tsx
deleted file mode 100644
index c10a730044..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputHiddenLabel.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-export default function TextInputHiddenLabel() {
- const [query, setQuery] = useState('');
-
- return (
- <XDSTextInput label="Search" isLabelHidden value={query} onChange={setQuery} placeholder="Search..." />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputOptionalAndRequired.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputOptionalAndRequired.tsx
deleted file mode 100644
index 534d04ecfd..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputOptionalAndRequired.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-export default function TextInputOptionalAndRequired() {
- const [nickname, setNickname] = useState('');
- const [username, setUsername] = useState('');
-
- return (
- <>
- <XDSTextInput label="Nickname" isOptional value={nickname} onChange={setNickname} />
- <XDSTextInput label="Username" isRequired value={username} onChange={setUsername} />
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.doc.mjs
index 96bf2de96d..eeebaab5c7 100644
--- a/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.doc.mjs
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TextInput — Password input',
- description: 'Password input',
+ name: 'TextInput — Password',
+ description:
+ 'Password input with masked characters for secure credential entry.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextInput'],
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.tsx
index 52c8227345..35436f8fb9 100644
--- a/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.tsx
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputPasswordInput.tsx
@@ -4,9 +4,14 @@ import {useState} from 'react';
import {XDSTextInput} from '@xds/core/TextInput';
export default function TextInputPasswordInput() {
- const [password, setPassword] = useState('');
-
+ const [value, setValue] = useState('');
return (
- <XDSTextInput type="password" label="Password" value={password} onChange={setPassword} />
+ <XDSTextInput
+ type="password"
+ label="Password"
+ value={value}
+ onChange={setValue}
+ placeholder="Enter your password"
+ />
);
}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputAsyncActionWithLoadingState.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputSearchInput.doc.mjs
similarity index 61%
rename from packages/cli/templates/blocks/components/TextInput/TextInputAsyncActionWithLoadingState.doc.mjs
rename to packages/cli/templates/blocks/components/TextInput/TextInputSearchInput.doc.mjs
index 004155e7aa..1cd2ac883e 100644
--- a/packages/cli/templates/blocks/components/TextInput/TextInputAsyncActionWithLoadingState.doc.mjs
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputSearchInput.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TextInput — Async action with loading state',
- description: 'Async action with loading state',
+ name: 'TextInput — Search',
+ description:
+ 'Search input with hidden label, search icon, and clear button.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextInput'],
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputSearchInput.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputSearchInput.tsx
new file mode 100644
index 0000000000..7af41671a8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputSearchInput.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTextInput} from '@xds/core/TextInput';
+
+function SearchIcon(props: React.SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 24 24"
+ strokeWidth={1.5}
+ stroke="currentColor"
+ {...props}>
+ <path
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"
+ />
+ </svg>
+ );
+}
+
+export default function TextInputSearchInput() {
+ const [value, setValue] = useState('');
+ return (
+ <XDSTextInput
+ label="Search"
+ isLabelHidden
+ value={value}
+ onChange={setValue}
+ placeholder="Search..."
+ startIcon={SearchIcon}
+ hasClear
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputValidationStatus.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputValidationStatus.doc.mjs
deleted file mode 100644
index 3bc9e6e013..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputValidationStatus.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextInput — Validation status',
- description: 'Validation status',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextInput'],
-};
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputValidationStatus.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputValidationStatus.tsx
deleted file mode 100644
index d56e144995..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputValidationStatus.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-export default function TextInputValidationStatus() {
- const [email, setEmail] = useState('');
-
- return (
- <XDSTextInput
- label="Email"
- value={email}
- onChange={setEmail}
- status={{type: 'error', message: 'Invalid email address'}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputWithDescription.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputWithDescription.doc.mjs
deleted file mode 100644
index 112566a9bf..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputWithDescription.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextInput — With description',
- description: 'With description',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextInput'],
-};
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputWithDescription.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputWithDescription.tsx
deleted file mode 100644
index d1030544ab..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputWithDescription.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-export default function TextInputWithDescription() {
- const [email, setEmail] = useState('');
-
- return (
- <XDSTextInput
- label="Email"
- description="We'll never share your email"
- value={email}
- onChange={setEmail}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputWithPlaceholder.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputWithPlaceholder.doc.mjs
deleted file mode 100644
index bbcf295802..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputWithPlaceholder.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextInput — With placeholder',
- description: 'With placeholder',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextInput'],
-};
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputWithPlaceholder.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputWithPlaceholder.tsx
deleted file mode 100644
index 70b4dfd0a2..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputWithPlaceholder.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-export default function TextInputWithPlaceholder() {
- const [email, setEmail] = useState('');
-
- return (
- <XDSTextInput label="Email" value={email} onChange={setEmail} placeholder="[email protected]" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputWithStartIcon.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputWithStartIcon.doc.mjs
deleted file mode 100644
index c92596e32a..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputWithStartIcon.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TextInput — With start icon',
- description: 'With start icon',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['TextInput'],
-};
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputWithStartIcon.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputWithStartIcon.tsx
deleted file mode 100644
index 0d0e278c4c..0000000000
--- a/packages/cli/templates/blocks/components/TextInput/TextInputWithStartIcon.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTextInput} from '@xds/core/TextInput';
-
-function MagnifyingGlassIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function TextInputWithStartIcon() {
- const [query, setQuery] = useState('');
-
- return (
- <XDSTextInput
- label="Search"
- value={query}
- onChange={setQuery}
- startIcon={MagnifyingGlassIcon}
- placeholder="Search..."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputOptionalAndRequired.doc.mjs b/packages/cli/templates/blocks/components/TextInput/TextInputWithValidation.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/TextInput/TextInputOptionalAndRequired.doc.mjs
rename to packages/cli/templates/blocks/components/TextInput/TextInputWithValidation.doc.mjs
index 12726ff216..cea4082a9c 100644
--- a/packages/cli/templates/blocks/components/TextInput/TextInputOptionalAndRequired.doc.mjs
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputWithValidation.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TextInput — Optional and required',
- description: 'Optional and required',
+ name: 'TextInput — Email Validation',
+ description:
+ 'Text input with dynamic email validation providing real-time status feedback.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TextInput'],
diff --git a/packages/cli/templates/blocks/components/TextInput/TextInputWithValidation.tsx b/packages/cli/templates/blocks/components/TextInput/TextInputWithValidation.tsx
new file mode 100644
index 0000000000..c33153655f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TextInput/TextInputWithValidation.tsx
@@ -0,0 +1,29 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTextInput} from '@xds/core/TextInput';
+
+export default function TextInputWithValidation() {
+ const [value, setValue] = useState('');
+
+ const getStatus = () => {
+ if (value.length === 0) return undefined;
+ if (!value.includes('@')) {
+ return {
+ type: 'error' as const,
+ message: 'Please enter a valid email address',
+ };
+ }
+ return {type: 'success' as const, message: 'Email looks good!'};
+ };
+
+ return (
+ <XDSTextInput
+ label="Email"
+ value={value}
+ onChange={setValue}
+ placeholder="Enter your email"
+ status={getStatus()}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailClickable.tsx b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailClickable.tsx
deleted file mode 100644
index 5e840abaa7..0000000000
--- a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailClickable.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client';
-
-import {XDSThumbnail} from '@xds/core/Thumbnail';
-
-const openLightbox = () => {};
-
-export default function ThumbnailClickable() {
- return (
- <XDSThumbnail src="/preview.png" alt="Preview" onClick={openLightbox} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailGallery.doc.mjs b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailGallery.doc.mjs
new file mode 100644
index 0000000000..9cb7a59631
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailGallery.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Thumbnail — Gallery',
+ description:
+ 'Row of removable thumbnails forming an image gallery with a reset action when all are removed.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Thumbnail'],
+};
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailGallery.tsx b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailGallery.tsx
new file mode 100644
index 0000000000..3b5acb0ef7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailGallery.tsx
@@ -0,0 +1,36 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSThumbnail} from '@xds/core/Thumbnail';
+
+const initialItems = [
+ {id: 1, src: 'https://picsum.photos/id/1042/200/200', label: 'dark.jpg'},
+ {id: 2, src: 'https://picsum.photos/id/1043/200/200', label: 'light.jpg'},
+ {id: 3, src: 'https://picsum.photos/id/1044/200/200', label: 'warm.jpg'},
+];
+
+export default function ThumbnailGallery() {
+ const [items, setItems] = useState(initialItems);
+
+ return (
+ <div style={{display: 'flex', gap: 8, alignItems: 'flex-start'}}>
+ {items.map(item => (
+ <XDSThumbnail
+ key={item.id}
+ src={item.src}
+ alt={item.label}
+ label={item.label}
+ onRemove={() =>
+ setItems(prev => prev.filter(i => i.id !== item.id))
+ }
+ />
+ ))}
+ {items.length === 0 && (
+ <p style={{color: '#888', fontSize: 12}}>
+ All removed.{' '}
+ <button onClick={() => setItems(initialItems)}>Reset</button>
+ </p>
+ )}
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailImageWithRemove.tsx b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailImageWithRemove.tsx
deleted file mode 100644
index e4280eaa5d..0000000000
--- a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailImageWithRemove.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSThumbnail} from '@xds/core/Thumbnail';
-
-export default function ThumbnailImageWithRemove() {
- return (
- <XDSThumbnail src="/photo.jpg" alt="Vacation" label="vacation.jpg" onRemove={() => {}} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailLoading.doc.mjs b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailLoading.doc.mjs
new file mode 100644
index 0000000000..dcf7849400
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailLoading.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Thumbnail — Loading States',
+ description:
+ 'Thumbnails in loading state, both without a preview and with a blurred preview image.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Thumbnail'],
+};
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailLoading.tsx b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailLoading.tsx
new file mode 100644
index 0000000000..4cf38f9598
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailLoading.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {XDSThumbnail} from '@xds/core/Thumbnail';
+
+export default function ThumbnailLoading() {
+ return (
+ <div style={{display: 'flex', gap: 8, alignItems: 'flex-start'}}>
+ <XDSThumbnail isLoading label="uploading.jpg" />
+ <XDSThumbnail
+ src="https://picsum.photos/id/1044/200/200"
+ alt="Uploading preview"
+ isLoading
+ label="vacation.jpg"
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailImageWithRemove.doc.mjs b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailPlaceholder.doc.mjs
similarity index 56%
rename from packages/cli/templates/blocks/components/Thumbnail/ThumbnailImageWithRemove.doc.mjs
rename to packages/cli/templates/blocks/components/Thumbnail/ThumbnailPlaceholder.doc.mjs
index f05ce98fe4..ee44807d09 100644
--- a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailImageWithRemove.doc.mjs
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailPlaceholder.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Thumbnail — Image with remove',
- description: 'Image with remove',
+ name: 'Thumbnail — Placeholder',
+ description:
+ 'Thumbnail without an image source, showing a placeholder icon for non-image files.',
isReady: true,
aspectRatio: 1,
componentsUsed: ['Thumbnail'],
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailPlaceholder.tsx b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailPlaceholder.tsx
new file mode 100644
index 0000000000..bf3948304b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailPlaceholder.tsx
@@ -0,0 +1,24 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSThumbnail} from '@xds/core/Thumbnail';
+
+export default function ThumbnailPlaceholder() {
+ const [visible, setVisible] = useState(true);
+
+ if (!visible) {
+ return (
+ <p style={{color: '#888', fontSize: 12}}>
+ Removed.{' '}
+ <button onClick={() => setVisible(true)}>Undo</button>
+ </p>
+ );
+ }
+
+ return (
+ <XDSThumbnail
+ label="report.pdf"
+ onRemove={() => setVisible(false)}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailRemovable.doc.mjs b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailRemovable.doc.mjs
new file mode 100644
index 0000000000..b7615d82b0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailRemovable.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Thumbnail — Removable',
+ description:
+ 'Thumbnail with a remove button that hides the image and offers an undo action.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Thumbnail'],
+};
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailRemovable.tsx b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailRemovable.tsx
new file mode 100644
index 0000000000..d7da94f595
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailRemovable.tsx
@@ -0,0 +1,26 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSThumbnail} from '@xds/core/Thumbnail';
+
+export default function ThumbnailRemovable() {
+ const [visible, setVisible] = useState(true);
+
+ if (!visible) {
+ return (
+ <p style={{color: '#888', fontSize: 12}}>
+ Removed.{' '}
+ <button onClick={() => setVisible(true)}>Undo</button>
+ </p>
+ );
+ }
+
+ return (
+ <XDSThumbnail
+ src="https://picsum.photos/id/1043/200/200"
+ alt="Removable thumbnail"
+ label="photo.png"
+ onRemove={() => setVisible(false)}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailClickable.doc.mjs b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailWithLabel.doc.mjs
similarity index 61%
rename from packages/cli/templates/blocks/components/Thumbnail/ThumbnailClickable.doc.mjs
rename to packages/cli/templates/blocks/components/Thumbnail/ThumbnailWithLabel.doc.mjs
index 02428ef2c7..94cc178482 100644
--- a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailClickable.doc.mjs
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailWithLabel.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Thumbnail — Clickable',
- description: 'Clickable',
+ name: 'Thumbnail — With Label',
+ description: 'Basic thumbnail with a filename label underneath the image.',
isReady: true,
aspectRatio: 1,
componentsUsed: ['Thumbnail'],
diff --git a/packages/cli/templates/blocks/components/Thumbnail/ThumbnailWithLabel.tsx b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailWithLabel.tsx
new file mode 100644
index 0000000000..dd41a21945
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Thumbnail/ThumbnailWithLabel.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSThumbnail} from '@xds/core/Thumbnail';
+
+export default function ThumbnailWithLabel() {
+ return (
+ <XDSThumbnail
+ src="https://picsum.photos/id/1044/200/200"
+ alt="Vacation photo"
+ label="vacation.jpg"
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInput24hourFormatWithClearButton.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInput24hourFormatWithClearButton.tsx
deleted file mode 100644
index be55f408e8..0000000000
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInput24hourFormatWithClearButton.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTimeInput, type XDSTimeInputProps} from '@xds/core/TimeInput';
-
-type TimeValue = NonNullable<XDSTimeInputProps['value']>;
-
-export default function TimeInput24hourFormatWithClearButton() {
- const [time, setTime] = useState<TimeValue | undefined>(
- '09:00' as TimeValue,
- );
-
- return (
- <XDSTimeInput
- label="Meeting time"
- value={time}
- onChange={setTime}
- hourFormat="24h"
- hasClear
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputAsyncActionWithOptimisticUpdate.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputAsyncActionWithOptimisticUpdate.tsx
deleted file mode 100644
index e6c606b69c..0000000000
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputAsyncActionWithOptimisticUpdate.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTimeInput, type XDSTimeInputProps} from '@xds/core/TimeInput';
-
-type TimeValue = NonNullable<XDSTimeInputProps['value']>;
-
-export default function TimeInputAsyncActionWithOptimisticUpdate() {
- const [time, setTime] = useState<TimeValue | undefined>(
- '09:00' as TimeValue,
- );
-
- const saveTime = async (_value: string) => {};
-
- return (
- <XDSTimeInput
- label="Scheduled time"
- value={time}
- onChange={setTime}
- onChangeAction={async (value) => {
- if (value != null) {
- await saveTime(value);
- }
- }}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputBasic.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputBasic.tsx
deleted file mode 100644
index f3879d9004..0000000000
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputBasic.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTimeInput, type XDSTimeInputProps} from '@xds/core/TimeInput';
-
-type TimeValue = NonNullable<XDSTimeInputProps['value']>;
-
-export default function TimeInputBasic() {
- const [time, setTime] = useState<TimeValue | undefined>(
- '09:00' as TimeValue,
- );
-
- return (
- <XDSTimeInput label="Start time" value={time} onChange={setTime} />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputMinMaxConstraints.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputMinMaxConstraints.tsx
deleted file mode 100644
index 25a59fc9e0..0000000000
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputMinMaxConstraints.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTimeInput, type XDSTimeInputProps} from '@xds/core/TimeInput';
-
-type TimeValue = NonNullable<XDSTimeInputProps['value']>;
-
-export default function TimeInputMinMaxConstraints() {
- const [time, setTime] = useState<TimeValue | undefined>(
- '09:00' as TimeValue,
- );
-
- return (
- <XDSTimeInput
- label="Business hours"
- value={time}
- onChange={setTime}
- min={'09:00' as TimeValue}
- max={'17:00' as TimeValue}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputAsyncActionWithOptimisticUpdate.doc.mjs b/packages/cli/templates/blocks/components/TimeInput/TimeInputTwentyFourHour.doc.mjs
similarity index 59%
rename from packages/cli/templates/blocks/components/TimeInput/TimeInputAsyncActionWithOptimisticUpdate.doc.mjs
rename to packages/cli/templates/blocks/components/TimeInput/TimeInputTwentyFourHour.doc.mjs
index e8fec0f15e..b6b8c80590 100644
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputAsyncActionWithOptimisticUpdate.doc.mjs
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputTwentyFourHour.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TimeInput — Async action with optimistic update',
- description: 'Async action with optimistic update',
+ name: 'TimeInput — 24-Hour Format',
+ description: 'Time input using 24-hour display format instead of 12-hour AM/PM.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TimeInput'],
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputTwentyFourHour.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputTwentyFourHour.tsx
new file mode 100644
index 0000000000..5d9cfda1d2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputTwentyFourHour.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTimeInput} from '@xds/core/TimeInput';
+
+
+export default function TimeInputTwentyFourHour() {
+ const [value, setValue] = useState('14:30');
+ return (
+ <XDSTimeInput
+ label="Time (24h)"
+ hourFormat="24h"
+ value={value as never}
+ onChange={setValue as never}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputBasic.doc.mjs b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithError.doc.mjs
similarity index 58%
rename from packages/cli/templates/blocks/components/TimeInput/TimeInputBasic.doc.mjs
rename to packages/cli/templates/blocks/components/TimeInput/TimeInputWithError.doc.mjs
index bb6ece34c0..9dfb290261 100644
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithError.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TimeInput — Basic',
- description: 'Basic',
+ name: 'TimeInput — Error State',
+ description:
+ 'Time input displaying an error status message for invalid time selection.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TimeInput'],
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithError.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithError.tsx
new file mode 100644
index 0000000000..932752b9de
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithError.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTimeInput} from '@xds/core/TimeInput';
+
+
+export default function TimeInputWithError() {
+ const [value, setValue] = useState('22:00');
+ return (
+ <XDSTimeInput
+ label="Event time"
+ value={value as never}
+ onChange={setValue as never}
+ status={{
+ type: 'error',
+ message: 'Time must be during business hours',
+ }}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputMinMaxConstraints.doc.mjs b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithMinMax.doc.mjs
similarity index 57%
rename from packages/cli/templates/blocks/components/TimeInput/TimeInputMinMaxConstraints.doc.mjs
rename to packages/cli/templates/blocks/components/TimeInput/TimeInputWithMinMax.doc.mjs
index 618296b34a..bd3de1a35a 100644
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputMinMaxConstraints.doc.mjs
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithMinMax.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TimeInput — Min / max constraints',
- description: 'Min / max constraints',
+ name: 'TimeInput — Constrained Range',
+ description:
+ 'Time input with min/max constraints limiting selection to business hours.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TimeInput'],
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithMinMax.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithMinMax.tsx
new file mode 100644
index 0000000000..dc1e95ecf4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithMinMax.tsx
@@ -0,0 +1,20 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTimeInput} from '@xds/core/TimeInput';
+
+
+export default function TimeInputWithMinMax() {
+ const [value, setValue] = useState(undefined);
+ return (
+ <XDSTimeInput
+ label="Appointment time"
+ min={'09:00' as never}
+ max={'17:00' as never}
+ description="Business hours: 9 AM – 5 PM"
+ placeholder="Select appointment time"
+ value={value as never}
+ onChange={setValue as never}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInput24hourFormatWithClearButton.doc.mjs b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSeconds.doc.mjs
similarity index 61%
rename from packages/cli/templates/blocks/components/TimeInput/TimeInput24hourFormatWithClearButton.doc.mjs
rename to packages/cli/templates/blocks/components/TimeInput/TimeInputWithSeconds.doc.mjs
index 265647cec3..d8d86ba2b9 100644
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInput24hourFormatWithClearButton.doc.mjs
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSeconds.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TimeInput — 24-hour format with clear button',
- description: '24-hour format with clear button',
+ name: 'TimeInput — With Seconds',
+ description: 'Time input including a seconds field for precise time entry.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TimeInput'],
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSeconds.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSeconds.tsx
new file mode 100644
index 0000000000..497fc310ce
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSeconds.tsx
@@ -0,0 +1,17 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTimeInput} from '@xds/core/TimeInput';
+
+
+export default function TimeInputWithSeconds() {
+ const [value, setValue] = useState('14:30:45');
+ return (
+ <XDSTimeInput
+ label="Precise time"
+ hasSeconds
+ value={value as never}
+ onChange={setValue as never}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSecondsAndErrorStatus.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSecondsAndErrorStatus.tsx
deleted file mode 100644
index f111599352..0000000000
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSecondsAndErrorStatus.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTimeInput, type XDSTimeInputProps} from '@xds/core/TimeInput';
-
-type TimeValue = NonNullable<XDSTimeInputProps['value']>;
-
-export default function TimeInputWithSecondsAndErrorStatus() {
- const [time, setTime] = useState<TimeValue | undefined>(
- '09:00' as TimeValue,
- );
-
- return (
- <XDSTimeInput
- label="Precise time"
- value={time}
- onChange={setTime}
- hasSeconds
- status={{type: 'error', message: 'Invalid time'}}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSecondsAndErrorStatus.doc.mjs b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithValue.doc.mjs
similarity index 63%
rename from packages/cli/templates/blocks/components/TimeInput/TimeInputWithSecondsAndErrorStatus.doc.mjs
rename to packages/cli/templates/blocks/components/TimeInput/TimeInputWithValue.doc.mjs
index 054069cde6..c24b278b84 100644
--- a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithSecondsAndErrorStatus.doc.mjs
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithValue.doc.mjs
@@ -1,8 +1,8 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'TimeInput — With seconds and error status',
- description: 'With seconds and error status',
+ name: 'TimeInput — With Value',
+ description: 'Time input pre-populated with a default time value.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['TimeInput'],
diff --git a/packages/cli/templates/blocks/components/TimeInput/TimeInputWithValue.tsx b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithValue.tsx
new file mode 100644
index 0000000000..860d659888
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TimeInput/TimeInputWithValue.tsx
@@ -0,0 +1,16 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTimeInput} from '@xds/core/TimeInput';
+
+
+export default function TimeInputWithValue() {
+ const [value, setValue] = useState('14:30');
+ return (
+ <XDSTimeInput
+ label="Meeting time"
+ value={value as never}
+ onChange={setValue as never}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormat.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormat.doc.mjs
new file mode 100644
index 0000000000..b2f5bc05f2
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormat.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Timestamp — Auto Format',
+ description:
+ 'Auto format that switches between relative time for recent dates and absolute date_time for older ones.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Timestamp', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormat.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormat.tsx
new file mode 100644
index 0000000000..18bf1af489
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormat.tsx
@@ -0,0 +1,23 @@
+'use client';
+
+import {XDSTimestamp} from '@xds/core/Timestamp';
+import {XDSText} from '@xds/core/Text';
+
+export default function TimestampAutoFormat() {
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 8}}>
+ <div>
+ <XDSText type="label" color="secondary">
+ Recent (relative):{' '}
+ </XDSText>
+ <XDSTimestamp value={Date.now() / 1000 - 3600} format="auto" />
+ </div>
+ <div>
+ <XDSText type="label" color="secondary">
+ Old (date_time):{' '}
+ </XDSText>
+ <XDSTimestamp value="2025-01-01T12:00:00Z" format="auto" />
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormatDefault.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormatDefault.doc.mjs
deleted file mode 100644
index 1868df34b2..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormatDefault.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Timestamp — Auto format (default)',
- description: 'Auto format (default)',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Timestamp'],
-};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormatDefault.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormatDefault.tsx
deleted file mode 100644
index 8345af6cf7..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampAutoFormatDefault.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSTimestamp} from '@xds/core/Timestamp';
-
-export default function TimestampAutoFormatDefault() {
- return (
- <XDSTimestamp value="2026-03-25T12:00:00Z" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampDateAndTime.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampDateAndTime.tsx
deleted file mode 100644
index 475fe9a13e..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampDateAndTime.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSTimestamp} from '@xds/core/Timestamp';
-
-export default function TimestampDateAndTime() {
- return (
- <XDSTimestamp value="2026-02-19T17:00:00Z" format="date_time" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampDateOnly.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampDateOnly.doc.mjs
deleted file mode 100644
index c09381d7c2..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampDateOnly.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Timestamp — Date only',
- description: 'Date only',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Timestamp'],
-};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampDateOnly.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampDateOnly.tsx
deleted file mode 100644
index a42c97c0fe..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampDateOnly.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSTimestamp} from '@xds/core/Timestamp';
-
-export default function TimestampDateOnly() {
- return (
- <XDSTimestamp value="2026-02-19T17:00:00Z" format="date" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampDateTimeFormats.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampDateTimeFormats.doc.mjs
new file mode 100644
index 0000000000..13945e6b9f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampDateTimeFormats.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Timestamp — Date & Time Formats',
+ description:
+ 'All date/time display formats including date, date_time, time, and system variants.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Timestamp', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampDateTimeFormats.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampDateTimeFormats.tsx
new file mode 100644
index 0000000000..ba6d6044c7
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampDateTimeFormats.tsx
@@ -0,0 +1,42 @@
+'use client';
+
+import {XDSTimestamp} from '@xds/core/Timestamp';
+import {XDSText} from '@xds/core/Text';
+
+export default function TimestampDateTimeFormats() {
+ const date = '2026-02-19T17:00:00Z';
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 8}}>
+ <div>
+ <XDSText type="label" color="secondary">
+ date:{' '}
+ </XDSText>
+ <XDSTimestamp value={date} format="date" />
+ </div>
+ <div>
+ <XDSText type="label" color="secondary">
+ date_time:{' '}
+ </XDSText>
+ <XDSTimestamp value={date} format="date_time" />
+ </div>
+ <div>
+ <XDSText type="label" color="secondary">
+ time:{' '}
+ </XDSText>
+ <XDSTimestamp value={date} format="time" />
+ </div>
+ <div>
+ <XDSText type="label" color="secondary">
+ system_date:{' '}
+ </XDSText>
+ <XDSTimestamp value={date} format="system_date" type="code" />
+ </div>
+ <div>
+ <XDSText type="label" color="secondary">
+ system_date_time:{' '}
+ </XDSText>
+ <XDSTimestamp value={date} format="system_date_time" type="code" />
+ </div>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampLiveUpdating.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampLiveUpdating.doc.mjs
deleted file mode 100644
index 54d1612e0d..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampLiveUpdating.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Timestamp — Live updating',
- description: 'Live updating',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Timestamp'],
-};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampLiveUpdating.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampLiveUpdating.tsx
deleted file mode 100644
index 8cf0ec9185..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampLiveUpdating.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSTimestamp} from '@xds/core/Timestamp';
-
-export default function TimestampLiveUpdating() {
- return (
- <XDSTimestamp value={Date.now() / 1000 - 120} format="relative" isLive />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.doc.mjs
index cb96183861..9e466f6e88 100644
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.doc.mjs
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Timestamp — Relative format',
- description: 'Relative format',
+ name: 'Timestamp — Relative Format',
+ description:
+ 'Series of timestamps showing relative time labels from seconds ago to months ago.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Timestamp'],
};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx
index 9b29c3d60e..b72885b74e 100644
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx
@@ -3,7 +3,21 @@
import {XDSTimestamp} from '@xds/core/Timestamp';
export default function TimestampRelativeFormat() {
+ const now = Date.now() / 1000;
return (
- <XDSTimestamp value={Date.now() / 1000 - 3600} format="relative" />
+ <div
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ gap: 8,
+ alignItems: 'flex-start',
+ }}>
+ <XDSTimestamp value={now - 5} format="relative" />
+ <XDSTimestamp value={now - 120} format="relative" />
+ <XDSTimestamp value={now - 3600} format="relative" />
+ <XDSTimestamp value={now - 86400} format="relative" />
+ <XDSTimestamp value={now - 259200} format="relative" />
+ <XDSTimestamp value={now - 90 * 86400} format="relative" />
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampSystemDatetime.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampSystemDatetime.doc.mjs
deleted file mode 100644
index cca5c949c4..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampSystemDatetime.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Timestamp — System date/time',
- description: 'System date/time',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Timestamp'],
-};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampSystemDatetime.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampSystemDatetime.tsx
deleted file mode 100644
index 22d3143655..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampSystemDatetime.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSTimestamp} from '@xds/core/Timestamp';
-
-export default function TimestampSystemDatetime() {
- return (
- <XDSTimestamp value="2026-02-19T17:00:00Z" format="system_date_time" type="code" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampTimeOnly.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampTimeOnly.doc.mjs
deleted file mode 100644
index 01e7af5160..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampTimeOnly.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Timestamp — Time only',
- description: 'Time only',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Timestamp'],
-};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampTimeOnly.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampTimeOnly.tsx
deleted file mode 100644
index a9589cad2f..0000000000
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampTimeOnly.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSTimestamp} from '@xds/core/Timestamp';
-
-export default function TimestampTimeOnly() {
- return (
- <XDSTimestamp value="2026-02-19T17:00:00Z" format="time" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampDateAndTime.doc.mjs b/packages/cli/templates/blocks/components/Timestamp/TimestampWithTimezone.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/Timestamp/TimestampDateAndTime.doc.mjs
rename to packages/cli/templates/blocks/components/Timestamp/TimestampWithTimezone.doc.mjs
index 86e623c203..a17750e9e6 100644
--- a/packages/cli/templates/blocks/components/Timestamp/TimestampDateAndTime.doc.mjs
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampWithTimezone.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Timestamp — Date and time',
- description: 'Date and time',
+ name: 'Timestamp — With Timezone',
+ description:
+ 'Date-time timestamp with the timezone abbreviation appended.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Timestamp'],
};
diff --git a/packages/cli/templates/blocks/components/Timestamp/TimestampWithTimezone.tsx b/packages/cli/templates/blocks/components/Timestamp/TimestampWithTimezone.tsx
new file mode 100644
index 0000000000..11bc4417f1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Timestamp/TimestampWithTimezone.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSTimestamp} from '@xds/core/Timestamp';
+
+export default function TimestampWithTimezone() {
+ return (
+ <XDSTimestamp
+ value="2026-02-19T17:00:00Z"
+ format="date_time"
+ isTimezoneShown
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toast/ToastBasic.doc.mjs b/packages/cli/templates/blocks/components/Toast/ToastBasic.doc.mjs
deleted file mode 100644
index 2ef616c1a0..0000000000
--- a/packages/cli/templates/blocks/components/Toast/ToastBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Toast — Basic',
- description: 'Basic',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Button', 'Toast'],
-};
diff --git a/packages/cli/templates/blocks/components/Toast/ToastBasic.tsx b/packages/cli/templates/blocks/components/Toast/ToastBasic.tsx
deleted file mode 100644
index 3b8fd10eff..0000000000
--- a/packages/cli/templates/blocks/components/Toast/ToastBasic.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {useXDSToast} from '@xds/core/Toast';
-
-export default function ToastBasic() {
- const toast = useXDSToast();
-
- return (
- <XDSButton
- label="Show toast"
- variant="primary"
- onClick={() => toast({body: 'Changes saved'})}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Toast/ToastDeduplication.doc.mjs b/packages/cli/templates/blocks/components/Toast/ToastDeduplication.doc.mjs
new file mode 100644
index 0000000000..905ab213d1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastDeduplication.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toast — Deduplication',
+ description:
+ 'Prevent duplicate toasts with uniqueID, using ignore or overwrite collision strategies.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toast', 'Button', 'Stack'],
+};
diff --git a/packages/cli/templates/blocks/components/Toast/ToastDeduplication.tsx b/packages/cli/templates/blocks/components/Toast/ToastDeduplication.tsx
new file mode 100644
index 0000000000..a8c386c801
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastDeduplication.tsx
@@ -0,0 +1,36 @@
+'use client';
+
+import {useXDSToast} from '@xds/core/Toast';
+import {XDSButton} from '@xds/core/Button';
+import {XDSStack} from '@xds/core/Stack';
+
+export default function ToastDeduplication() {
+ const toast = useXDSToast();
+ return (
+ <XDSStack direction="horizontal" gap={2}>
+ <XDSButton
+ label="Offline (ignore)"
+ onClick={() =>
+ toast({
+ body: 'You are offline',
+ uniqueID: 'offline',
+ collisionBehavior: 'ignore',
+ isAutoHide: false,
+ })
+ }
+ />
+ <XDSButton
+ label="Progress (overwrite)"
+ variant="secondary"
+ onClick={() =>
+ toast({
+ body: `Uploading... ${Math.floor(Math.random() * 100)}%`,
+ uniqueID: 'upload-progress',
+ collisionBehavior: 'overwrite',
+ isAutoHide: false,
+ })
+ }
+ />
+ </XDSStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toast/ToastError.doc.mjs b/packages/cli/templates/blocks/components/Toast/ToastError.doc.mjs
deleted file mode 100644
index 20e7993191..0000000000
--- a/packages/cli/templates/blocks/components/Toast/ToastError.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Toast — Error',
- description: 'Error',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Button', 'Toast'],
-};
diff --git a/packages/cli/templates/blocks/components/Toast/ToastError.tsx b/packages/cli/templates/blocks/components/Toast/ToastError.tsx
deleted file mode 100644
index 962a5a9724..0000000000
--- a/packages/cli/templates/blocks/components/Toast/ToastError.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {useXDSToast} from '@xds/core/Toast';
-
-export default function ToastError() {
- const toast = useXDSToast();
-
- return (
- <XDSButton
- label="Show error toast"
- variant="primary"
- onClick={() => toast({body: 'Failed to save', type: 'error'})}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Toast/ToastProgrammaticDismiss.doc.mjs b/packages/cli/templates/blocks/components/Toast/ToastProgrammaticDismiss.doc.mjs
new file mode 100644
index 0000000000..982d5cb08a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastProgrammaticDismiss.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toast — Programmatic Dismiss',
+ description:
+ 'Show a persistent toast and dismiss it programmatically using the returned dismiss function.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toast', 'Button', 'Stack'],
+};
diff --git a/packages/cli/templates/blocks/components/Toast/ToastProgrammaticDismiss.tsx b/packages/cli/templates/blocks/components/Toast/ToastProgrammaticDismiss.tsx
new file mode 100644
index 0000000000..9edf3b71e0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastProgrammaticDismiss.tsx
@@ -0,0 +1,33 @@
+'use client';
+
+import {useRef} from 'react';
+import {useXDSToast} from '@xds/core/Toast';
+import {XDSButton} from '@xds/core/Button';
+import {XDSStack} from '@xds/core/Stack';
+
+export default function ToastProgrammaticDismiss() {
+ const toast = useXDSToast();
+ const dismissRef = useRef<(() => void) | null>(null);
+
+ return (
+ <XDSStack direction="horizontal" gap={2}>
+ <XDSButton
+ label="Show persistent toast"
+ onClick={() => {
+ dismissRef.current = toast({
+ body: 'Uploading...',
+ isAutoHide: false,
+ });
+ }}
+ />
+ <XDSButton
+ label="Dismiss"
+ variant="secondary"
+ onClick={() => {
+ dismissRef.current?.();
+ dismissRef.current = null;
+ }}
+ />
+ </XDSStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toast/ToastStacking.doc.mjs b/packages/cli/templates/blocks/components/Toast/ToastStacking.doc.mjs
new file mode 100644
index 0000000000..c16a993520
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastStacking.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toast — Stacking',
+ description:
+ 'Multiple toasts stacking vertically, alternating between info and error types.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toast', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/Toast/ToastStacking.tsx b/packages/cli/templates/blocks/components/Toast/ToastStacking.tsx
new file mode 100644
index 0000000000..ca46b432c8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastStacking.tsx
@@ -0,0 +1,25 @@
+'use client';
+
+import {useRef} from 'react';
+import {useXDSToast} from '@xds/core/Toast';
+import {XDSButton} from '@xds/core/Button';
+
+export default function ToastStacking() {
+ const toast = useXDSToast();
+ const countRef = useRef(0);
+
+ return (
+ <XDSButton
+ label="Add toast"
+ onClick={() => {
+ countRef.current++;
+ const types = ['info', 'error'] as const;
+ const type = types[countRef.current % types.length];
+ toast({
+ body: `Toast #${countRef.current} — ${type} notification.`,
+ type,
+ });
+ }}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toast/ToastTypes.doc.mjs b/packages/cli/templates/blocks/components/Toast/ToastTypes.doc.mjs
new file mode 100644
index 0000000000..31e62da0f6
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastTypes.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toast — Types',
+ description:
+ 'Info and error toast variants. Error toasts persist until dismissed.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toast', 'Button', 'Stack'],
+};
diff --git a/packages/cli/templates/blocks/components/Toast/ToastTypes.tsx b/packages/cli/templates/blocks/components/Toast/ToastTypes.tsx
new file mode 100644
index 0000000000..8f25471a35
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toast/ToastTypes.tsx
@@ -0,0 +1,27 @@
+'use client';
+
+import {useXDSToast} from '@xds/core/Toast';
+import {XDSButton} from '@xds/core/Button';
+import {XDSStack} from '@xds/core/Stack';
+
+export default function ToastTypes() {
+ const toast = useXDSToast();
+ return (
+ <XDSStack direction="horizontal" gap={2}>
+ <XDSButton
+ label="Info"
+ variant="secondary"
+ onClick={() =>
+ toast({body: 'This is an info notification.', type: 'info'})
+ }
+ />
+ <XDSButton
+ label="Error"
+ variant="destructive"
+ onClick={() =>
+ toast({body: 'This is an error notification.', type: 'error'})
+ }
+ />
+ </XDSStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toast/ToastWithAction.doc.mjs b/packages/cli/templates/blocks/components/Toast/ToastWithAction.doc.mjs
index e101595ea3..266ff8b6aa 100644
--- a/packages/cli/templates/blocks/components/Toast/ToastWithAction.doc.mjs
+++ b/packages/cli/templates/blocks/components/Toast/ToastWithAction.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Toast — With action',
- description: 'With action',
+ name: 'Toast — With Action',
+ description:
+ 'Persistent toasts with trailing actions using a button or a link.',
isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Toast', 'Button'],
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toast', 'Button', 'Link', 'Stack'],
};
diff --git a/packages/cli/templates/blocks/components/Toast/ToastWithAction.tsx b/packages/cli/templates/blocks/components/Toast/ToastWithAction.tsx
index 0d1c0e19ea..a357affd16 100644
--- a/packages/cli/templates/blocks/components/Toast/ToastWithAction.tsx
+++ b/packages/cli/templates/blocks/components/Toast/ToastWithAction.tsx
@@ -1,29 +1,46 @@
'use client';
-import {XDSButton} from '@xds/core/Button';
import {useXDSToast} from '@xds/core/Toast';
+import {XDSButton} from '@xds/core/Button';
+import {XDSLink} from '@xds/core/Link';
+import {XDSStack} from '@xds/core/Stack';
export default function ToastWithAction() {
const toast = useXDSToast();
-
return (
- <XDSButton
- label="Delete item"
- variant="primary"
- onClick={() =>
- toast({
- body: 'Item deleted',
- isAutoHide: false,
- endContent: (
- <XDSButton
- label="Undo"
- variant="secondary"
- size="sm"
- onClick={() => {}}
- />
- ),
- })
- }
- />
+ <XDSStack direction="horizontal" gap={2}>
+ <XDSButton
+ label="With button"
+ onClick={() =>
+ toast({
+ body: 'Item deleted',
+ isAutoHide: false,
+ endContent: (
+ <XDSButton
+ label="Undo"
+ variant="secondary"
+ size="sm"
+ onClick={() => {}}
+ />
+ ),
+ })
+ }
+ />
+ <XDSButton
+ label="With link"
+ variant="secondary"
+ onClick={() =>
+ toast({
+ body: 'Your report is ready.',
+ isAutoHide: false,
+ endContent: (
+ <XDSLink href="#" label="View report" hasUnderline>
+ View report
+ </XDSLink>
+ ),
+ })
+ }
+ />
+ </XDSStack>
);
}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupMultiple.doc.mjs b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupMultiple.doc.mjs
new file mode 100644
index 0000000000..b242dafabc
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupMultiple.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ToggleButton — Multi-Select Group',
+ description:
+ 'Multi-select toggle button group forming a text formatting toolbar with bold, italic, and underline.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ToggleButton', 'ToggleButtonGroup'],
+};
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupMultiple.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupMultiple.tsx
new file mode 100644
index 0000000000..62b36ffb7e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupMultiple.tsx
@@ -0,0 +1,55 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSToggleButton, XDSToggleButtonGroup} from '@xds/core/ToggleButton';
+
+const iconSize = {width: 16, height: 16} as const;
+const svgProps = {viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.5, strokeLinecap: 'round' as const, strokeLinejoin: 'round' as const, ...iconSize};
+
+const BoldIcon = (
+ <svg {...svgProps}>
+ <path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6zM6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" />
+ </svg>
+);
+
+const ItalicIcon = (
+ <svg {...svgProps}>
+ <path d="M10 4h4M14 20h-4M15 4l-6 16" />
+ </svg>
+);
+
+const UnderlineIcon = (
+ <svg {...svgProps}>
+ <path d="M7 4v7a5 5 0 0 0 10 0V4M5 21h14" />
+ </svg>
+);
+
+export default function ToggleButtonGroupMultiple() {
+ const [formats, setFormats] = useState<string[]>([]);
+ return (
+ <XDSToggleButtonGroup
+ type="multiple"
+ value={formats}
+ onChange={setFormats}
+ label="Text formatting">
+ <XDSToggleButton
+ value="bold"
+ label="Bold"
+ icon={BoldIcon}
+ isIconOnly
+ />
+ <XDSToggleButton
+ value="italic"
+ label="Italic"
+ icon={ItalicIcon}
+ isIconOnly
+ />
+ <XDSToggleButton
+ value="underline"
+ label="Underline"
+ icon={UnderlineIcon}
+ isIconOnly
+ />
+ </XDSToggleButtonGroup>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupSingle.doc.mjs b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupSingle.doc.mjs
new file mode 100644
index 0000000000..465b69a218
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupSingle.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ToggleButton — Single-Select Group',
+ description:
+ 'Single-select toggle button group acting as a view mode switcher between list and grid.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ToggleButton', 'ToggleButtonGroup'],
+};
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupSingle.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupSingle.tsx
new file mode 100644
index 0000000000..6d8ebbfa8c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonGroupSingle.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSToggleButton, XDSToggleButtonGroup} from '@xds/core/ToggleButton';
+
+const iconSize = {width: 16, height: 16} as const;
+const svgProps = {viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.5, strokeLinecap: 'round' as const, strokeLinejoin: 'round' as const, ...iconSize};
+
+const ListIcon = (
+ <svg {...svgProps}>
+ <path d="M8.25 6.75h12M8.25 12h12M8.25 17.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" />
+ </svg>
+);
+
+const GridIcon = (
+ <svg {...svgProps}>
+ <path d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z" />
+ </svg>
+);
+
+export default function ToggleButtonGroupSingle() {
+ const [view, setView] = useState<string | null>('list');
+ return (
+ <XDSToggleButtonGroup value={view} onChange={setView} label="View mode">
+ <XDSToggleButton
+ value="list"
+ label="List view"
+ icon={ListIcon}
+ isIconOnly
+ />
+ <XDSToggleButton
+ value="grid"
+ label="Grid view"
+ icon={GridIcon}
+ isIconOnly
+ />
+ </XDSToggleButtonGroup>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIcononlyToggle.doc.mjs b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIcononlyToggle.doc.mjs
rename to packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.doc.mjs
index 9cfbedcb74..7bdd158431 100644
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIcononlyToggle.doc.mjs
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'ToggleButton — Icon-only toggle',
- description: 'Icon-only toggle',
+ name: 'ToggleButton — Icon Swap',
+ description:
+ 'Icon-only toggle buttons that swap between outline and solid icons when pressed.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['ToggleButton'],
};
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.tsx
new file mode 100644
index 0000000000..dc1316b797
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.tsx
@@ -0,0 +1,57 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSToggleButton} from '@xds/core/ToggleButton';
+
+const iconSize = {width: 16, height: 16} as const;
+const svgProps = {viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.5, strokeLinecap: 'round' as const, strokeLinejoin: 'round' as const, ...iconSize};
+
+const StarOutline = (
+ <svg {...svgProps}>
+ <path d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5z" />
+ </svg>
+);
+
+const StarSolid = (
+ <svg {...iconSize} viewBox="0 0 24 24" fill="currentColor">
+ <path fillRule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z" clipRule="evenodd" />
+ </svg>
+);
+
+const BookmarkOutline = (
+ <svg {...svgProps}>
+ <path d="M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z" />
+ </svg>
+);
+
+const BookmarkSolid = (
+ <svg {...iconSize} viewBox="0 0 24 24" fill="currentColor">
+ <path fillRule="evenodd" d="M6.32 2.577a49.255 49.255 0 0 1 11.36 0c1.497.174 2.57 1.46 2.57 2.93V21a.75.75 0 0 1-1.085.67L12 18.089l-7.165 3.583A.75.75 0 0 1 3.75 21V5.507c0-1.47 1.073-2.756 2.57-2.93Z" clipRule="evenodd" />
+ </svg>
+);
+
+export default function ToggleButtonIconSwap() {
+ const [isFavorited, setIsFavorited] = useState(false);
+ const [isBookmarked, setIsBookmarked] = useState(true);
+
+ return (
+ <div style={{display: 'flex', gap: 8}}>
+ <XDSToggleButton
+ label="Favorite"
+ icon={StarOutline}
+ pressedIcon={StarSolid}
+ isPressed={isFavorited}
+ onPressedChange={setIsFavorited}
+ isIconOnly
+ />
+ <XDSToggleButton
+ label="Bookmark"
+ icon={BookmarkOutline}
+ pressedIcon={BookmarkSolid}
+ isPressed={isBookmarked}
+ onPressedChange={setIsBookmarked}
+ isIconOnly
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwapOnPress.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwapOnPress.tsx
deleted file mode 100644
index 1e1eaecf61..0000000000
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwapOnPress.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSToggleButton} from '@xds/core/ToggleButton';
-
-function StarIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function StarIconSolid() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function ToggleButtonIconSwapOnPress() {
- const [isFavorited, setIsFavorited] = useState(false);
-
- return (
- <XDSToggleButton
- label="Favorite"
- icon={<StarIcon />}
- pressedIcon={<StarIconSolid />}
- isPressed={isFavorited}
- onPressedChange={setIsFavorited}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIcononlyToggle.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIcononlyToggle.tsx
deleted file mode 100644
index ca3425a3ef..0000000000
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIcononlyToggle.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSToggleButton} from '@xds/core/ToggleButton';
-
-function BoldIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function ToggleButtonIcononlyToggle() {
- const [isBold, setIsBold] = useState(false);
-
- return (
- <XDSToggleButton
- label="Bold"
- icon={<BoldIcon />}
- isPressed={isBold}
- onPressedChange={setIsBold}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonMultiselectGroup.doc.mjs b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonMultiselectGroup.doc.mjs
deleted file mode 100644
index a93a17c9da..0000000000
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonMultiselectGroup.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'ToggleButton — Multi-select group',
- description: 'Multi-select group',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['ToggleButton'],
-};
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonMultiselectGroup.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonMultiselectGroup.tsx
deleted file mode 100644
index da8e663f5e..0000000000
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonMultiselectGroup.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSToggleButton, XDSToggleButtonGroup} from '@xds/core/ToggleButton';
-
-function BoldIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function ItalicIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function ToggleButtonMultiselectGroup() {
- const [formats, setFormats] = useState<string[]>([]);
-
- return (
- <XDSToggleButtonGroup
- type="multiple"
- value={formats}
- onChange={setFormats}
- label="Formatting">
- <XDSToggleButton value="bold" label="Bold" icon={<BoldIcon />} />
- <XDSToggleButton value="italic" label="Italic" icon={<ItalicIcon />} />
- </XDSToggleButtonGroup>
- );
-}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonNotificationToggle.doc.mjs b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonNotificationToggle.doc.mjs
new file mode 100644
index 0000000000..eba8714d43
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonNotificationToggle.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'ToggleButton — Notification Toggle',
+ description:
+ 'Toggle button that swaps between bell and bell-slash icons to mute/unmute notifications.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['ToggleButton'],
+};
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonNotificationToggle.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonNotificationToggle.tsx
new file mode 100644
index 0000000000..03d38b257c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonNotificationToggle.tsx
@@ -0,0 +1,33 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSToggleButton} from '@xds/core/ToggleButton';
+
+const iconSize = {width: 16, height: 16} as const;
+const svgProps = {viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.5, strokeLinecap: 'round' as const, strokeLinejoin: 'round' as const, ...iconSize};
+
+const BellIcon = (
+ <svg {...svgProps}>
+ <path d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" />
+ </svg>
+);
+
+const BellSlashIcon = (
+ <svg {...svgProps}>
+ <path d="M9.143 17.082a24.248 24.248 0 0 0 5.714 0m-5.714 0a3 3 0 1 0 5.714 0M9.143 17.082a23.848 23.848 0 0 1-5.454-1.31A8.967 8.967 0 0 0 6 9.75V9a6 6 0 0 1 .597-2.601M3 3l18 18M17.94 12.85A8.956 8.956 0 0 0 18 9.75V9a6 6 0 0 0-9.22-5.06" />
+ </svg>
+);
+
+export default function ToggleButtonNotificationToggle() {
+ const [isMuted, setIsMuted] = useState(false);
+ return (
+ <XDSToggleButton
+ label={isMuted ? 'Unmute notifications' : 'Mute notifications'}
+ icon={BellIcon}
+ pressedIcon={BellSlashIcon}
+ isPressed={isMuted}
+ onPressedChange={setIsMuted}
+ isIconOnly
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonSingleselectGroup.doc.mjs b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonSingleselectGroup.doc.mjs
deleted file mode 100644
index f570c14b85..0000000000
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonSingleselectGroup.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'ToggleButton — Single-select group',
- description: 'Single-select group',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['ToggleButton'],
-};
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonSingleselectGroup.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonSingleselectGroup.tsx
deleted file mode 100644
index 492e8e942b..0000000000
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonSingleselectGroup.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSToggleButton, XDSToggleButtonGroup} from '@xds/core/ToggleButton';
-
-function ListIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function GridIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function ToggleButtonSingleselectGroup() {
- const [view, setView] = useState<string | null>('grid');
-
- return (
- <XDSToggleButtonGroup value={view} onChange={setView} label="View mode">
- <XDSToggleButton value="list" label="List" icon={<ListIcon />} />
- <XDSToggleButton value="grid" label="Grid" icon={<GridIcon />} />
- </XDSToggleButtonGroup>
- );
-}
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwapOnPress.doc.mjs b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonWithLabel.doc.mjs
similarity index 50%
rename from packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwapOnPress.doc.mjs
rename to packages/cli/templates/blocks/components/ToggleButton/ToggleButtonWithLabel.doc.mjs
index 7ff8164a15..0af46504d5 100644
--- a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonIconSwapOnPress.doc.mjs
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonWithLabel.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'ToggleButton — Icon swap on press',
- description: 'Icon swap on press',
+ name: 'ToggleButton — With Label',
+ description:
+ 'Toggle button with visible label text that shows a font weight shift on press.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['ToggleButton'],
};
diff --git a/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonWithLabel.tsx b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonWithLabel.tsx
new file mode 100644
index 0000000000..79de1e84b8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/ToggleButton/ToggleButtonWithLabel.tsx
@@ -0,0 +1,16 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSToggleButton} from '@xds/core/ToggleButton';
+
+export default function ToggleButtonWithLabel() {
+ const [isActive, setIsActive] = useState(false);
+ return (
+ <XDSToggleButton
+ label="Active"
+ isPressed={isActive}
+ onPressedChange={setIsActive}>
+ Active
+ </XDSToggleButton>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Token/TokenAsLink.tsx b/packages/cli/templates/blocks/components/Token/TokenAsLink.tsx
deleted file mode 100644
index 630cc6bc93..0000000000
--- a/packages/cli/templates/blocks/components/Token/TokenAsLink.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSToken} from '@xds/core/Token';
-
-export default function TokenAsLink() {
- return (
- <XDSToken label="Profile" href="/user/123" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Token/TokenBasic.tsx b/packages/cli/templates/blocks/components/Token/TokenBasic.tsx
deleted file mode 100644
index 5fb90ada3e..0000000000
--- a/packages/cli/templates/blocks/components/Token/TokenBasic.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSToken} from '@xds/core/Token';
-
-export default function TokenBasic() {
- return (
- <XDSToken label="Tag" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Token/TokenClickable.doc.mjs b/packages/cli/templates/blocks/components/Token/TokenClickable.doc.mjs
index 3ac8a50924..1d6eb6c939 100644
--- a/packages/cli/templates/blocks/components/Token/TokenClickable.doc.mjs
+++ b/packages/cli/templates/blocks/components/Token/TokenClickable.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Token — Clickable',
- description: 'Clickable',
+ description: 'Interactive tokens that respond to click events.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Token'],
};
diff --git a/packages/cli/templates/blocks/components/Token/TokenClickable.tsx b/packages/cli/templates/blocks/components/Token/TokenClickable.tsx
index 631d1bdd94..b2bada209e 100644
--- a/packages/cli/templates/blocks/components/Token/TokenClickable.tsx
+++ b/packages/cli/templates/blocks/components/Token/TokenClickable.tsx
@@ -4,11 +4,9 @@ import {XDSToken} from '@xds/core/Token';
export default function TokenClickable() {
return (
- <XDSToken
- label="Category"
- onClick={() => {
- window.location.href = '/category';
- }}
- />
+ <div style={{display: 'flex', gap: '8px', alignItems: 'center'}}>
+ <XDSToken label="Click me" onClick={() => {}} />
+ <XDSToken label="Green action" color="green" onClick={() => {}} />
+ </div>
);
}
diff --git a/packages/cli/templates/blocks/components/Token/TokenColored.doc.mjs b/packages/cli/templates/blocks/components/Token/TokenColored.doc.mjs
deleted file mode 100644
index 400e52369e..0000000000
--- a/packages/cli/templates/blocks/components/Token/TokenColored.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Token — Colored',
- description: 'Colored',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Token'],
-};
diff --git a/packages/cli/templates/blocks/components/Token/TokenColored.tsx b/packages/cli/templates/blocks/components/Token/TokenColored.tsx
deleted file mode 100644
index 6a1b0e51de..0000000000
--- a/packages/cli/templates/blocks/components/Token/TokenColored.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSToken} from '@xds/core/Token';
-
-export default function TokenColored() {
- return (
- <XDSToken label="Status" color="green" />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Token/TokenRemovable.tsx b/packages/cli/templates/blocks/components/Token/TokenRemovable.tsx
deleted file mode 100644
index a11e81bf6d..0000000000
--- a/packages/cli/templates/blocks/components/Token/TokenRemovable.tsx
+++ /dev/null
@@ -1,9 +0,0 @@
-'use client';
-
-import {XDSToken} from '@xds/core/Token';
-
-const handleRemove = () => {};
-
-export default function TokenRemovable() {
- return <XDSToken label="Filter" onRemove={handleRemove} />;
-}
diff --git a/packages/cli/templates/blocks/components/Token/TokenBasic.doc.mjs b/packages/cli/templates/blocks/components/Token/TokenWithEndContent.doc.mjs
similarity index 53%
rename from packages/cli/templates/blocks/components/Token/TokenBasic.doc.mjs
rename to packages/cli/templates/blocks/components/Token/TokenWithEndContent.doc.mjs
index 59d3dc9485..e3a3c41513 100644
--- a/packages/cli/templates/blocks/components/Token/TokenBasic.doc.mjs
+++ b/packages/cli/templates/blocks/components/Token/TokenWithEndContent.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Token — Basic',
- description: 'Basic',
+ name: 'Token — End Content',
+ description: 'Tokens with trailing content such as counts or status indicators.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Token'],
};
diff --git a/packages/cli/templates/blocks/components/Token/TokenWithEndContent.tsx b/packages/cli/templates/blocks/components/Token/TokenWithEndContent.tsx
new file mode 100644
index 0000000000..15cb170af3
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Token/TokenWithEndContent.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {XDSToken} from '@xds/core/Token';
+
+export default function TokenWithEndContent() {
+ return (
+ <div style={{display: 'flex', gap: '8px', alignItems: 'center'}}>
+ <XDSToken
+ label="Count"
+ endContent={
+ <span
+ style={{
+ fontSize: '10px',
+ opacity: 0.7,
+ marginInlineStart: '2px',
+ }}>
+ (3)
+ </span>
+ }
+ />
+ <XDSToken
+ label="Status"
+ color="green"
+ endContent={
+ <span
+ style={{
+ width: '6px',
+ height: '6px',
+ borderRadius: '50%',
+ backgroundColor: 'currentColor',
+ marginInlineStart: '2px',
+ }}
+ />
+ }
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Token/TokenAsLink.doc.mjs b/packages/cli/templates/blocks/components/Token/TokenWithIcon.doc.mjs
similarity index 55%
rename from packages/cli/templates/blocks/components/Token/TokenAsLink.doc.mjs
rename to packages/cli/templates/blocks/components/Token/TokenWithIcon.doc.mjs
index d95197e1c1..f38d9c9806 100644
--- a/packages/cli/templates/blocks/components/Token/TokenAsLink.doc.mjs
+++ b/packages/cli/templates/blocks/components/Token/TokenWithIcon.doc.mjs
@@ -1,9 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Token — As link',
- description: 'As link',
+ name: 'Token — With Icon',
+ description: 'Tokens with leading icon elements for visual context.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Token'],
};
diff --git a/packages/cli/templates/blocks/components/Token/TokenWithIcon.tsx b/packages/cli/templates/blocks/components/Token/TokenWithIcon.tsx
new file mode 100644
index 0000000000..8ae9946492
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Token/TokenWithIcon.tsx
@@ -0,0 +1,42 @@
+'use client';
+
+import {XDSToken} from '@xds/core/Token';
+
+export default function TokenWithIcon() {
+ return (
+ <div style={{display: 'flex', gap: '8px', alignItems: 'center'}}>
+ <XDSToken
+ label="Star"
+ icon={
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor">
+ <path d="M6 0l1.8 3.6L12 4.2 8.9 7.1l.7 4.1L6 9.2 2.4 11.2l.7-4.1L0 4.2l4.2-.6z" />
+ </svg>
+ }
+ />
+ <XDSToken
+ label="Info"
+ color="blue"
+ icon={
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="currentColor">
+ <circle
+ cx="6"
+ cy="6"
+ r="5"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth="1.5"
+ />
+ <text
+ x="6"
+ y="9"
+ textAnchor="middle"
+ fontSize="8"
+ fill="currentColor">
+ i
+ </text>
+ </svg>
+ }
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Token/TokenWithIconAndHiddenLabel.doc.mjs b/packages/cli/templates/blocks/components/Token/TokenWithIconAndHiddenLabel.doc.mjs
deleted file mode 100644
index a23470f2b8..0000000000
--- a/packages/cli/templates/blocks/components/Token/TokenWithIconAndHiddenLabel.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Token — With icon and hidden label',
- description: 'With icon and hidden label',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Token'],
-};
diff --git a/packages/cli/templates/blocks/components/Token/TokenWithIconAndHiddenLabel.tsx b/packages/cli/templates/blocks/components/Token/TokenWithIconAndHiddenLabel.tsx
deleted file mode 100644
index 8270437830..0000000000
--- a/packages/cli/templates/blocks/components/Token/TokenWithIconAndHiddenLabel.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {XDSToken} from '@xds/core/Token';
-
-function UserIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function TokenWithIconAndHiddenLabel() {
- return (
- <XDSToken label="User" icon={<UserIcon />} isLabelHidden />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Token/TokenRemovable.doc.mjs b/packages/cli/templates/blocks/components/Token/TokenWithRemove.doc.mjs
similarity index 65%
rename from packages/cli/templates/blocks/components/Token/TokenRemovable.doc.mjs
rename to packages/cli/templates/blocks/components/Token/TokenWithRemove.doc.mjs
index dce20af1da..93f8f05dbf 100644
--- a/packages/cli/templates/blocks/components/Token/TokenRemovable.doc.mjs
+++ b/packages/cli/templates/blocks/components/Token/TokenWithRemove.doc.mjs
@@ -2,8 +2,8 @@
export const doc = {
type: 'block',
name: 'Token — Removable',
- description: 'Removable',
+ description: 'Tokens with a remove button for dismissible tags and filters.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Token'],
};
diff --git a/packages/cli/templates/blocks/components/Token/TokenWithRemove.tsx b/packages/cli/templates/blocks/components/Token/TokenWithRemove.tsx
new file mode 100644
index 0000000000..5bf0f82f5d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Token/TokenWithRemove.tsx
@@ -0,0 +1,13 @@
+'use client';
+
+import {XDSToken} from '@xds/core/Token';
+
+export default function TokenWithRemove() {
+ return (
+ <div style={{display: 'flex', gap: '8px', alignItems: 'center'}}>
+ <XDSToken label="Removable" onRemove={() => {}} />
+ <XDSToken label="Red tag" color="red" onRemove={() => {}} />
+ <XDSToken label="Blue tag" color="blue" onRemove={() => {}} />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerBasicMultiselect.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerBasicMultiselect.doc.mjs
deleted file mode 100644
index c6912cead9..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerBasicMultiselect.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Tokenizer — Basic multi-select',
- description: 'Basic multi-select',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Tokenizer', 'Typeahead'],
-};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerBasicMultiselect.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerBasicMultiselect.tsx
deleted file mode 100644
index dc3ae09492..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerBasicMultiselect.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTokenizer} from '@xds/core/Tokenizer';
-import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
-
-const users: XDSSearchableItem[] = [
- {id: 'alice', label: 'Alice'},
- {id: 'bob', label: 'Bob'},
-];
-
-export default function TokenizerBasicMultiselect() {
- const [selected, setSelected] = useState<XDSSearchableItem[]>([]);
-
- const source: XDSSearchSource = {
- search: (query: string) => users.filter((u) => u.label.includes(query)),
- bootstrap: () => users.slice(0, 5),
- };
-
- return (
- <XDSTokenizer
- label="Team Members"
- searchSource={source}
- value={selected}
- onChange={(items) => {
- setSelected(items);
- }}
- placeholder="Search people..."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatableTags.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatableTags.doc.mjs
new file mode 100644
index 0000000000..b031e85812
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatableTags.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Tokenizer — Creatable Tags',
+ description:
+ 'Free-text tokenizer for creating custom tags by typing and pressing Enter.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Tokenizer'],
+};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatableTags.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatableTags.tsx
new file mode 100644
index 0000000000..731aa31bd5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCreatableTags.tsx
@@ -0,0 +1,29 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTokenizer} from '@xds/core/Tokenizer';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const emptySource: XDSSearchSource = {
+ search: () => [],
+ bootstrap: () => [],
+};
+
+export default function TokenizerCreatableTags() {
+ const [tags, setTags] = useState<XDSSearchableItem[]>([]);
+ return (
+ <div>
+ <XDSTokenizer
+ label="Tags"
+ searchSource={emptySource}
+ value={tags}
+ onChange={items => setTags(items)}
+ hasCreate
+ placeholder="Type a tag and press Enter..."
+ />
+ <p style={{marginTop: 8, fontSize: 14, color: '#666'}}>
+ {tags.length} tag{tags.length !== 1 ? 's' : ''} added
+ </p>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCustomTokenRendering.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCustomTokenRendering.doc.mjs
deleted file mode 100644
index 0c6afc360c..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCustomTokenRendering.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Tokenizer — Custom token rendering',
- description: 'Custom token rendering',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Token', 'Tokenizer', 'Typeahead'],
-};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCustomTokenRendering.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerCustomTokenRendering.tsx
deleted file mode 100644
index 3827437a5f..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerCustomTokenRendering.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSToken, type XDSTokenColor} from '@xds/core/Token';
-import {XDSTokenizer} from '@xds/core/Tokenizer';
-import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
-
-type TagItem = XDSSearchableItem<{color: XDSTokenColor}>;
-
-const tagSource: XDSSearchSource<TagItem> = {
- search: (query: string) =>
- (
- [
- {id: 'bug', label: 'Bug', auxiliaryData: {color: 'red' as const}},
- {
- id: 'feature',
- label: 'Feature',
- auxiliaryData: {color: 'blue' as const},
- },
- ] satisfies TagItem[]
- ).filter((t) => t.label.toLowerCase().includes(query.toLowerCase())),
- bootstrap: () => [
- {id: 'bug', label: 'Bug', auxiliaryData: {color: 'red' as const}},
- {
- id: 'feature',
- label: 'Feature',
- auxiliaryData: {color: 'blue' as const},
- },
- ],
-};
-
-export default function TokenizerCustomTokenRendering() {
- const [tags, setTags] = useState<TagItem[]>([]);
-
- return (
- <XDSTokenizer
- label="Tags"
- searchSource={tagSource}
- value={tags}
- onChange={(items) => setTags(items)}
- renderToken={(item, onRemove) => (
- <XDSToken
- label={item.label}
- color={item.auxiliaryData?.color}
- onRemove={onRemove}
- />
- )}
- maxEntries={10}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerFreetextTagsHasCreate.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerFreetextTagsHasCreate.doc.mjs
deleted file mode 100644
index fe1ead2b1b..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerFreetextTagsHasCreate.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Tokenizer — Free-text tags (hasCreate)',
- description: 'Free-text tags (hasCreate)',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Tokenizer', 'Typeahead'],
-};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerFreetextTagsHasCreate.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerFreetextTagsHasCreate.tsx
deleted file mode 100644
index ea72d161c2..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerFreetextTagsHasCreate.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTokenizer} from '@xds/core/Tokenizer';
-import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
-
-export default function TokenizerFreetextTagsHasCreate() {
- const [tags, setTags] = useState<XDSSearchableItem[]>([]);
-
- const emptySource: XDSSearchSource = {
- search: () => [],
- bootstrap: () => [],
- };
-
- return (
- <XDSTokenizer
- label="Tags"
- searchSource={emptySource}
- value={tags}
- onChange={(items, change) => {
- setTags(items);
- if (change.type === 'create') {
- console.log('New tag:', change.item.label);
- }
- }}
- hasCreate
- placeholder="Type a tag and press Enter..."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerPreselectedItems.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerPreselectedItems.doc.mjs
new file mode 100644
index 0000000000..78f0b19442
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerPreselectedItems.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Tokenizer — Pre-selected Items',
+ description:
+ 'Tokenizer pre-populated with selected items that users can modify.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Tokenizer'],
+};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerPreselectedItems.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerPreselectedItems.tsx
new file mode 100644
index 0000000000..06b65b6c70
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerPreselectedItems.tsx
@@ -0,0 +1,32 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTokenizer} from '@xds/core/Tokenizer';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const users: XDSSearchableItem[] = [
+ {id: '1', label: 'Alice Johnson'},
+ {id: '2', label: 'Bob Smith'},
+ {id: '3', label: 'Charlie Brown'},
+ {id: '4', label: 'Diana Prince'},
+ {id: '5', label: 'Eve Williams'},
+];
+
+const userSource: XDSSearchSource = {
+ search: (query: string) =>
+ users.filter(u => u.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => users.slice(0, 5),
+};
+
+export default function TokenizerPreselectedItems() {
+ const [value, setValue] = useState<XDSSearchableItem[]>([users[0], users[2]]);
+ return (
+ <XDSTokenizer
+ label="Team Members"
+ placeholder="Add more..."
+ searchSource={userSource}
+ value={value}
+ onChange={items => setValue(items)}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerValidationError.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerValidationError.doc.mjs
new file mode 100644
index 0000000000..2b04c97f4b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerValidationError.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Tokenizer — Validation Error',
+ description:
+ 'Tokenizer displaying an error status message for form validation.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Tokenizer'],
+};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerValidationError.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerValidationError.tsx
new file mode 100644
index 0000000000..d4e92623c3
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerValidationError.tsx
@@ -0,0 +1,33 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTokenizer} from '@xds/core/Tokenizer';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const users: XDSSearchableItem[] = [
+ {id: '1', label: 'Alice Johnson'},
+ {id: '2', label: 'Bob Smith'},
+ {id: '3', label: 'Charlie Brown'},
+ {id: '4', label: 'Diana Prince'},
+ {id: '5', label: 'Eve Williams'},
+];
+
+const userSource: XDSSearchSource = {
+ search: (query: string) =>
+ users.filter(u => u.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => users.slice(0, 5),
+};
+
+export default function TokenizerValidationError() {
+ const [value, setValue] = useState<XDSSearchableItem[]>([]);
+ return (
+ <XDSTokenizer
+ label="Team Members"
+ placeholder="Search people..."
+ searchSource={userSource}
+ value={value}
+ onChange={items => setValue(items)}
+ status={{type: 'error', message: 'At least one member is required'}}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithEndContent.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithEndContent.doc.mjs
new file mode 100644
index 0000000000..7d1c4641f8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithEndContent.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Tokenizer — With End Content',
+ description:
+ 'Tokenizer with an action button in the end slot for inline actions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Tokenizer', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithEndContent.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithEndContent.tsx
new file mode 100644
index 0000000000..9cc5501210
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithEndContent.tsx
@@ -0,0 +1,36 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTokenizer} from '@xds/core/Tokenizer';
+import {XDSButton} from '@xds/core/Button';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const users: XDSSearchableItem[] = [
+ {id: '1', label: 'Alice Johnson'},
+ {id: '2', label: 'Bob Smith'},
+ {id: '3', label: 'Charlie Brown'},
+ {id: '4', label: 'Diana Prince'},
+ {id: '5', label: 'Eve Williams'},
+];
+
+const userSource: XDSSearchSource = {
+ search: (query: string) =>
+ users.filter(u => u.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => users.slice(0, 5),
+};
+
+export default function TokenizerWithEndContent() {
+ const [value, setValue] = useState<XDSSearchableItem[]>([
+ users[0],
+ users[2],
+ ]);
+ return (
+ <XDSTokenizer
+ label="Team Members"
+ searchSource={userSource}
+ value={value}
+ onChange={items => setValue(items)}
+ endContent={<XDSButton label="Apply" variant="primary" size="sm" />}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithMaxEntriesAndClearAll.doc.mjs b/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithMaxEntriesAndClearAll.doc.mjs
deleted file mode 100644
index c95ee50d80..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithMaxEntriesAndClearAll.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Tokenizer — With max entries and clear all',
- description: 'With max entries and clear all',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Tokenizer', 'Typeahead'],
-};
diff --git a/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithMaxEntriesAndClearAll.tsx b/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithMaxEntriesAndClearAll.tsx
deleted file mode 100644
index 27556e9451..0000000000
--- a/packages/cli/templates/blocks/components/Tokenizer/TokenizerWithMaxEntriesAndClearAll.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTokenizer} from '@xds/core/Tokenizer';
-import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
-
-const tagSource: XDSSearchSource = {
- search: (query: string) =>
- (
- [
- {id: 'bug', label: 'Bug'},
- {id: 'feature', label: 'Feature'},
- ] satisfies XDSSearchableItem[]
- ).filter((t) => t.label.toLowerCase().includes(query.toLowerCase())),
- bootstrap: () => [
- {id: 'bug', label: 'Bug'},
- {id: 'feature', label: 'Feature'},
- ],
-};
-
-export default function TokenizerWithMaxEntriesAndClearAll() {
- const [tags, setTags] = useState<XDSSearchableItem[]>([]);
-
- return (
- <XDSTokenizer
- label="Tags"
- searchSource={tagSource}
- value={tags}
- onChange={(items) => setTags(items)}
- maxEntries={5}
- hasClear
- placeholder="Add up to 5 tags..."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarBasicToolbarWithStartAndEndActions.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarBasicToolbarWithStartAndEndActions.doc.mjs
deleted file mode 100644
index 4c30529f3c..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarBasicToolbarWithStartAndEndActions.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Toolbar — Basic toolbar with start and end actions',
- description: 'Basic toolbar with start and end actions',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Toolbar', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarBasicToolbarWithStartAndEndActions.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarBasicToolbarWithStartAndEndActions.tsx
deleted file mode 100644
index 102f1bdcc2..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarBasicToolbarWithStartAndEndActions.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSToolbar} from '@xds/core/Toolbar';
-
-function BoldIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function ItalicIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function UnderlineIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function SettingsIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function ToolbarBasicToolbarWithStartAndEndActions() {
- return (
- <XDSToolbar
- label="Text formatting"
- startContent={
- <>
- <XDSButton label="Bold" variant="ghost" icon={<BoldIcon />} />
- <XDSButton label="Italic" variant="ghost" icon={<ItalicIcon />} />
- <XDSButton label="Underline" variant="ghost" icon={<UnderlineIcon />} />
- </>
- }
- endContent={
- <XDSButton label="Settings" variant="ghost" icon={<SettingsIcon />} />
- }
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarBulkSelection.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarBulkSelection.doc.mjs
new file mode 100644
index 0000000000..5ea3183eff
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarBulkSelection.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toolbar — Bulk Selection',
+ description:
+ 'Contextual toolbar for bulk item selection with badge count and actions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toolbar', 'Badge', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarBulkSelection.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarBulkSelection.tsx
new file mode 100644
index 0000000000..bf73107f1d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarBulkSelection.tsx
@@ -0,0 +1,59 @@
+'use client';
+
+import {XDSToolbar} from '@xds/core/Toolbar';
+import {XDSBadge} from '@xds/core/Badge';
+import {XDSButton} from '@xds/core/Button';
+
+export default function ToolbarBulkSelection() {
+ return (
+ <XDSToolbar
+ label="Bulk actions"
+ variant="wash"
+ startContent={
+ <>
+ <XDSBadge label="5 selected" />
+ <XDSButton
+ label="Delete"
+ variant="ghost"
+ size="sm"
+ icon={
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.5}
+ strokeLinecap="round"
+ strokeLinejoin="round">
+ <path d="M3 4h10M5 4V3a1 1 0 011-1h4a1 1 0 011 1v1m2 0v9a1 1 0 01-1 1H4a1 1 0 01-1-1V4h10z" />
+ </svg>
+ }
+ isIconOnly
+ />
+ <XDSButton
+ label="Archive"
+ variant="ghost"
+ size="sm"
+ icon={
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.5}
+ strokeLinecap="round"
+ strokeLinejoin="round">
+ <rect x="1" y="2" width="14" height="3" rx="1" />
+ <path d="M2 5v8a1 1 0 001 1h10a1 1 0 001-1V5M6.5 8h3" />
+ </svg>
+ }
+ isIconOnly
+ />
+ </>
+ }
+ endContent={<XDSButton label="Deselect all" variant="ghost" size="sm" />}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.doc.mjs
new file mode 100644
index 0000000000..9e55da0c3c
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toolbar — Card Header',
+ description:
+ 'Compact toolbar as a card header with title, filter, and add actions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toolbar', 'Card', 'Section', 'Button', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx
new file mode 100644
index 0000000000..d1aabfaa10
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx
@@ -0,0 +1,63 @@
+'use client';
+
+import {XDSToolbar} from '@xds/core/Toolbar';
+import {XDSCard} from '@xds/core/Card';
+import {XDSSection} from '@xds/core/Section';
+import {XDSText, XDSHeading} from '@xds/core/Text';
+import {XDSButton} from '@xds/core/Button';
+
+export default function ToolbarCardHeader() {
+ return (
+ <XDSCard width={600}>
+ <XDSToolbar
+ label="User list actions"
+ size="sm"
+ dividers={['bottom']}
+ startContent={<XDSHeading level={4}>Users</XDSHeading>}
+ endContent={
+ <>
+ <XDSButton
+ label="Filter"
+ variant="ghost"
+ size="sm"
+ icon={
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.5}
+ strokeLinecap="round"
+ strokeLinejoin="round">
+ <path d="M1.5 3h13L9.5 9v4l-3 1.5V9L1.5 3z" />
+ </svg>
+ }
+ isIconOnly
+ />
+ <XDSButton
+ label="Add user"
+ size="sm"
+ icon={
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={2}
+ strokeLinecap="round">
+ <path d="M8 3v10M3 8h10" />
+ </svg>
+ }
+ isIconOnly
+ />
+ </>
+ }
+ />
+ <XDSSection>
+ <XDSText type="body">Table rows go here...</XDSText>
+ </XDSSection>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeaderPattern.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeaderPattern.doc.mjs
deleted file mode 100644
index de9b422f4a..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeaderPattern.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Toolbar — Card header pattern',
- description: 'Card header pattern',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Card', 'Toolbar', 'Text', 'Button', 'Section'],
-};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeaderPattern.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeaderPattern.tsx
deleted file mode 100644
index 376721b1dc..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarCardHeaderPattern.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSCard} from '@xds/core/Card';
-import {XDSSection} from '@xds/core/Section';
-import {XDSText} from '@xds/core/Text';
-import {XDSToolbar} from '@xds/core/Toolbar';
-
-function FunnelIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function ToolbarCardHeaderPattern() {
- return (
- <XDSCard>
- <XDSToolbar
- label="Card actions"
- startContent={<XDSText type="body" weight="bold">Users</XDSText>}
- endContent={
- <>
- <XDSButton label="Filter" variant="ghost" icon={<FunnelIcon />} />
- <XDSButton label="Add" variant="primary" />
- </>
- }
- />
- <XDSSection>{/* card body */}</XDSSection>
- </XDSCard>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarCompactDensity.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarCompactDensity.doc.mjs
deleted file mode 100644
index c706dc5996..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarCompactDensity.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Toolbar — Compact density',
- description: 'Compact density',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Toolbar', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarCompactDensity.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarCompactDensity.tsx
deleted file mode 100644
index fcb1da2253..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarCompactDensity.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSToolbar} from '@xds/core/Toolbar';
-
-export default function ToolbarCompactDensity() {
- return (
- <XDSToolbar
- label="Compact actions"
- size="sm"
- startContent={
- <>
- <XDSButton label="Cut" variant="ghost" size="sm" />
- <XDSButton label="Copy" variant="ghost" size="sm" />
- <XDSButton label="Paste" variant="ghost" size="sm" />
- </>
- }
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarPageHeader.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarPageHeader.doc.mjs
new file mode 100644
index 0000000000..29ebcc3ca0
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarPageHeader.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toolbar — Page Header',
+ description:
+ 'Page-level toolbar with back navigation, centered title, and save actions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toolbar', 'Card', 'Section', 'Button', 'Text'],
+};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarPageHeader.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarPageHeader.tsx
new file mode 100644
index 0000000000..f1d8a6f09e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarPageHeader.tsx
@@ -0,0 +1,48 @@
+'use client';
+
+import {XDSToolbar} from '@xds/core/Toolbar';
+import {XDSCard} from '@xds/core/Card';
+import {XDSSection} from '@xds/core/Section';
+import {XDSText, XDSHeading} from '@xds/core/Text';
+import {XDSButton} from '@xds/core/Button';
+
+export default function ToolbarPageHeader() {
+ return (
+ <XDSCard>
+ <XDSToolbar
+ label="Page navigation"
+ dividers={['bottom']}
+ startContent={
+ <XDSButton
+ label="Back to projects"
+ variant="ghost"
+ icon={
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.5}
+ strokeLinecap="round"
+ strokeLinejoin="round">
+ <path d="M10 3L5 8l5 5" />
+ </svg>
+ }
+ isIconOnly
+ />
+ }
+ centerContent={<XDSHeading level={3}>Project Settings</XDSHeading>}
+ endContent={
+ <>
+ <XDSButton label="Reset" variant="ghost" />
+ <XDSButton label="Save changes" />
+ </>
+ }
+ />
+ <XDSSection>
+ <XDSText type="body">Settings form content...</XDSText>
+ </XDSSection>
+ </XDSCard>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarTableToolbar.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarTableToolbar.doc.mjs
new file mode 100644
index 0000000000..d601baa35b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarTableToolbar.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toolbar — Table Toolbar',
+ description:
+ 'Data table toolbar with search input, filter buttons, and view options.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toolbar', 'TextInput', 'Button', 'MoreMenu', 'Table'],
+};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarTableToolbar.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarTableToolbar.tsx
new file mode 100644
index 0000000000..3710d6d732
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarTableToolbar.tsx
@@ -0,0 +1,54 @@
+'use client';
+
+import {XDSToolbar} from '@xds/core/Toolbar';
+import {XDSButton} from '@xds/core/Button';
+import {XDSTextInput} from '@xds/core/TextInput';
+import {XDSMoreMenu} from '@xds/core/MoreMenu';
+import {XDSTable} from '@xds/core/Table';
+
+export default function ToolbarTableToolbar() {
+ return (
+ <div style={{width: 700}}>
+ <XDSToolbar
+ label="Table filters"
+ startContent={
+ <>
+ <XDSTextInput
+ label="Search"
+ isLabelHidden
+ placeholder="Search..."
+ size="sm"
+ value=""
+ onChange={() => {}}
+ />
+ <XDSButton label="Status" variant="secondary" size="sm" />
+ <XDSButton label="Priority" variant="secondary" size="sm" />
+ <XDSButton label="Assignee" variant="secondary" size="sm" />
+ </>
+ }
+ endContent={
+ <XDSMoreMenu
+ items={[
+ {label: 'Compact view'},
+ {label: 'Comfortable view'},
+ {label: 'Export CSV'},
+ ]}
+ />
+ }
+ />
+ <XDSTable
+ idKey="id"
+ columns={[
+ {key: 'name', header: 'Name'},
+ {key: 'status', header: 'Status'},
+ {key: 'priority', header: 'Priority'},
+ ]}
+ data={[
+ {id: '1', name: 'Fix login bug', status: 'Open', priority: 'High'},
+ {id: '2', name: 'Update docs', status: 'In Progress', priority: 'Medium'},
+ {id: '3', name: 'Add tests', status: 'Open', priority: 'Low'},
+ ]}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlotLayout.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlotLayout.doc.mjs
new file mode 100644
index 0000000000..b6ec55c7fa
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlotLayout.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Toolbar — Three-Slot Layout',
+ description:
+ 'Toolbar with start, center, and end slots for document-style headers.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Toolbar', 'Button', 'Heading'],
+};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlotLayout.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlotLayout.tsx
new file mode 100644
index 0000000000..744b1bb1f8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeSlotLayout.tsx
@@ -0,0 +1,40 @@
+'use client';
+
+import {XDSToolbar} from '@xds/core/Toolbar';
+import {XDSButton} from '@xds/core/Button';
+import {XDSHeading} from '@xds/core/Text';
+
+export default function ToolbarThreeSlotLayout() {
+ return (
+ <XDSToolbar
+ label="Document toolbar"
+ startContent={
+ <XDSButton
+ label="Back"
+ variant="ghost"
+ icon={
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.5}
+ strokeLinecap="round"
+ strokeLinejoin="round">
+ <path d="M10 3L5 8l5 5" />
+ </svg>
+ }
+ isIconOnly
+ />
+ }
+ centerContent={<XDSHeading level={4}>Q1 Planning Document</XDSHeading>}
+ endContent={
+ <>
+ <XDSButton label="Discard" variant="secondary" />
+ <XDSButton label="Save" />
+ </>
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeslotLayoutWithCenteredContent.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeslotLayoutWithCenteredContent.doc.mjs
deleted file mode 100644
index 37639283d0..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeslotLayoutWithCenteredContent.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Toolbar — Three-slot layout with centered content',
- description: 'Three-slot layout with centered content',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Toolbar', 'Button', 'Text'],
-};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeslotLayoutWithCenteredContent.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeslotLayoutWithCenteredContent.tsx
deleted file mode 100644
index c74b7ad6d1..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarThreeslotLayoutWithCenteredContent.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSText} from '@xds/core/Text';
-import {XDSToolbar} from '@xds/core/Toolbar';
-
-export default function ToolbarThreeslotLayoutWithCenteredContent() {
- return (
- <XDSToolbar
- label="Document actions"
- startContent={<XDSButton label="Back" variant="ghost" />}
- centerContent={<XDSText type="body">Document Title</XDSText>}
- endContent={<XDSButton label="Save" variant="primary" />}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarWithXDSOverflowListForResponsiveCollapsing.doc.mjs b/packages/cli/templates/blocks/components/Toolbar/ToolbarWithXDSOverflowListForResponsiveCollapsing.doc.mjs
deleted file mode 100644
index ee43f1793a..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarWithXDSOverflowListForResponsiveCollapsing.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Toolbar — With XDSOverflowList for responsive collapsing',
- description: 'With XDSOverflowList for responsive collapsing',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Toolbar', 'OverflowList', 'Button', 'DropdownMenu'],
-};
diff --git a/packages/cli/templates/blocks/components/Toolbar/ToolbarWithXDSOverflowListForResponsiveCollapsing.tsx b/packages/cli/templates/blocks/components/Toolbar/ToolbarWithXDSOverflowListForResponsiveCollapsing.tsx
deleted file mode 100644
index 76e8d3274d..0000000000
--- a/packages/cli/templates/blocks/components/Toolbar/ToolbarWithXDSOverflowListForResponsiveCollapsing.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
-import {XDSOverflowList} from '@xds/core/OverflowList';
-import {XDSToolbar} from '@xds/core/Toolbar';
-
-const actions = [
- {id: '1', label: 'Cut', onClick: () => {}},
- {id: '2', label: 'Copy', onClick: () => {}},
- {id: '3', label: 'Paste', onClick: () => {}},
-];
-
-export default function ToolbarWithXDSOverflowListForResponsiveCollapsing() {
- return (
- <XDSToolbar
- label="Actions"
- startContent={
- <XDSOverflowList
- overflowRenderer={(overflowItems) => (
- <XDSDropdownMenu
- button={{label: 'More', variant: 'ghost'}}
- items={overflowItems.map(({index}) => ({
- label: actions[index].label,
- onClick: actions[index].onClick,
- }))}
- />
- )}>
- {actions.map((action) => (
- <XDSButton
- key={action.id}
- label={action.label}
- variant="ghost"
- />
- ))}
- </XDSOverflowList>
- }
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipActionBarTooltips.doc.mjs b/packages/cli/templates/blocks/components/Tooltip/TooltipActionBarTooltips.doc.mjs
new file mode 100644
index 0000000000..f913a1598d
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tooltip/TooltipActionBarTooltips.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Tooltip — Action Bar',
+ description:
+ 'Multiple tooltips on an action button bar with contextual descriptions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Tooltip', 'Button', 'HStack'],
+};
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipActionBarTooltips.tsx b/packages/cli/templates/blocks/components/Tooltip/TooltipActionBarTooltips.tsx
new file mode 100644
index 0000000000..dddfa6fc2e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tooltip/TooltipActionBarTooltips.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {XDSTooltip} from '@xds/core/Tooltip';
+import {XDSButton} from '@xds/core/Button';
+import {XDSHStack} from '@xds/core/Layout';
+
+export default function TooltipActionBarTooltips() {
+ return (
+ <XDSHStack gap={4}>
+ <XDSTooltip content="Save your changes" placement="above">
+ <XDSButton label="Save" />
+ </XDSTooltip>
+ <XDSTooltip content="Discard changes" placement="above">
+ <XDSButton label="Cancel" />
+ </XDSTooltip>
+ <XDSTooltip content="Delete permanently" placement="above">
+ <XDSButton label="Delete" variant="destructive" />
+ </XDSTooltip>
+ </XDSHStack>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipUseXDSTooltipHook.doc.mjs b/packages/cli/templates/blocks/components/Tooltip/TooltipHookUsage.doc.mjs
similarity index 52%
rename from packages/cli/templates/blocks/components/Tooltip/TooltipUseXDSTooltipHook.doc.mjs
rename to packages/cli/templates/blocks/components/Tooltip/TooltipHookUsage.doc.mjs
index c38876b958..e1ded214f8 100644
--- a/packages/cli/templates/blocks/components/Tooltip/TooltipUseXDSTooltipHook.doc.mjs
+++ b/packages/cli/templates/blocks/components/Tooltip/TooltipHookUsage.doc.mjs
@@ -1,9 +1,10 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Tooltip — useXDSTooltip hook',
- description: 'useXDSTooltip hook',
+ name: 'Tooltip — Hook Usage',
+ description:
+ 'Programmatic tooltip using the useXDSTooltip hook for direct ref control.',
isReady: true,
- aspectRatio: 1,
+ aspectRatio: 4 / 3,
componentsUsed: ['Tooltip', 'Button'],
};
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipHookUsage.tsx b/packages/cli/templates/blocks/components/Tooltip/TooltipHookUsage.tsx
new file mode 100644
index 0000000000..9472ceab2f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tooltip/TooltipHookUsage.tsx
@@ -0,0 +1,22 @@
+'use client';
+
+import {useXDSTooltip} from '@xds/core/Tooltip';
+import {XDSButton} from '@xds/core/Button';
+
+export default function TooltipHookUsage() {
+ const tooltip = useXDSTooltip({
+ placement: 'above',
+ delay: 100,
+ });
+
+ return (
+ <>
+ <XDSButton
+ label="Using hook directly"
+ ref={tooltip.ref}
+ aria-describedby={tooltip.describedBy}
+ />
+ {tooltip.renderTooltip('Tooltip via hook')}
+ </>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipInlineTextTooltips.doc.mjs b/packages/cli/templates/blocks/components/Tooltip/TooltipInlineTextTooltips.doc.mjs
new file mode 100644
index 0000000000..4470004160
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tooltip/TooltipInlineTextTooltips.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Tooltip — Inline Text',
+ description:
+ 'Tooltips on inline text terms within paragraph content for definitions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Tooltip'],
+};
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipInlineTextTooltips.tsx b/packages/cli/templates/blocks/components/Tooltip/TooltipInlineTextTooltips.tsx
new file mode 100644
index 0000000000..a792b47f6e
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Tooltip/TooltipInlineTextTooltips.tsx
@@ -0,0 +1,21 @@
+'use client';
+
+import {XDSTooltip} from '@xds/core/Tooltip';
+
+export default function TooltipInlineTextTooltips() {
+ return (
+ <p>
+ Learn more about our{' '}
+ <XDSTooltip
+ content="Your data is encrypted and never shared"
+ placement="above">
+ privacy policy
+ </XDSTooltip>{' '}
+ and{' '}
+ <XDSTooltip content="Standard 30-day agreement" placement="above">
+ terms of service
+ </XDSTooltip>
+ .
+ </p>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipUseXDSTooltipHook.tsx b/packages/cli/templates/blocks/components/Tooltip/TooltipUseXDSTooltipHook.tsx
deleted file mode 100644
index d8bd8e93f0..0000000000
--- a/packages/cli/templates/blocks/components/Tooltip/TooltipUseXDSTooltipHook.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSTooltip, useXDSTooltip} from '@xds/core/Tooltip';
-
-export default function TooltipUseXDSTooltipHook() {
- const tooltip = useXDSTooltip({ placement: 'above' });
-
-
- return (
- <>
- <XDSButton label="Hover me" ref={tooltip.ref} aria-describedby={tooltip.describedBy} />
- {tooltip.renderTooltip('Helpful tooltip text')}
- </>
- );
-}
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipXDSTooltipBasic.doc.mjs b/packages/cli/templates/blocks/components/Tooltip/TooltipXDSTooltipBasic.doc.mjs
deleted file mode 100644
index d2b1d8d9ca..0000000000
--- a/packages/cli/templates/blocks/components/Tooltip/TooltipXDSTooltipBasic.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Tooltip — XDSTooltip — basic',
- description: 'XDSTooltip — basic',
- isReady: true,
- aspectRatio: 1,
- componentsUsed: ['Tooltip', 'Button'],
-};
diff --git a/packages/cli/templates/blocks/components/Tooltip/TooltipXDSTooltipBasic.tsx b/packages/cli/templates/blocks/components/Tooltip/TooltipXDSTooltipBasic.tsx
deleted file mode 100644
index 1288b46617..0000000000
--- a/packages/cli/templates/blocks/components/Tooltip/TooltipXDSTooltipBasic.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSTooltip} from '@xds/core/Tooltip';
-
-export default function TooltipXDSTooltipBasic() {
- return (
- <XDSTooltip content="Save your changes" placement="above">
- <XDSButton label="Save" variant="primary" />
- </XDSTooltip>
- );
-}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavBasicNavWithHeadingAndItems.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavBasicNavWithHeadingAndItems.doc.mjs
deleted file mode 100644
index 61bc71cdb7..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavBasicNavWithHeadingAndItems.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TopNav — Basic nav with heading and items',
- description: 'Basic nav with heading and items',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Button', 'NavIcon', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavBasicNavWithHeadingAndItems.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavBasicNavWithHeadingAndItems.tsx
deleted file mode 100644
index 4ec9e9e351..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavBasicNavWithHeadingAndItems.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-'use client';
-
-import {XDSButton} from '@xds/core/Button';
-import {XDSNavIcon} from '@xds/core/NavIcon';
-import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
-
-function HomeIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function BellIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function UserCircleIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function TopNavBasicNavWithHeadingAndItems() {
- return (
- <XDSTopNav
- label="Main navigation"
- heading={
- <XDSTopNavHeading
- heading="My App"
- logo={<XDSNavIcon icon={<HomeIcon />} />}
- href="/"
- />
- }
- startContent={
- <>
- <XDSTopNavItem label="Dashboard" href="/dashboard" isSelected />
- <XDSTopNavItem label="Products" href="/products" />
- <XDSTopNavItem label="Reports" href="/reports" />
- </>
- }
- endContent={
- <>
- <XDSButton
- label="Notifications"
- variant="ghost"
- icon={<BellIcon />}
- />
- <XDSButton
- label="Profile"
- variant="ghost"
- icon={<UserCircleIcon />}
- />
- </>
- }
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavCenteredNavigation.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavCenteredNavigation.doc.mjs
new file mode 100644
index 0000000000..80d55f5773
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavCenteredNavigation.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TopNav — Centered Navigation',
+ description:
+ 'Navigation layout with center-aligned nav items flanked by a logo heading and end actions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TopNav', 'NavIcon', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx
new file mode 100644
index 0000000000..def973a989
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx
@@ -0,0 +1,68 @@
+'use client';
+
+import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+import {XDSButton} from '@xds/core/Button';
+
+function CubeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
+ </svg>
+ );
+}
+
+function SearchIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
+ </svg>
+ );
+}
+
+function UserIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+export default function TopNavCenteredNavigation() {
+ return (
+ <XDSTopNav
+ label="Main navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="My App"
+ logo={<XDSNavIcon icon={<CubeIcon />} />}
+ href="#"
+ />
+ }
+ centerContent={
+ <>
+ <XDSTopNavItem label="Home" href="#" isSelected />
+ <XDSTopNavItem label="Products" href="#" />
+ <XDSTopNavItem label="About" href="#" />
+ </>
+ }
+ endContent={
+ <>
+ <XDSButton
+ label="Search"
+ variant="ghost"
+ icon={<SearchIcon />}
+ isIconOnly
+ />
+ <XDSButton
+ label="Profile"
+ variant="ghost"
+ icon={<UserIcon />}
+ isIconOnly
+ />
+ </>
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.doc.mjs
new file mode 100644
index 0000000000..ec96a86fe9
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TopNav — Enterprise Dashboard',
+ description:
+ 'Full-featured navigation bar with icon-labeled nav items, search, notifications, and a primary CTA.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TopNav', 'NavIcon', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx
new file mode 100644
index 0000000000..f4e1b29070
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx
@@ -0,0 +1,111 @@
+'use client';
+
+import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+import {XDSButton} from '@xds/core/Button';
+
+function ChartIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function HomeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.955-8.955a1.126 1.126 0 0 1 1.59 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
+ </svg>
+ );
+}
+
+function DocumentIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
+ </svg>
+ );
+}
+
+function CogIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.646.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.333.183-.582.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+function SearchIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
+ </svg>
+ );
+}
+
+function BellIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" />
+ </svg>
+ );
+}
+
+export default function TopNavEnterpriseDashboard() {
+ return (
+ <XDSTopNav
+ label="Main navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="Enterprise Dashboard"
+ logo={<XDSNavIcon icon={<ChartIcon />} />}
+ href="#"
+ />
+ }
+ startContent={
+ <>
+ <XDSTopNavItem
+ label="Dashboard"
+ href="#"
+ isSelected
+ icon={<HomeIcon />}
+ />
+ <XDSTopNavItem
+ label="Reports"
+ href="#"
+ icon={<DocumentIcon />}
+ />
+ <XDSTopNavItem
+ label="Analytics"
+ href="#"
+ icon={<ChartIcon />}
+ />
+ <XDSTopNavItem
+ label="Settings"
+ href="#"
+ icon={<CogIcon />}
+ />
+ </>
+ }
+ endContent={
+ <>
+ <XDSButton
+ label="Search"
+ variant="ghost"
+ icon={<SearchIcon />}
+ isIconOnly
+ />
+ <XDSButton
+ label="Notifications"
+ variant="ghost"
+ icon={<BellIcon />}
+ isIconOnly
+ />
+ <XDSButton label="Upgrade" variant="primary" />
+ </>
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavHoverMenu.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavHoverMenu.doc.mjs
new file mode 100644
index 0000000000..95df3fd417
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavHoverMenu.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TopNav — Hover Menu',
+ description:
+ 'Navigation bar with a hover-triggered dropdown menu showing product items with icons and descriptions.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TopNav', 'TopNavMenu', 'NavIcon', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavHoverMenu.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavHoverMenu.tsx
new file mode 100644
index 0000000000..3476dfe845
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavHoverMenu.tsx
@@ -0,0 +1,117 @@
+'use client';
+
+import {
+ XDSTopNav,
+ XDSTopNavHeading,
+ XDSTopNavItem,
+ XDSTopNavMenu,
+} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+import {XDSButton} from '@xds/core/Button';
+
+function CubeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
+ </svg>
+ );
+}
+
+function ChartIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function ShieldIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" />
+ </svg>
+ );
+}
+
+function BoltIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z" />
+ </svg>
+ );
+}
+
+function CodeIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" />
+ </svg>
+ );
+}
+
+function UserIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+export default function TopNavHoverMenu() {
+ return (
+ <XDSTopNav
+ label="Main navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="My App"
+ logo={<XDSNavIcon icon={<CubeIcon />} />}
+ href="#"
+ />
+ }
+ startContent={
+ <>
+ <XDSTopNavItem label="Home" href="#" isSelected />
+ <XDSTopNavMenu
+ label="Products"
+ items={[
+ {
+ title: 'Analytics',
+ description: 'Track and analyze user behavior',
+ icon: <ChartIcon />,
+ href: '#analytics',
+ },
+ {
+ title: 'Security',
+ description: 'Enterprise-grade protection',
+ icon: <ShieldIcon />,
+ href: '#security',
+ },
+ {
+ title: 'Automation',
+ description: 'Streamline your workflows',
+ icon: <BoltIcon />,
+ href: '#automation',
+ },
+ {
+ title: 'Developer Tools',
+ description: 'APIs, SDKs, and CLI tools',
+ icon: <CodeIcon />,
+ href: '#dev-tools',
+ },
+ ]}
+ />
+ <XDSTopNavItem label="Pricing" href="#" />
+ </>
+ }
+ endContent={
+ <XDSButton
+ label="Profile"
+ variant="ghost"
+ icon={<UserIcon />}
+ isIconOnly
+ />
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavInXDSLayoutHeaderSlot.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavInXDSLayoutHeaderSlot.doc.mjs
deleted file mode 100644
index 1c787d20cc..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavInXDSLayoutHeaderSlot.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TopNav — In XDSLayout header slot',
- description: 'In XDSLayout header slot',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['Layout', 'TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavInXDSLayoutHeaderSlot.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavInXDSLayoutHeaderSlot.tsx
deleted file mode 100644
index 1e01db1494..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavInXDSLayoutHeaderSlot.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-'use client';
-
-import {XDSLayout, XDSLayoutContent} from '@xds/core/Layout';
-import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
-
-function Logo() {
- return <div style={{padding: 8}}>Logo</div>;
-}
-
-function MainContent() {
- return <div style={{padding: 8}}>MainContent</div>;
-}
-
-function Avatar() {
- return <div style={{padding: 8}}>Avatar</div>;
-}
-
-export default function TopNavInXDSLayoutHeaderSlot() {
- return (
- <XDSLayout
- header={
- <XDSTopNav
- label="Main navigation"
- heading={<XDSTopNavHeading heading="My App" logo={<Logo />} href="/" />}
- startContent={
- <>
- <XDSTopNavItem label="Home" href="/" isSelected />
- <XDSTopNavItem label="Settings" href="/settings" />
- </>
- }
- endContent={<Avatar />}
- />
- }
- content={
- <XDSLayoutContent role="main">
- <MainContent />
- </XDSLayoutContent>
- }
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavMegaMenu.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavMegaMenu.doc.mjs
new file mode 100644
index 0000000000..0efe7ad541
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavMegaMenu.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TopNav — Mega Menu',
+ description:
+ 'Marketing-style navigation with a full-width mega menu featuring product items and a promotional featured card.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TopNav', 'TopNavMegaMenu', 'NavIcon', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavMegaMenu.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavMegaMenu.tsx
new file mode 100644
index 0000000000..c4300dcc9f
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavMegaMenu.tsx
@@ -0,0 +1,137 @@
+'use client';
+
+import {
+ XDSTopNav,
+ XDSTopNavHeading,
+ XDSTopNavItem,
+ XDSTopNavMegaMenu,
+ XDSTopNavMegaMenuItem,
+ XDSTopNavMegaMenuFeaturedCard,
+} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+import {XDSButton} from '@xds/core/Button';
+
+function CubeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
+ </svg>
+ );
+}
+
+function ChartIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function ShieldIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" />
+ </svg>
+ );
+}
+
+function BoltIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z" />
+ </svg>
+ );
+}
+
+function CodeIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5" />
+ </svg>
+ );
+}
+
+function GlobeIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418" />
+ </svg>
+ );
+}
+
+export default function TopNavMegaMenu() {
+ return (
+ <div style={{position: 'relative'}}>
+ <XDSTopNav
+ label="Marketing navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="Acme"
+ logo={<XDSNavIcon icon={<CubeIcon />} />}
+ href="#"
+ />
+ }
+ startContent={
+ <>
+ <XDSTopNavMegaMenu
+ label="Products"
+ items={
+ <>
+ <XDSTopNavMegaMenuItem
+ title="Analytics"
+ description="Track and analyze user behavior across your apps"
+ icon={<ChartIcon />}
+ href="#analytics"
+ />
+ <XDSTopNavMegaMenuItem
+ title="Security"
+ description="Enterprise-grade protection for your data"
+ icon={<ShieldIcon />}
+ href="#security"
+ />
+ <XDSTopNavMegaMenuItem
+ title="Automation"
+ description="Streamline workflows with intelligent tools"
+ icon={<BoltIcon />}
+ href="#automation"
+ />
+ <XDSTopNavMegaMenuItem
+ title="Developer Tools"
+ description="APIs, SDKs, and CLI for integration"
+ icon={<CodeIcon />}
+ href="#dev-tools"
+ />
+ <XDSTopNavMegaMenuItem
+ title="Global Network"
+ description="Low-latency edge infra in 40+ regions"
+ icon={<GlobeIcon />}
+ href="#network"
+ />
+ </>
+ }
+ featured={
+ <XDSTopNavMegaMenuFeaturedCard
+ title="What's new in v4.0"
+ description="AI-powered analytics and real-time collaboration."
+ image="https://images.unsplash.com/photo-1551434678-e076c223a692?w=560&h=280&fit=crop"
+ imageAlt="Team collaboration"
+ linkLabel="Read the announcement"
+ linkHref="#announcement"
+ />
+ }
+ />
+ <XDSTopNavItem label="Pricing" href="#" />
+ <XDSTopNavItem label="Docs" href="#" />
+ </>
+ }
+ endContent={
+ <>
+ <XDSButton label="Sign in" variant="ghost" />
+ <XDSButton label="Get started" variant="primary" />
+ </>
+ }
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavMultipleDropdowns.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavMultipleDropdowns.doc.mjs
new file mode 100644
index 0000000000..d026a308dd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavMultipleDropdowns.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TopNav — Multiple Dropdowns',
+ description:
+ 'Navigation bar with multiple hover-triggered dropdown menus that auto-close when switching between them.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TopNav', 'TopNavMenu'],
+};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavMultipleDropdowns.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavMultipleDropdowns.tsx
new file mode 100644
index 0000000000..fda97fd7f5
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavMultipleDropdowns.tsx
@@ -0,0 +1,63 @@
+'use client';
+
+import {
+ XDSTopNav,
+ XDSTopNavHeading,
+ XDSTopNavItem,
+ XDSTopNavMenu,
+} from '@xds/core/TopNav';
+
+function ChartIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function ShieldIcon() {
+ return (
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z" />
+ </svg>
+ );
+}
+
+export default function TopNavMultipleDropdowns() {
+ return (
+ <XDSTopNav
+ label="Main navigation"
+ heading={<XDSTopNavHeading heading="Platform" href="#" />}
+ startContent={
+ <>
+ <XDSTopNavMenu
+ label="Products"
+ items={[
+ {
+ title: 'Analytics',
+ description: 'Track behavior',
+ icon: <ChartIcon />,
+ href: '#',
+ },
+ {
+ title: 'Security',
+ description: 'Enterprise protection',
+ icon: <ShieldIcon />,
+ href: '#',
+ },
+ ]}
+ />
+ <XDSTopNavMenu
+ label="Resources"
+ items={[
+ {title: 'Documentation', href: '#'},
+ {title: 'API Reference', href: '#'},
+ {title: 'Community Forum', href: '#'},
+ ]}
+ />
+ <XDSTopNavItem label="Pricing" href="#" />
+ </>
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavWithCenteredContentThreecolumnLayout.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavWithCenteredContentThreecolumnLayout.doc.mjs
deleted file mode 100644
index 02aeb5eee5..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavWithCenteredContentThreecolumnLayout.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TopNav — With centered content (three-column layout)',
- description: 'With centered content (three-column layout)',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavWithCenteredContentThreecolumnLayout.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavWithCenteredContentThreecolumnLayout.tsx
deleted file mode 100644
index 0cae9a5402..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavWithCenteredContentThreecolumnLayout.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client';
-
-import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
-
-function SearchBar() {
- return <div style={{padding: 8}}>SearchBar</div>;
-}
-
-function Avatar() {
- return <div style={{padding: 8}}>Avatar</div>;
-}
-
-export default function TopNavWithCenteredContentThreecolumnLayout() {
- return (
- <XDSTopNav
- label="Main navigation"
- heading={<XDSTopNavHeading heading="My App" href="/" />}
- startContent={<XDSTopNavItem label="Home" href="/" isSelected />}
- centerContent={<SearchBar />}
- endContent={<Avatar />}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavWithHoverMenuAndMegaMenu.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavWithHoverMenuAndMegaMenu.doc.mjs
deleted file mode 100644
index bdf9893af1..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavWithHoverMenuAndMegaMenu.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TopNav — With hover menu and mega menu',
- description: 'With hover menu and mega menu',
- isReady: true,
- aspectRatio: 16 / 4,
- componentsUsed: ['TopNav'],
-};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavWithHoverMenuAndMegaMenu.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavWithHoverMenuAndMegaMenu.tsx
deleted file mode 100644
index 815530924e..0000000000
--- a/packages/cli/templates/blocks/components/TopNav/TopNavWithHoverMenuAndMegaMenu.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-'use client';
-
-import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem, XDSTopNavMegaMenu, XDSTopNavMegaMenuFeaturedCard, XDSTopNavMegaMenuItem, XDSTopNavMenu} from '@xds/core/TopNav';
-
-function BuildingIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function RocketIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function TopNavWithHoverMenuAndMegaMenu() {
- return (
- <XDSTopNav
- label="Main navigation"
- heading={<XDSTopNavHeading heading="My App" href="/" />}
- startContent={
- <>
- <XDSTopNavItem label="Home" href="/" isSelected />
- <XDSTopNavMenu
- label="Products"
- items={[
- {title: 'Analytics', description: 'View metrics', href: '/analytics'},
- {title: 'Reports', description: 'Generate reports', href: '/reports'},
- ]}
- />
- <XDSTopNavMegaMenu
- label="Solutions"
- items={
- <>
- <XDSTopNavMegaMenuItem title="Enterprise" description="For large teams" icon={<BuildingIcon />} href="/enterprise" />
- <XDSTopNavMegaMenuItem title="Startups" description="Move fast" icon={<RocketIcon />} href="/startups" />
- </>
- }
- featured={
- <XDSTopNavMegaMenuFeaturedCard
- title="New: AI Features"
- description="Explore our latest AI-powered tools."
- linkLabel="Learn more"
- linkHref="/ai"
- />
- }
- />
- </>
- }
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavWithLogo.doc.mjs b/packages/cli/templates/blocks/components/TopNav/TopNavWithLogo.doc.mjs
new file mode 100644
index 0000000000..60dd43e9dc
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavWithLogo.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TopNav — With Logo',
+ description:
+ 'Navigation bar with a branded logo icon, heading link, nav items, and a profile action.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TopNav', 'NavIcon', 'Button'],
+};
diff --git a/packages/cli/templates/blocks/components/TopNav/TopNavWithLogo.tsx b/packages/cli/templates/blocks/components/TopNav/TopNavWithLogo.tsx
new file mode 100644
index 0000000000..9c83d19c59
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TopNav/TopNavWithLogo.tsx
@@ -0,0 +1,52 @@
+'use client';
+
+import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
+import {XDSNavIcon} from '@xds/core/NavIcon';
+import {XDSButton} from '@xds/core/Button';
+
+function CubeIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.5V7.914a1.5 1.5 0 0 0-.75-1.299l-7.5-4.329a1.5 1.5 0 0 0-1.5 0l-7.5 4.33A1.5 1.5 0 0 0 3 7.913V16.5a1.5 1.5 0 0 0 .75 1.3l7.5 4.328a1.5 1.5 0 0 0 1.5 0l7.5-4.329A1.5 1.5 0 0 0 21 16.5Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="m3.75 7.5 8.25 4.764 8.25-4.764M12 22.089V12.264" />
+ </svg>
+ );
+}
+
+function UserIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+export default function TopNavWithLogo() {
+ return (
+ <XDSTopNav
+ label="Main navigation"
+ heading={
+ <XDSTopNavHeading
+ heading="Dashboard"
+ logo={<XDSNavIcon icon={<CubeIcon />} />}
+ href="#"
+ />
+ }
+ startContent={
+ <>
+ <XDSTopNavItem label="Overview" href="#" isSelected />
+ <XDSTopNavItem label="Analytics" href="#" />
+ <XDSTopNavItem label="Reports" href="#" />
+ </>
+ }
+ endContent={
+ <XDSButton
+ label="Profile"
+ variant="ghost"
+ icon={<UserIcon />}
+ isIconOnly
+ />
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListBasicTree.doc.mjs b/packages/cli/templates/blocks/components/TreeList/TreeListBasicTree.doc.mjs
deleted file mode 100644
index 9598b9f304..0000000000
--- a/packages/cli/templates/blocks/components/TreeList/TreeListBasicTree.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TreeList — Basic tree',
- description: 'Basic tree',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['TreeList'],
-};
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListBasicTree.tsx b/packages/cli/templates/blocks/components/TreeList/TreeListBasicTree.tsx
deleted file mode 100644
index 286d74e75b..0000000000
--- a/packages/cli/templates/blocks/components/TreeList/TreeListBasicTree.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-'use client';
-
-import {XDSTreeList} from '@xds/core/TreeList';
-
-export default function TreeListBasicTree() {
- return (
- <XDSTreeList
- items={[
- { id: 'src', label: 'src', isExpanded: true, children: [
- { id: 'app', label: 'App.tsx' },
- { id: 'index', label: 'index.tsx' },
- ]},
- { id: 'pkg', label: 'package.json' },
- ]}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.doc.mjs b/packages/cli/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.doc.mjs
new file mode 100644
index 0000000000..cf8876c1df
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TreeList — File Tree With Icons',
+ description:
+ 'File browser tree with folder and document icons distinguishing directories from files.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TreeList', 'Icon'],
+};
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.tsx b/packages/cli/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.tsx
new file mode 100644
index 0000000000..344ac703a1
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.tsx
@@ -0,0 +1,57 @@
+'use client';
+
+import {XDSTreeList} from '@xds/core/TreeList';
+import {XDSIcon} from '@xds/core/Icon';
+
+function FolderIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z" />
+ </svg>
+ );
+}
+
+function DocumentIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
+ </svg>
+ );
+}
+
+const noop = () => {};
+
+export default function TreeListFileTreeWithIcons() {
+ return (
+ <XDSTreeList
+ items={[
+ {
+ id: 'src',
+ label: 'src',
+ isExpanded: true,
+ startContent: <XDSIcon icon={FolderIcon} />,
+ children: [
+ {
+ id: 'app',
+ label: 'App.tsx',
+ onClick: noop,
+ startContent: <XDSIcon icon={DocumentIcon} />,
+ },
+ {
+ id: 'index',
+ label: 'index.tsx',
+ onClick: noop,
+ startContent: <XDSIcon icon={DocumentIcon} />,
+ },
+ ],
+ },
+ {
+ id: 'pkg',
+ label: 'package.json',
+ onClick: noop,
+ startContent: <XDSIcon icon={DocumentIcon} />,
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveItems.doc.mjs b/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveItems.doc.mjs
deleted file mode 100644
index 0de9d6650a..0000000000
--- a/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveItems.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TreeList — Interactive items',
- description: 'Interactive items',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['TreeList'],
-};
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveItems.tsx b/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveItems.tsx
deleted file mode 100644
index d74a1c041c..0000000000
--- a/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveItems.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client';
-
-import {XDSTreeList} from '@xds/core/TreeList';
-
-const navigate = (path: string) => console.log(path);
-
-export default function TreeListInteractiveItems() {
- return (
- <XDSTreeList
- items={[
- { id: 'settings', label: 'Settings', onClick: () => navigate('/settings') },
- { id: 'docs', label: 'Docs', href: '/docs', target: '_blank' },
- ]}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveSettings.doc.mjs b/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveSettings.doc.mjs
new file mode 100644
index 0000000000..79dc9b03dd
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveSettings.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TreeList — Interactive Settings',
+ description:
+ 'Settings panel tree with clickable items, a gear icon, and a documentation link with a chevron indicator.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TreeList', 'Icon'],
+};
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveSettings.tsx b/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveSettings.tsx
new file mode 100644
index 0000000000..7da11a6d1b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListInteractiveSettings.tsx
@@ -0,0 +1,54 @@
+'use client';
+
+import {XDSTreeList} from '@xds/core/TreeList';
+import {XDSIcon} from '@xds/core/Icon';
+
+function CogIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.646.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.333.183-.582.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
+ <path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
+
+function ChevronIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" />
+ </svg>
+ );
+}
+
+export default function TreeListInteractiveSettings() {
+ return (
+ <XDSTreeList
+ items={[
+ {
+ id: 'settings',
+ label: 'Settings',
+ isExpanded: true,
+ startContent: <XDSIcon icon={CogIcon} />,
+ children: [
+ {
+ id: 'general',
+ label: 'General',
+ onClick: () => {},
+ },
+ {
+ id: 'advanced',
+ label: 'Advanced',
+ onClick: () => {},
+ },
+ ],
+ },
+ {
+ id: 'docs',
+ label: 'Documentation',
+ href: '#',
+ endContent: <XDSIcon icon={ChevronIcon} />,
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListMailboxTree.doc.mjs b/packages/cli/templates/blocks/components/TreeList/TreeListMailboxTree.doc.mjs
new file mode 100644
index 0000000000..c7084e589a
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListMailboxTree.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TreeList — Mailbox Tree',
+ description:
+ 'Email folder hierarchy with badge counts showing unread messages per folder.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TreeList', 'Badge'],
+};
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListMailboxTree.tsx b/packages/cli/templates/blocks/components/TreeList/TreeListMailboxTree.tsx
new file mode 100644
index 0000000000..04a7d64570
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListMailboxTree.tsx
@@ -0,0 +1,37 @@
+'use client';
+
+import {XDSTreeList} from '@xds/core/TreeList';
+import {XDSBadge} from '@xds/core/Badge';
+
+const noop = () => {};
+
+export default function TreeListMailboxTree() {
+ return (
+ <XDSTreeList
+ items={[
+ {
+ id: 'inbox',
+ label: 'Inbox',
+ isExpanded: true,
+ endContent: <XDSBadge label="3" />,
+ children: [
+ {
+ id: 'unread',
+ label: 'Unread',
+ onClick: noop,
+ endContent: <XDSBadge label="3" />,
+ },
+ {id: 'starred', label: 'Starred', onClick: noop},
+ ],
+ },
+ {id: 'sent', label: 'Sent', onClick: noop},
+ {
+ id: 'drafts',
+ label: 'Drafts',
+ onClick: noop,
+ endContent: <XDSBadge label="1" />,
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListNavigationTree.doc.mjs b/packages/cli/templates/blocks/components/TreeList/TreeListNavigationTree.doc.mjs
new file mode 100644
index 0000000000..d1e4cdeee4
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListNavigationTree.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'TreeList — Navigation Tree',
+ description:
+ 'Simple section-based navigation tree with a selected item highlighting the current page.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['TreeList'],
+};
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListNavigationTree.tsx b/packages/cli/templates/blocks/components/TreeList/TreeListNavigationTree.tsx
new file mode 100644
index 0000000000..f753cad70b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/TreeList/TreeListNavigationTree.tsx
@@ -0,0 +1,24 @@
+'use client';
+
+import {XDSTreeList} from '@xds/core/TreeList';
+
+const noop = () => {};
+
+export default function TreeListNavigationTree() {
+ return (
+ <XDSTreeList
+ items={[
+ {
+ id: 'nav',
+ label: 'Navigation',
+ isExpanded: true,
+ children: [
+ {id: 'home', label: 'Home', onClick: noop},
+ {id: 'about', label: 'About', onClick: noop, isSelected: true},
+ {id: 'contact', label: 'Contact', onClick: noop},
+ ],
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListWithIconsAndHeader.doc.mjs b/packages/cli/templates/blocks/components/TreeList/TreeListWithIconsAndHeader.doc.mjs
deleted file mode 100644
index 4ced0a59bf..0000000000
--- a/packages/cli/templates/blocks/components/TreeList/TreeListWithIconsAndHeader.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'TreeList — With icons and header',
- description: 'With icons and header',
- isReady: true,
- aspectRatio: 3 / 4,
- componentsUsed: ['TreeList'],
-};
diff --git a/packages/cli/templates/blocks/components/TreeList/TreeListWithIconsAndHeader.tsx b/packages/cli/templates/blocks/components/TreeList/TreeListWithIconsAndHeader.tsx
deleted file mode 100644
index 04d2f7b102..0000000000
--- a/packages/cli/templates/blocks/components/TreeList/TreeListWithIconsAndHeader.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-'use client';
-
-import {XDSTreeList} from '@xds/core/TreeList';
-
-function FolderIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-function FileIcon() {
- return (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
- <circle cx="12" cy="12" r="10" />
- </svg>
- );
-}
-
-export default function TreeListWithIconsAndHeader() {
- return (
- <XDSTreeList
- header={<strong>Project Files</strong>}
- density="compact"
- items={[
- { id: 'src', label: 'src', isExpanded: true, startContent: <FolderIcon />, children: [
- { id: 'app', label: 'App.tsx', startContent: <FileIcon /> },
- ]},
- ]}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadBasicTypeahead.tsx b/packages/cli/templates/blocks/components/Typeahead/TypeaheadBasicTypeahead.tsx
deleted file mode 100644
index 7481fe77b1..0000000000
--- a/packages/cli/templates/blocks/components/Typeahead/TypeaheadBasicTypeahead.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTypeahead} from '@xds/core/Typeahead';
-import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
-
-const fruits: XDSSearchableItem[] = [
- {id: 'apple', label: 'Apple'},
- {id: 'banana', label: 'Banana'},
- {id: 'cherry', label: 'Cherry'},
-];
-
-export default function TypeaheadBasicTypeahead() {
- const [selected, setSelected] = useState<XDSSearchableItem | null>(null);
-
- const source: XDSSearchSource = {
- search: (query: string) => fruits.filter((f) => f.label.includes(query)),
- bootstrap: () => fruits.slice(0, 5),
- };
-
- return (
- <XDSTypeahead
- label="Fruit"
- searchSource={source}
- value={selected}
- onChange={setSelected}
- placeholder="Search fruits..."
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadLimitedResults.doc.mjs b/packages/cli/templates/blocks/components/Typeahead/TypeaheadLimitedResults.doc.mjs
new file mode 100644
index 0000000000..fca6ea6930
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadLimitedResults.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Typeahead — Limited Results',
+ description:
+ 'Typeahead with a capped dropdown showing at most three suggestions, ideal for compact selection UIs.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Typeahead'],
+};
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadLimitedResults.tsx b/packages/cli/templates/blocks/components/Typeahead/TypeaheadLimitedResults.tsx
new file mode 100644
index 0000000000..e56ed953e8
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadLimitedResults.tsx
@@ -0,0 +1,39 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTypeahead} from '@xds/core/Typeahead';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const items: XDSSearchableItem[] = [
+ {id: '1', label: 'Apple'},
+ {id: '2', label: 'Banana'},
+ {id: '3', label: 'Cherry'},
+ {id: '4', label: 'Date'},
+ {id: '5', label: 'Elderberry'},
+ {id: '6', label: 'Fig'},
+ {id: '7', label: 'Grape'},
+ {id: '8', label: 'Honeydew'},
+];
+
+const searchSource: XDSSearchSource = {
+ search: (query: string) =>
+ items.filter(i => i.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => items.slice(0, 5),
+};
+
+export default function TypeaheadLimitedResults() {
+ const [value, setValue] = useState<XDSSearchableItem | null>(null);
+ return (
+ <div style={{width: 320}}>
+ <XDSTypeahead
+ label="Fruit"
+ placeholder="Search fruits..."
+ searchSource={searchSource}
+ value={value}
+ onChange={setValue}
+ hasEntriesOnFocus
+ maxMenuItems={3}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidationStatus.doc.mjs b/packages/cli/templates/blocks/components/Typeahead/TypeaheadSearchField.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidationStatus.doc.mjs
rename to packages/cli/templates/blocks/components/Typeahead/TypeaheadSearchField.doc.mjs
index 3037fe743a..6d6a84bcaf 100644
--- a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidationStatus.doc.mjs
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadSearchField.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Typeahead — With validation status',
- description: 'With validation status',
+ name: 'Typeahead — Search Field',
+ description:
+ 'Search input with a magnifying glass icon and suggestions that appear on focus before typing.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Typeahead'],
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadSearchField.tsx b/packages/cli/templates/blocks/components/Typeahead/TypeaheadSearchField.tsx
new file mode 100644
index 0000000000..a9ffd069ba
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadSearchField.tsx
@@ -0,0 +1,47 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTypeahead} from '@xds/core/Typeahead';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+function SearchIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
+ </svg>
+ );
+}
+
+const items: XDSSearchableItem[] = [
+ {id: '1', label: 'Apple'},
+ {id: '2', label: 'Banana'},
+ {id: '3', label: 'Cherry'},
+ {id: '4', label: 'Date'},
+ {id: '5', label: 'Elderberry'},
+ {id: '6', label: 'Fig'},
+ {id: '7', label: 'Grape'},
+ {id: '8', label: 'Honeydew'},
+];
+
+const searchSource: XDSSearchSource = {
+ search: (query: string) =>
+ items.filter(i => i.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => items.slice(0, 5),
+};
+
+export default function TypeaheadSearchField() {
+ const [value, setValue] = useState<XDSSearchableItem | null>(null);
+ return (
+ <div style={{width: 320}}>
+ <XDSTypeahead
+ label="Fruit"
+ placeholder="Search fruits..."
+ searchSource={searchSource}
+ value={value}
+ onChange={setValue}
+ startIcon={SearchIcon}
+ hasEntriesOnFocus
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithCustomItemRendering.doc.mjs b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithCustomItemRendering.doc.mjs
deleted file mode 100644
index 9a7235bd04..0000000000
--- a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithCustomItemRendering.doc.mjs
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
-export const doc = {
- type: 'block',
- name: 'Typeahead — With custom item rendering',
- description: 'With custom item rendering',
- isReady: true,
- aspectRatio: 4 / 3,
- componentsUsed: ['Avatar', 'Typeahead'],
-};
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithCustomItemRendering.tsx b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithCustomItemRendering.tsx
deleted file mode 100644
index 1d311a82b7..0000000000
--- a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithCustomItemRendering.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSAvatar} from '@xds/core/Avatar';
-import {XDSTypeahead, XDSTypeaheadItem} from '@xds/core/Typeahead';
-import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
-
-type UserItem = XDSSearchableItem<{avatar: string; role: string}>;
-
-const userSource: XDSSearchSource<UserItem> = {
- search: (query: string) =>
- (
- [
- {
- id: 'alice',
- label: 'Alice',
- auxiliaryData: {avatar: '/alice.png', role: 'Admin'},
- },
- ] satisfies UserItem[]
- ).filter((u) => u.label.toLowerCase().includes(query.toLowerCase())),
- bootstrap: () => [
- {
- id: 'alice',
- label: 'Alice',
- auxiliaryData: {avatar: '/alice.png', role: 'Admin'},
- },
- ],
-};
-
-export default function TypeaheadWithCustomItemRendering() {
- const [assignee, setAssignee] = useState<UserItem | null>(null);
-
- return (
- <XDSTypeahead
- label="Assignee"
- searchSource={userSource}
- value={assignee}
- onChange={setAssignee}
- placeholder="Search users..."
- hasEntriesOnFocus
- renderItem={(item: UserItem) => (
- <XDSTypeaheadItem
- item={item}
- icon={
- <XDSAvatar src={item.auxiliaryData?.avatar} size="small" />
- }
- description={item.auxiliaryData?.role}
- />
- )}
- />
- );
-}
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadBasicTypeahead.doc.mjs b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithHelperText.doc.mjs
similarity index 54%
rename from packages/cli/templates/blocks/components/Typeahead/TypeaheadBasicTypeahead.doc.mjs
rename to packages/cli/templates/blocks/components/Typeahead/TypeaheadWithHelperText.doc.mjs
index 78bef975d7..7a71935e49 100644
--- a/packages/cli/templates/blocks/components/Typeahead/TypeaheadBasicTypeahead.doc.mjs
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithHelperText.doc.mjs
@@ -1,8 +1,9 @@
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
export const doc = {
type: 'block',
- name: 'Typeahead — Basic typeahead',
- description: 'Basic typeahead',
+ name: 'Typeahead — With Helper Text',
+ description:
+ 'Typeahead field with a description below the label providing guidance on what to select.',
isReady: true,
aspectRatio: 4 / 3,
componentsUsed: ['Typeahead'],
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithHelperText.tsx b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithHelperText.tsx
new file mode 100644
index 0000000000..5333e07c53
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithHelperText.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTypeahead} from '@xds/core/Typeahead';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const items: XDSSearchableItem[] = [
+ {id: '1', label: 'Apple'},
+ {id: '2', label: 'Banana'},
+ {id: '3', label: 'Cherry'},
+ {id: '4', label: 'Date'},
+ {id: '5', label: 'Elderberry'},
+ {id: '6', label: 'Fig'},
+ {id: '7', label: 'Grape'},
+ {id: '8', label: 'Honeydew'},
+];
+
+const searchSource: XDSSearchSource = {
+ search: (query: string) =>
+ items.filter(i => i.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => items.slice(0, 5),
+};
+
+export default function TypeaheadWithHelperText() {
+ const [value, setValue] = useState<XDSSearchableItem | null>(null);
+ return (
+ <div style={{width: 320}}>
+ <XDSTypeahead
+ label="Fruit"
+ placeholder="Search fruits..."
+ searchSource={searchSource}
+ value={value}
+ onChange={setValue}
+ description="Pick your favorite fruit from the list"
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidation.doc.mjs b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidation.doc.mjs
new file mode 100644
index 0000000000..e2be0a7740
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidation.doc.mjs
@@ -0,0 +1,10 @@
+/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
+export const doc = {
+ type: 'block',
+ name: 'Typeahead — With Validation',
+ description:
+ 'Typeahead field displaying an error validation message, useful in form contexts requiring selection.',
+ isReady: true,
+ aspectRatio: 4 / 3,
+ componentsUsed: ['Typeahead'],
+};
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidation.tsx b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidation.tsx
new file mode 100644
index 0000000000..a5a3a2d99b
--- /dev/null
+++ b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidation.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {useState} from 'react';
+import {XDSTypeahead} from '@xds/core/Typeahead';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const items: XDSSearchableItem[] = [
+ {id: '1', label: 'Apple'},
+ {id: '2', label: 'Banana'},
+ {id: '3', label: 'Cherry'},
+ {id: '4', label: 'Date'},
+ {id: '5', label: 'Elderberry'},
+ {id: '6', label: 'Fig'},
+ {id: '7', label: 'Grape'},
+ {id: '8', label: 'Honeydew'},
+];
+
+const searchSource: XDSSearchSource = {
+ search: (query: string) =>
+ items.filter(i => i.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => items.slice(0, 5),
+};
+
+export default function TypeaheadWithValidation() {
+ const [value, setValue] = useState<XDSSearchableItem | null>(null);
+ return (
+ <div style={{width: 320}}>
+ <XDSTypeahead
+ label="Fruit"
+ placeholder="Search fruits..."
+ searchSource={searchSource}
+ value={value}
+ onChange={setValue}
+ status={{type: 'error', message: 'Please select a fruit'}}
+ />
+ </div>
+ );
+}
diff --git a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidationStatus.tsx b/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidationStatus.tsx
deleted file mode 100644
index 7efdd01908..0000000000
--- a/packages/cli/templates/blocks/components/Typeahead/TypeaheadWithValidationStatus.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-'use client';
-
-import {useState} from 'react';
-import {XDSTypeahead} from '@xds/core/Typeahead';
-import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
-
-const managerSource: XDSSearchSource = {
- search: (query: string) =>
- (
- [{id: 'alice', label: 'Alice'}] satisfies XDSSearchableItem[]
- ).filter((u) => u.label.toLowerCase().includes(query.toLowerCase())),
- bootstrap: () => [{id: 'alice', label: 'Alice'}],
-};
-
-export default function TypeaheadWithValidationStatus() {
- const [manager, setManager] = useState<XDSSearchableItem | null>(null);
-
- return (
- <XDSTypeahead
- label="Manager"
- searchSource={managerSource}
- value={manager}
- onChange={setManager}
- isRequired
- status={{type: 'error', message: 'A manager is required'}}
- />
- );
-}
diff --git a/packages/cli/templates/showcase/AlertDialog.tsx b/packages/cli/templates/showcase/AlertDialog.tsx
index cf63d521e5..2af69d2460 100644
--- a/packages/cli/templates/showcase/AlertDialog.tsx
+++ b/packages/cli/templates/showcase/AlertDialog.tsx
@@ -3,5 +3,14 @@
import {XDSAlertDialog} from '@xds/core/AlertDialog';
export default function AlertDialogShowcase() {
- return <XDSAlertDialog title="Confirm" description="Are you sure?" />;
+ return (
+ <XDSAlertDialog
+ isOpen={true}
+ onOpenChange={() => {}}
+ title="Delete item?"
+ description="This action cannot be undone. The item and all its data will be permanently removed."
+ actionLabel="Delete"
+ onAction={() => {}}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/AppShell.doc.mjs b/packages/cli/templates/showcase/AppShell.doc.mjs
index ce96a64b81..a54f581508 100644
--- a/packages/cli/templates/showcase/AppShell.doc.mjs
+++ b/packages/cli/templates/showcase/AppShell.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'AppShell', aspectRatio: 16 / 9};
+export const doc = {name: 'AppShell', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/AppShell.tsx b/packages/cli/templates/showcase/AppShell.tsx
index 1cfcb7ca8c..8a9053e3be 100644
--- a/packages/cli/templates/showcase/AppShell.tsx
+++ b/packages/cli/templates/showcase/AppShell.tsx
@@ -1,11 +1,12 @@
'use client';
import {XDSAppShell} from '@xds/core/AppShell';
+import {XDSText} from '@xds/core/Text';
export default function AppShellShowcase() {
return (
- <XDSAppShell>
- <div>Content</div>
+ <XDSAppShell contentPadding={6}>
+ <XDSText type="large">Page Content</XDSText>
</XDSAppShell>
);
}
diff --git a/packages/cli/templates/showcase/AspectRatio.doc.mjs b/packages/cli/templates/showcase/AspectRatio.doc.mjs
index e1a4c0c9e1..970f0e150a 100644
--- a/packages/cli/templates/showcase/AspectRatio.doc.mjs
+++ b/packages/cli/templates/showcase/AspectRatio.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'AspectRatio', aspectRatio: 16 / 9};
+export const doc = {name: 'AspectRatio', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/AspectRatio.tsx b/packages/cli/templates/showcase/AspectRatio.tsx
index a85e58c1b3..30bcdeebe4 100644
--- a/packages/cli/templates/showcase/AspectRatio.tsx
+++ b/packages/cli/templates/showcase/AspectRatio.tsx
@@ -5,7 +5,18 @@ import {XDSAspectRatio} from '@xds/core/AspectRatio';
export default function AspectRatioShowcase() {
return (
<XDSAspectRatio ratio={16 / 9}>
- <div style={{background: '#eee', height: '100%'}} />
+ <div
+ style={{
+ width: '100%',
+ height: '100%',
+ backgroundColor: '#e5e7eb',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+ borderRadius: 8,
+ }}>
+ 16:9
+ </div>
</XDSAspectRatio>
);
}
diff --git a/packages/cli/templates/showcase/Avatar.tsx b/packages/cli/templates/showcase/Avatar.tsx
index f40b642758..b59242bc57 100644
--- a/packages/cli/templates/showcase/Avatar.tsx
+++ b/packages/cli/templates/showcase/Avatar.tsx
@@ -3,5 +3,5 @@
import {XDSAvatar} from '@xds/core/Avatar';
export default function AvatarShowcase() {
- return <XDSAvatar name="Jane Doe" />;
+ return <XDSAvatar name="John Doe" size="medium" />;
}
diff --git a/packages/cli/templates/showcase/Badge.tsx b/packages/cli/templates/showcase/Badge.tsx
index e57458a88e..bcf0761186 100644
--- a/packages/cli/templates/showcase/Badge.tsx
+++ b/packages/cli/templates/showcase/Badge.tsx
@@ -3,5 +3,5 @@
import {XDSBadge} from '@xds/core/Badge';
export default function BadgeShowcase() {
- return <XDSBadge label="New" />;
+ return <XDSBadge label="Badge" />;
}
diff --git a/packages/cli/templates/showcase/Banner.doc.mjs b/packages/cli/templates/showcase/Banner.doc.mjs
index 58fe833c1d..641d8d40b8 100644
--- a/packages/cli/templates/showcase/Banner.doc.mjs
+++ b/packages/cli/templates/showcase/Banner.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Banner', aspectRatio: 16 / 4};
+export const doc = {name: 'Banner', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/Banner.tsx b/packages/cli/templates/showcase/Banner.tsx
index 53c27f68e1..985731b7a3 100644
--- a/packages/cli/templates/showcase/Banner.tsx
+++ b/packages/cli/templates/showcase/Banner.tsx
@@ -3,5 +3,10 @@
import {XDSBanner} from '@xds/core/Banner';
export default function BannerShowcase() {
- return <XDSBanner variant="info">Important update</XDSBanner>;
+ return (
+ <XDSBanner
+ status="info"
+ title="A new software update is available."
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Breadcrumbs.doc.mjs b/packages/cli/templates/showcase/Breadcrumbs.doc.mjs
index a03317d1f5..6a02cafa29 100644
--- a/packages/cli/templates/showcase/Breadcrumbs.doc.mjs
+++ b/packages/cli/templates/showcase/Breadcrumbs.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Breadcrumbs', aspectRatio: 16 / 4};
+export const doc = {name: 'Breadcrumbs', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/Breadcrumbs.tsx b/packages/cli/templates/showcase/Breadcrumbs.tsx
index 6551465677..b332fb8058 100644
--- a/packages/cli/templates/showcase/Breadcrumbs.tsx
+++ b/packages/cli/templates/showcase/Breadcrumbs.tsx
@@ -1,7 +1,13 @@
'use client';
-import {XDSBreadcrumbs} from '@xds/core/Breadcrumbs';
+import {XDSBreadcrumbs, XDSBreadcrumbItem} from '@xds/core/Breadcrumbs';
export default function BreadcrumbsShowcase() {
- return <XDSBreadcrumbs items={[{label: 'Home'}, {label: 'Settings'}]} />;
+ return (
+ <XDSBreadcrumbs>
+ <XDSBreadcrumbItem href="/">Home</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem href="/projects">Projects</XDSBreadcrumbItem>
+ <XDSBreadcrumbItem isCurrent>My Project</XDSBreadcrumbItem>
+ </XDSBreadcrumbs>
+ );
}
diff --git a/packages/cli/templates/showcase/Button.tsx b/packages/cli/templates/showcase/Button.tsx
index e949f92f02..b884ddefbc 100644
--- a/packages/cli/templates/showcase/Button.tsx
+++ b/packages/cli/templates/showcase/Button.tsx
@@ -3,5 +3,5 @@
import {XDSButton} from '@xds/core/Button';
export default function ButtonShowcase() {
- return <XDSButton label="Click me" variant="primary" />;
+ return <XDSButton label="Primary Button" variant="primary" />;
}
diff --git a/packages/cli/templates/showcase/Calendar.doc.mjs b/packages/cli/templates/showcase/Calendar.doc.mjs
index 8f04f5af33..bb4c6a5a85 100644
--- a/packages/cli/templates/showcase/Calendar.doc.mjs
+++ b/packages/cli/templates/showcase/Calendar.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Calendar', aspectRatio: 3 / 4};
+export const doc = {name: 'Calendar', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Calendar.tsx b/packages/cli/templates/showcase/Calendar.tsx
index 4106f6fbee..ef5ebed7ae 100644
--- a/packages/cli/templates/showcase/Calendar.tsx
+++ b/packages/cli/templates/showcase/Calendar.tsx
@@ -3,5 +3,5 @@
import {XDSCalendar} from '@xds/core/Calendar';
export default function CalendarShowcase() {
- return <XDSCalendar />;
+ return <XDSCalendar mode="single" value={undefined} onChange={() => {}} />;
}
diff --git a/packages/cli/templates/showcase/Card.doc.mjs b/packages/cli/templates/showcase/Card.doc.mjs
index f0d04da95b..73d11dc261 100644
--- a/packages/cli/templates/showcase/Card.doc.mjs
+++ b/packages/cli/templates/showcase/Card.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Card', aspectRatio: 4 / 3};
+export const doc = {name: 'Card', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Card.tsx b/packages/cli/templates/showcase/Card.tsx
index d89378e438..09ce002c0f 100644
--- a/packages/cli/templates/showcase/Card.tsx
+++ b/packages/cli/templates/showcase/Card.tsx
@@ -3,5 +3,9 @@
import {XDSCard} from '@xds/core/Card';
export default function CardShowcase() {
- return <XDSCard>Card content</XDSCard>;
+ return (
+ <XDSCard width={300}>
+ <p style={{margin: 0}}>Simple content inside a card.</p>
+ </XDSCard>
+ );
}
diff --git a/packages/cli/templates/showcase/Carousel.doc.mjs b/packages/cli/templates/showcase/Carousel.doc.mjs
index 3d31fd9474..b9fb3ccccd 100644
--- a/packages/cli/templates/showcase/Carousel.doc.mjs
+++ b/packages/cli/templates/showcase/Carousel.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Carousel', aspectRatio: 16 / 9};
+export const doc = {name: 'Carousel', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/Carousel.tsx b/packages/cli/templates/showcase/Carousel.tsx
index d3819f390f..4887576483 100644
--- a/packages/cli/templates/showcase/Carousel.tsx
+++ b/packages/cli/templates/showcase/Carousel.tsx
@@ -1,11 +1,29 @@
'use client';
import {XDSCarousel} from '@xds/core/Carousel';
+import {XDSThumbnail} from '@xds/core/Thumbnail';
+
+const IMAGES = [
+ {id: 1, src: 'https://picsum.photos/id/1042/200/200', label: 'dark.jpg'},
+ {id: 2, src: 'https://picsum.photos/id/1043/200/200', label: 'light.jpg'},
+ {id: 3, src: 'https://picsum.photos/id/1044/200/200', label: 'warm.jpg'},
+ {id: 4, src: 'https://picsum.photos/id/1047/200/200', label: 'mixed.jpg'},
+ {id: 5, src: 'https://picsum.photos/id/1050/200/200', label: 'nature.jpg'},
+];
export default function CarouselShowcase() {
return (
- <XDSCarousel>
- <div>Slide 1</div>
- </XDSCarousel>
+ <div style={{maxWidth: 400}}>
+ <XDSCarousel gap={1} aria-label="Photo thumbnails">
+ {IMAGES.map(img => (
+ <XDSThumbnail
+ key={img.id}
+ src={img.src}
+ alt={img.label}
+ label={img.label}
+ />
+ ))}
+ </XDSCarousel>
+ </div>
);
}
diff --git a/packages/cli/templates/showcase/Center.doc.mjs b/packages/cli/templates/showcase/Center.doc.mjs
index a84e28837e..d50af83581 100644
--- a/packages/cli/templates/showcase/Center.doc.mjs
+++ b/packages/cli/templates/showcase/Center.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Center', aspectRatio: 1};
+export const doc = {name: 'Center', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/Center.tsx b/packages/cli/templates/showcase/Center.tsx
index 1a051b84f0..b14a4b7599 100644
--- a/packages/cli/templates/showcase/Center.tsx
+++ b/packages/cli/templates/showcase/Center.tsx
@@ -3,5 +3,17 @@
import {XDSCenter} from '@xds/core/Center';
export default function CenterShowcase() {
- return <XDSCenter>Centered</XDSCenter>;
+ return (
+ <XDSCenter axis="both" width="100%" height={200}>
+ <div
+ style={{
+ padding: '16px 24px',
+ backgroundColor: '#e8f0fe',
+ borderRadius: 8,
+ fontWeight: 500,
+ }}>
+ Centered Content
+ </div>
+ </XDSCenter>
+ );
}
diff --git a/packages/cli/templates/showcase/Chat.doc.mjs b/packages/cli/templates/showcase/Chat.doc.mjs
index 5a344d13b9..5fcc832cf5 100644
--- a/packages/cli/templates/showcase/Chat.doc.mjs
+++ b/packages/cli/templates/showcase/Chat.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Chat', aspectRatio: 4 / 3};
+export const doc = {name: 'Chat', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Chat.tsx b/packages/cli/templates/showcase/Chat.tsx
index 728fc6b158..c150559901 100644
--- a/packages/cli/templates/showcase/Chat.tsx
+++ b/packages/cli/templates/showcase/Chat.tsx
@@ -3,14 +3,26 @@
import {
XDSChatMessageList,
XDSChatMessage,
- XDSChatBubble,
+ XDSChatMessageBubble,
} from '@xds/core/Chat';
+import {XDSMarkdown} from '@xds/core/Markdown';
export default function ChatShowcase() {
return (
<XDSChatMessageList>
<XDSChatMessage sender="user">
- <XDSChatBubble>Hello</XDSChatBubble>
+ <XDSChatMessageBubble>
+ How should I handle state management in a React app?
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ <XDSChatMessage sender="assistant">
+ <XDSMarkdown density="compact">{`For most cases, **React's built-in state** is sufficient:
+
+- \`useState\` for local component state
+- \`useReducer\` for complex state logic
+- \`useContext\` for shared state across a subtree
+
+For **server state**, use a library like **TanStack Query** or **SWR**.`}</XDSMarkdown>
</XDSChatMessage>
</XDSChatMessageList>
);
diff --git a/packages/cli/templates/showcase/ChatComposer.doc.mjs b/packages/cli/templates/showcase/ChatComposer.doc.mjs
new file mode 100644
index 0000000000..d7d4775bea
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatComposer.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'ChatComposer', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/ChatComposer.tsx b/packages/cli/templates/showcase/ChatComposer.tsx
new file mode 100644
index 0000000000..ffc10ac6e5
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatComposer.tsx
@@ -0,0 +1,7 @@
+'use client';
+
+import {XDSChatComposer} from '@xds/core/Chat';
+
+export default function ChatComposerShowcase() {
+ return <XDSChatComposer onSubmit={() => {}} />;
+}
diff --git a/packages/cli/templates/showcase/ChatComposerInput.doc.mjs b/packages/cli/templates/showcase/ChatComposerInput.doc.mjs
new file mode 100644
index 0000000000..ed2082493a
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatComposerInput.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'ChatComposerInput', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/ChatComposerInput.tsx b/packages/cli/templates/showcase/ChatComposerInput.tsx
new file mode 100644
index 0000000000..df23581975
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatComposerInput.tsx
@@ -0,0 +1,14 @@
+'use client';
+
+import {XDSChatComposer, XDSChatComposerInput} from '@xds/core/Chat';
+
+export default function ChatComposerInputShowcase() {
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ input={
+ <XDSChatComposerInput placeholder="Ask me anything about XDS..." />
+ }
+ />
+ );
+}
diff --git a/packages/cli/templates/showcase/ChatDictation.doc.mjs b/packages/cli/templates/showcase/ChatDictation.doc.mjs
new file mode 100644
index 0000000000..57fb5ef925
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatDictation.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'ChatDictation', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/ChatDictation.tsx b/packages/cli/templates/showcase/ChatDictation.tsx
new file mode 100644
index 0000000000..1fdcf0590c
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatDictation.tsx
@@ -0,0 +1,26 @@
+'use client';
+
+import {XDSChatDictationButton, XDSChatComposer} from '@xds/core/Chat';
+
+const idleDictation = {
+ volume: 0,
+ rawBands: [0, 0, 0, 0, 0],
+ bands: [0, 0, 0, 0, 0],
+ isSupported: true,
+ isListening: false,
+ isSpeaking: false,
+ interimTranscript: '',
+ start: () => {},
+ stop: () => {},
+ abort: () => {},
+ toggle: () => {},
+};
+
+export default function ChatDictationShowcase() {
+ return (
+ <XDSChatComposer
+ onSubmit={() => {}}
+ sendActions={<XDSChatDictationButton dictation={idleDictation} />}
+ />
+ );
+}
diff --git a/packages/cli/templates/showcase/ChatLayout.doc.mjs b/packages/cli/templates/showcase/ChatLayout.doc.mjs
new file mode 100644
index 0000000000..616c872001
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatLayout.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'ChatLayout', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/ChatLayout.tsx b/packages/cli/templates/showcase/ChatLayout.tsx
new file mode 100644
index 0000000000..f165dbeb67
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatLayout.tsx
@@ -0,0 +1,38 @@
+'use client';
+
+import {
+ XDSChatLayout,
+ XDSChatMessageList,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+ XDSChatComposer,
+} from '@xds/core/Chat';
+import {XDSMarkdown} from '@xds/core/Markdown';
+
+export default function ChatLayoutShowcase() {
+ return (
+ <div style={{height: 500, display: 'flex', flexDirection: 'column'}}>
+ <XDSChatLayout
+ composer={
+ <XDSChatComposer
+ onSubmit={() => {}}
+ placeholder="Ask about the codebase..."
+ />
+ }>
+ <XDSChatMessageList>
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ Can you review the Button component?
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ <XDSChatMessage sender="assistant">
+ <XDSMarkdown density="compact">{`The Button component looks solid. A few suggestions:
+
+- Use the **theme token** for border-radius instead of a hardcoded value
+- The focus ring meets **WCAG 2.4.7** requirements`}</XDSMarkdown>
+ </XDSChatMessage>
+ </XDSChatMessageList>
+ </XDSChatLayout>
+ </div>
+ );
+}
diff --git a/packages/cli/templates/showcase/ChatTokenizedText.doc.mjs b/packages/cli/templates/showcase/ChatTokenizedText.doc.mjs
new file mode 100644
index 0000000000..0e4593152c
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatTokenizedText.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'ChatTokenizedText', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/ChatTokenizedText.tsx b/packages/cli/templates/showcase/ChatTokenizedText.tsx
new file mode 100644
index 0000000000..c104bb2bba
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatTokenizedText.tsx
@@ -0,0 +1,23 @@
+'use client';
+
+import {
+ XDSChatTokenizedText,
+ XDSChatMessage,
+ XDSChatMessageBubble,
+} from '@xds/core/Chat';
+
+const tokens = [
+ {value: '@cindy', label: '@Cindy Zhang', variant: 'blue' as const},
+];
+
+export default function ChatTokenizedTextShowcase() {
+ return (
+ <XDSChatMessage sender="user">
+ <XDSChatMessageBubble>
+ <XDSChatTokenizedText tokens={tokens}>
+ Hey @cindy can you review this?
+ </XDSChatTokenizedText>
+ </XDSChatMessageBubble>
+ </XDSChatMessage>
+ );
+}
diff --git a/packages/cli/templates/showcase/ChatToolCalls.doc.mjs b/packages/cli/templates/showcase/ChatToolCalls.doc.mjs
new file mode 100644
index 0000000000..daed126c63
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatToolCalls.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'ChatToolCalls', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/ChatToolCalls.tsx b/packages/cli/templates/showcase/ChatToolCalls.tsx
new file mode 100644
index 0000000000..35b5e6b05e
--- /dev/null
+++ b/packages/cli/templates/showcase/ChatToolCalls.tsx
@@ -0,0 +1,18 @@
+'use client';
+
+import {XDSChatToolCalls} from '@xds/core/Chat';
+
+export default function ChatToolCallsShowcase() {
+ return (
+ <XDSChatToolCalls
+ calls={[
+ {
+ name: 'bash',
+ target: 'git status',
+ status: 'complete',
+ duration: '1.2s',
+ },
+ ]}
+ />
+ );
+}
diff --git a/packages/cli/templates/showcase/CheckboxInput.doc.mjs b/packages/cli/templates/showcase/CheckboxInput.doc.mjs
index 032bb2bc34..7af8ab28d4 100644
--- a/packages/cli/templates/showcase/CheckboxInput.doc.mjs
+++ b/packages/cli/templates/showcase/CheckboxInput.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'CheckboxInput', aspectRatio: 4 / 3};
+export const doc = {name: 'CheckboxInput', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/CheckboxInput.tsx b/packages/cli/templates/showcase/CheckboxInput.tsx
index 7be744b299..10b45f67a0 100644
--- a/packages/cli/templates/showcase/CheckboxInput.tsx
+++ b/packages/cli/templates/showcase/CheckboxInput.tsx
@@ -1,7 +1,11 @@
-'use client';
-
import {XDSCheckboxInput} from '@xds/core/CheckboxInput';
export default function CheckboxInputShowcase() {
- return <XDSCheckboxInput label="Accept terms" />;
+ return (
+ <XDSCheckboxInput
+ label="Accept terms and conditions"
+ value={false}
+ onChange={() => {}}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/CheckboxList.doc.mjs b/packages/cli/templates/showcase/CheckboxList.doc.mjs
index 91c0b81b77..1c66497cf0 100644
--- a/packages/cli/templates/showcase/CheckboxList.doc.mjs
+++ b/packages/cli/templates/showcase/CheckboxList.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'CheckboxList', aspectRatio: 4 / 3};
+export const doc = {name: 'CheckboxList', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/CheckboxList.tsx b/packages/cli/templates/showcase/CheckboxList.tsx
index 0961638ec5..ca02f03add 100644
--- a/packages/cli/templates/showcase/CheckboxList.tsx
+++ b/packages/cli/templates/showcase/CheckboxList.tsx
@@ -1,12 +1,13 @@
'use client';
-import {XDSCheckboxList} from '@xds/core/CheckboxList';
+import {XDSCheckboxList, XDSCheckboxListItem} from '@xds/core/CheckboxList';
export default function CheckboxListShowcase() {
return (
- <XDSCheckboxList
- label="Options"
- items={[{label: 'Option A', value: 'a'}]}
- />
+ <XDSCheckboxList label="Notification preferences" value={[]} onChange={() => {}}>
+ <XDSCheckboxListItem label="Email" value="email" />
+ <XDSCheckboxListItem label="SMS" value="sms" />
+ <XDSCheckboxListItem label="Push notification" value="push" />
+ </XDSCheckboxList>
);
}
diff --git a/packages/cli/templates/showcase/Layer.doc.mjs b/packages/cli/templates/showcase/Code.doc.mjs
similarity index 51%
rename from packages/cli/templates/showcase/Layer.doc.mjs
rename to packages/cli/templates/showcase/Code.doc.mjs
index 78d899bf4d..f5819173a6 100644
--- a/packages/cli/templates/showcase/Layer.doc.mjs
+++ b/packages/cli/templates/showcase/Code.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Layer', aspectRatio: 1};
+export const doc = {name: 'Code', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Code.tsx b/packages/cli/templates/showcase/Code.tsx
new file mode 100644
index 0000000000..781b66b136
--- /dev/null
+++ b/packages/cli/templates/showcase/Code.tsx
@@ -0,0 +1,7 @@
+'use client';
+
+import {XDSCode} from '@xds/core/CodeBlock';
+
+export default function CodeShowcase() {
+ return <XDSCode>const x = 1</XDSCode>;
+}
diff --git a/packages/cli/templates/showcase/CodeBlock.doc.mjs b/packages/cli/templates/showcase/CodeBlock.doc.mjs
new file mode 100644
index 0000000000..e4767d8325
--- /dev/null
+++ b/packages/cli/templates/showcase/CodeBlock.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'CodeBlock', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/CodeBlock.tsx b/packages/cli/templates/showcase/CodeBlock.tsx
new file mode 100644
index 0000000000..d9ddcee065
--- /dev/null
+++ b/packages/cli/templates/showcase/CodeBlock.tsx
@@ -0,0 +1,41 @@
+'use client';
+
+import {XDSCodeBlock} from '@xds/core/CodeBlock';
+
+const code = `import {useState, useEffect} from 'react';
+
+interface User {
+ id: string;
+ name: string;
+ email: string;
+}
+
+async function fetchUser(id: string): Promise<User> {
+ const response = await fetch(\`/api/users/\${id}\`);
+ if (!response.ok) {
+ throw new Error(\`HTTP \${response.status}\`);
+ }
+ return response.json();
+}
+
+export function useUser(id: string) {
+ const [user, setUser] = useState<User | null>(null);
+
+ useEffect(() => {
+ fetchUser(id).then(setUser);
+ }, [id]);
+
+ return user;
+}`;
+
+export default function CodeBlockShowcase() {
+ return (
+ <XDSCodeBlock
+ code={code}
+ language="typescript"
+ title="useUser.ts"
+ hasLineNumbers
+ hasCopyButton
+ />
+ );
+}
diff --git a/packages/cli/templates/showcase/Collapsible.doc.mjs b/packages/cli/templates/showcase/Collapsible.doc.mjs
index dd2926bf9d..20025aa40f 100644
--- a/packages/cli/templates/showcase/Collapsible.doc.mjs
+++ b/packages/cli/templates/showcase/Collapsible.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Collapsible', aspectRatio: 4 / 3};
+export const doc = {name: 'Collapsible', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Collapsible.tsx b/packages/cli/templates/showcase/Collapsible.tsx
index 4cb8a55e37..3f03f9cf4a 100644
--- a/packages/cli/templates/showcase/Collapsible.tsx
+++ b/packages/cli/templates/showcase/Collapsible.tsx
@@ -3,5 +3,11 @@
import {XDSCollapsible} from '@xds/core/Collapsible';
export default function CollapsibleShowcase() {
- return <XDSCollapsible trigger="Details">Hidden content</XDSCollapsible>;
+ return (
+ <XDSCollapsible trigger="Show more details">
+ <p style={{margin: 0}}>
+ This collapsible manages its own state. Click the trigger to toggle.
+ </p>
+ </XDSCollapsible>
+ );
}
diff --git a/packages/cli/templates/showcase/CommandPalette.doc.mjs b/packages/cli/templates/showcase/CommandPalette.doc.mjs
new file mode 100644
index 0000000000..a193d90475
--- /dev/null
+++ b/packages/cli/templates/showcase/CommandPalette.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'CommandPalette', aspectRatio: 1};
diff --git a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteStaticSource.tsx b/packages/cli/templates/showcase/CommandPalette.tsx
similarity index 55%
rename from packages/cli/templates/blocks/components/CommandPalette/CommandPaletteStaticSource.tsx
rename to packages/cli/templates/showcase/CommandPalette.tsx
index bcef63ef8b..13a2944cfa 100644
--- a/packages/cli/templates/blocks/components/CommandPalette/CommandPaletteStaticSource.tsx
+++ b/packages/cli/templates/showcase/CommandPalette.tsx
@@ -1,25 +1,24 @@
'use client';
-import {useState} from 'react';
import {XDSCommandPalette} from '@xds/core/CommandPalette';
-import {createStaticSource} from '@xds/core/Typeahead';
import {XDSButton} from '@xds/core/Button';
+import {createStaticSource} from '@xds/core/Typeahead';
const source = createStaticSource([
{id: 'home', label: 'Home'},
{id: 'settings', label: 'Settings'},
- {id: 'logout', label: 'Sign out'},
+ {id: 'profile', label: 'Profile'},
+ {id: 'dashboard', label: 'Dashboard'},
+ {id: 'help', label: 'Help'},
]);
-export default function CommandPaletteStaticSource() {
- const [isOpen, setIsOpen] = useState(false);
-
+export default function CommandPaletteShowcase() {
return (
<>
- <XDSButton label="Open Command Palette" onClick={() => setIsOpen(true)} />
+ <XDSButton label="Open Command Palette" onClick={() => {}} />
<XDSCommandPalette
- isOpen={isOpen}
- onOpenChange={setIsOpen}
+ isOpen={false}
+ onOpenChange={() => {}}
searchSource={source}
/>
</>
diff --git a/packages/cli/templates/showcase/DateInput.doc.mjs b/packages/cli/templates/showcase/DateInput.doc.mjs
index 963bc6cb4e..77cf3249c0 100644
--- a/packages/cli/templates/showcase/DateInput.doc.mjs
+++ b/packages/cli/templates/showcase/DateInput.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'DateInput', aspectRatio: 4 / 3};
+export const doc = {name: 'DateInput', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/DateInput.tsx b/packages/cli/templates/showcase/DateInput.tsx
index 8edfa49722..c7487066d5 100644
--- a/packages/cli/templates/showcase/DateInput.tsx
+++ b/packages/cli/templates/showcase/DateInput.tsx
@@ -3,5 +3,11 @@
import {XDSDateInput} from '@xds/core/DateInput';
export default function DateInputShowcase() {
- return <XDSDateInput label="Date" />;
+ return (
+ <XDSDateInput
+ label="Date"
+ placeholder="Select a date"
+ onChange={() => {}}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Dialog.doc.mjs b/packages/cli/templates/showcase/Dialog.doc.mjs
index 76e7f2167c..1de5489aa7 100644
--- a/packages/cli/templates/showcase/Dialog.doc.mjs
+++ b/packages/cli/templates/showcase/Dialog.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Dialog', aspectRatio: 4 / 3};
+export const doc = {name: 'Dialog', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Dialog.tsx b/packages/cli/templates/showcase/Dialog.tsx
index a065f27d62..487ca38202 100644
--- a/packages/cli/templates/showcase/Dialog.tsx
+++ b/packages/cli/templates/showcase/Dialog.tsx
@@ -1,11 +1,26 @@
'use client';
-import {XDSDialog} from '@xds/core/Dialog';
+import {XDSDialog, XDSDialogHeader} from '@xds/core/Dialog';
+import {XDSLayout, XDSLayoutContent} from '@xds/core/Layout';
+import {XDSButton} from '@xds/core/Button';
+import {XDSText} from '@xds/core/Text';
export default function DialogShowcase() {
return (
- <XDSDialog isOpen={true} onOpenChange={() => {}}>
- Dialog content
- </XDSDialog>
+ <>
+ <XDSButton label="Open Modal" variant="secondary" onClick={() => {}} />
+ <XDSDialog isOpen={false} onOpenChange={() => {}}>
+ <XDSLayout
+ header={
+ <XDSDialogHeader title="Modal Title" onOpenChange={() => {}} />
+ }
+ content={
+ <XDSLayoutContent>
+ <XDSText type="body">Dialog content goes here.</XDSText>
+ </XDSLayoutContent>
+ }
+ />
+ </XDSDialog>
+ </>
);
}
diff --git a/packages/cli/templates/showcase/Divider.doc.mjs b/packages/cli/templates/showcase/Divider.doc.mjs
index 6773abaed9..19e3ff00ba 100644
--- a/packages/cli/templates/showcase/Divider.doc.mjs
+++ b/packages/cli/templates/showcase/Divider.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Divider', aspectRatio: 16 / 4};
+export const doc = {name: 'Divider', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/DropdownMenu.doc.mjs b/packages/cli/templates/showcase/DropdownMenu.doc.mjs
index 48e6f418c7..b095cc4e8b 100644
--- a/packages/cli/templates/showcase/DropdownMenu.doc.mjs
+++ b/packages/cli/templates/showcase/DropdownMenu.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'DropdownMenu', aspectRatio: 4 / 3};
+export const doc = {name: 'DropdownMenu', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/DropdownMenu.tsx b/packages/cli/templates/showcase/DropdownMenu.tsx
index 62f8c9d5f4..055f1b448e 100644
--- a/packages/cli/templates/showcase/DropdownMenu.tsx
+++ b/packages/cli/templates/showcase/DropdownMenu.tsx
@@ -5,8 +5,12 @@ import {XDSDropdownMenu} from '@xds/core/DropdownMenu';
export default function DropdownMenuShowcase() {
return (
<XDSDropdownMenu
- trigger={<button>Menu</button>}
- items={[{label: 'Edit'}]}
+ button={{label: 'Actions'}}
+ items={[
+ {label: 'Edit', onClick: () => {}},
+ {label: 'Duplicate', onClick: () => {}},
+ {label: 'Delete', onClick: () => {}},
+ ]}
/>
);
}
diff --git a/packages/cli/templates/showcase/EmptyState.doc.mjs b/packages/cli/templates/showcase/EmptyState.doc.mjs
index 7a69b729a5..507c99d114 100644
--- a/packages/cli/templates/showcase/EmptyState.doc.mjs
+++ b/packages/cli/templates/showcase/EmptyState.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'EmptyState', aspectRatio: 4 / 3};
+export const doc = {name: 'EmptyState', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/EmptyState.tsx b/packages/cli/templates/showcase/EmptyState.tsx
index d779fac096..24efe13fa4 100644
--- a/packages/cli/templates/showcase/EmptyState.tsx
+++ b/packages/cli/templates/showcase/EmptyState.tsx
@@ -3,5 +3,10 @@
import {XDSEmptyState} from '@xds/core/EmptyState';
export default function EmptyStateShowcase() {
- return <XDSEmptyState title="No results" />;
+ return (
+ <XDSEmptyState
+ title="No results found"
+ description="Try adjusting your search or filters to find what you need."
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Field.doc.mjs b/packages/cli/templates/showcase/Field.doc.mjs
index 5d9c0ca96c..99d97a1f28 100644
--- a/packages/cli/templates/showcase/Field.doc.mjs
+++ b/packages/cli/templates/showcase/Field.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Field', aspectRatio: 4 / 3};
+export const doc = {name: 'Field', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Field.tsx b/packages/cli/templates/showcase/Field.tsx
index d73d51058c..80836b9b74 100644
--- a/packages/cli/templates/showcase/Field.tsx
+++ b/packages/cli/templates/showcase/Field.tsx
@@ -1,11 +1,9 @@
'use client';
-import {XDSField} from '@xds/core/Field';
+import {XDSTextInput} from '@xds/core/TextInput';
export default function FieldShowcase() {
return (
- <XDSField label="Name">
- <input />
- </XDSField>
+ <XDSTextInput label="Email" value="" onChange={() => {}} placeholder="[email protected]" />
);
}
diff --git a/packages/cli/templates/showcase/FormLayout.doc.mjs b/packages/cli/templates/showcase/FormLayout.doc.mjs
index 876cf1c6f5..339fea6df7 100644
--- a/packages/cli/templates/showcase/FormLayout.doc.mjs
+++ b/packages/cli/templates/showcase/FormLayout.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'FormLayout', aspectRatio: 4 / 3};
+export const doc = {name: 'FormLayout', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/FormLayout.tsx b/packages/cli/templates/showcase/FormLayout.tsx
index 42a7380b8f..02a022dac7 100644
--- a/packages/cli/templates/showcase/FormLayout.tsx
+++ b/packages/cli/templates/showcase/FormLayout.tsx
@@ -1,7 +1,14 @@
'use client';
import {XDSFormLayout} from '@xds/core/FormLayout';
+import {XDSTextInput} from '@xds/core/TextInput';
export default function FormLayoutShowcase() {
- return <XDSFormLayout>Form fields</XDSFormLayout>;
+ return (
+ <XDSFormLayout>
+ <XDSTextInput label="Name" value="" onChange={() => {}} />
+ <XDSTextInput label="Email" value="" onChange={() => {}} />
+ <XDSTextInput label="Bio" value="" onChange={() => {}} />
+ </XDSFormLayout>
+ );
}
diff --git a/packages/cli/templates/showcase/Grid.doc.mjs b/packages/cli/templates/showcase/Grid.doc.mjs
index 0c784859bc..35b149ac2b 100644
--- a/packages/cli/templates/showcase/Grid.doc.mjs
+++ b/packages/cli/templates/showcase/Grid.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Grid', aspectRatio: 4 / 3};
+export const doc = {name: 'Grid', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Grid.tsx b/packages/cli/templates/showcase/Grid.tsx
index dc18f750d2..5ebfd1be7c 100644
--- a/packages/cli/templates/showcase/Grid.tsx
+++ b/packages/cli/templates/showcase/Grid.tsx
@@ -4,10 +4,19 @@ import {XDSGrid} from '@xds/core/Grid';
export default function GridShowcase() {
return (
- <XDSGrid columns={3}>
- <div>1</div>
- <div>2</div>
- <div>3</div>
+ <XDSGrid columns={3} gap={4}>
+ {Array.from({length: 6}, (_, i) => (
+ <div
+ key={i}
+ style={{
+ padding: 16,
+ backgroundColor: 'var(--color-background-body)',
+ borderRadius: 'var(--radius-element, 8px)',
+ textAlign: 'center',
+ }}>
+ Item {i + 1}
+ </div>
+ ))}
</XDSGrid>
);
}
diff --git a/packages/cli/templates/showcase/Heading.doc.mjs b/packages/cli/templates/showcase/Heading.doc.mjs
new file mode 100644
index 0000000000..acc2080616
--- /dev/null
+++ b/packages/cli/templates/showcase/Heading.doc.mjs
@@ -0,0 +1,2 @@
+/** @type {import('@xds/core').ComponentShowcaseDoc} */
+export const doc = {name: 'Heading', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Heading.tsx b/packages/cli/templates/showcase/Heading.tsx
new file mode 100644
index 0000000000..28a4519afa
--- /dev/null
+++ b/packages/cli/templates/showcase/Heading.tsx
@@ -0,0 +1,7 @@
+'use client';
+
+import {XDSHeading} from '@xds/core/Text';
+
+export default function HeadingShowcase() {
+ return <XDSHeading level={1}>Dashboard Overview</XDSHeading>;
+}
diff --git a/packages/cli/templates/showcase/HoverCard.tsx b/packages/cli/templates/showcase/HoverCard.tsx
index 373a463eaf..e2683ae208 100644
--- a/packages/cli/templates/showcase/HoverCard.tsx
+++ b/packages/cli/templates/showcase/HoverCard.tsx
@@ -1,7 +1,27 @@
'use client';
import {XDSHoverCard} from '@xds/core/HoverCard';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack} from '@xds/core/Layout';
export default function HoverCardShowcase() {
- return <XDSHoverCard trigger={<span>Hover</span>}>Details</XDSHoverCard>;
+ return (
+ <div style={{padding: 80}}>
+ <XDSHoverCard
+ placement="above"
+ content={
+ <div style={{width: 200}}>
+ <XDSVStack gap={2}>
+ <div style={{fontWeight: 600}}>Jane Doe</div>
+ <div style={{fontSize: 14, opacity: 0.7}}>Software Engineer</div>
+ <div style={{fontSize: 13}}>
+ Building great products with great people.
+ </div>
+ </XDSVStack>
+ </div>
+ }>
+ <XDSButton label="Hover me">Hover me</XDSButton>
+ </XDSHoverCard>
+ </div>
+ );
}
diff --git a/packages/cli/templates/showcase/Icon.tsx b/packages/cli/templates/showcase/Icon.tsx
index c41893b5e8..5a6b435fe8 100644
--- a/packages/cli/templates/showcase/Icon.tsx
+++ b/packages/cli/templates/showcase/Icon.tsx
@@ -3,5 +3,5 @@
import {XDSIcon} from '@xds/core/Icon';
export default function IconShowcase() {
- return <XDSIcon name="star" />;
+ return <XDSIcon icon="search" color="primary" size="md" />;
}
diff --git a/packages/cli/templates/showcase/IconButton.tsx b/packages/cli/templates/showcase/IconButton.tsx
index 13eaaf4b29..8bc3893ea4 100644
--- a/packages/cli/templates/showcase/IconButton.tsx
+++ b/packages/cli/templates/showcase/IconButton.tsx
@@ -1,7 +1,13 @@
'use client';
import {XDSIconButton} from '@xds/core/IconButton';
+import {XDSIcon} from '@xds/core/Icon';
export default function IconButtonShowcase() {
- return <XDSIconButton label="Settings" icon="gear" />;
+ return (
+ <XDSIconButton
+ label="Settings"
+ icon={<XDSIcon icon="wrench" color="inherit" />}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Kbd.tsx b/packages/cli/templates/showcase/Kbd.tsx
index 97f237fc15..4947cc2339 100644
--- a/packages/cli/templates/showcase/Kbd.tsx
+++ b/packages/cli/templates/showcase/Kbd.tsx
@@ -3,5 +3,5 @@
import {XDSKbd} from '@xds/core/Kbd';
export default function KbdShowcase() {
- return <XDSKbd>⌘K</XDSKbd>;
+ return <XDSKbd keys="mod+k" />;
}
diff --git a/packages/cli/templates/showcase/Layer.tsx b/packages/cli/templates/showcase/Layer.tsx
deleted file mode 100644
index b5517ccc12..0000000000
--- a/packages/cli/templates/showcase/Layer.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSLayer} from '@xds/core/Layer';
-
-export default function LayerShowcase() {
- return <XDSLayer>Layer content</XDSLayer>;
-}
diff --git a/packages/cli/templates/showcase/Layout.doc.mjs b/packages/cli/templates/showcase/Layout.doc.mjs
index 4e8d24267b..18a75484eb 100644
--- a/packages/cli/templates/showcase/Layout.doc.mjs
+++ b/packages/cli/templates/showcase/Layout.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Layout', aspectRatio: 16 / 9};
+export const doc = {name: 'Layout', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/Layout.tsx b/packages/cli/templates/showcase/Layout.tsx
index 81e46911e4..0096c83fc0 100644
--- a/packages/cli/templates/showcase/Layout.tsx
+++ b/packages/cli/templates/showcase/Layout.tsx
@@ -1,7 +1,45 @@
'use client';
-import {XDSLayout} from '@xds/core/Layout';
+import {
+ XDSLayout,
+ XDSLayoutHeader,
+ XDSLayoutContent,
+ XDSLayoutFooter,
+ XDSHStack,
+} from '@xds/core/Layout';
+import {XDSCard} from '@xds/core/Card';
+import {XDSButton} from '@xds/core/Button';
export default function LayoutShowcase() {
- return <XDSLayout>Layout content</XDSLayout>;
+ return (
+ <XDSCard width={400} height={300}>
+ <XDSLayout
+ header={
+ <XDSLayoutHeader hasDivider>
+ <div style={{fontWeight: 600, fontSize: 16}}>Card Title</div>
+ </XDSLayoutHeader>
+ }
+ content={
+ <XDSLayoutContent>
+ <p style={{fontSize: 14, lineHeight: 1.5, margin: 0}}>
+ A basic card layout with header, scrollable content area, and
+ footer with action buttons.
+ </p>
+ </XDSLayoutContent>
+ }
+ footer={
+ <XDSLayoutFooter hasDivider>
+ <XDSHStack gap={2} hAlign="end">
+ <XDSButton label="Cancel" variant="secondary">
+ Cancel
+ </XDSButton>
+ <XDSButton label="Save" variant="primary">
+ Save
+ </XDSButton>
+ </XDSHStack>
+ </XDSLayoutFooter>
+ }
+ />
+ </XDSCard>
+ );
}
diff --git a/packages/cli/templates/showcase/Link.tsx b/packages/cli/templates/showcase/Link.tsx
index a204b7cf3c..05296beab0 100644
--- a/packages/cli/templates/showcase/Link.tsx
+++ b/packages/cli/templates/showcase/Link.tsx
@@ -3,5 +3,9 @@
import {XDSLink} from '@xds/core/Link';
export default function LinkShowcase() {
- return <XDSLink href="#">Link text</XDSLink>;
+ return (
+ <XDSLink label="Documentation" href="/docs" isStandalone>
+ Documentation
+ </XDSLink>
+ );
}
diff --git a/packages/cli/templates/showcase/List.doc.mjs b/packages/cli/templates/showcase/List.doc.mjs
index 6d498280ee..5f2ea9aa98 100644
--- a/packages/cli/templates/showcase/List.doc.mjs
+++ b/packages/cli/templates/showcase/List.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'List', aspectRatio: 3 / 4};
+export const doc = {name: 'List', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/List.tsx b/packages/cli/templates/showcase/List.tsx
index 726e048c9b..e61a172d22 100644
--- a/packages/cli/templates/showcase/List.tsx
+++ b/packages/cli/templates/showcase/List.tsx
@@ -5,7 +5,9 @@ import {XDSList, XDSListItem} from '@xds/core/List';
export default function ListShowcase() {
return (
<XDSList>
- <XDSListItem>Item 1</XDSListItem>
+ <XDSListItem label="Notifications" description="Manage your alerts" />
+ <XDSListItem label="Privacy" description="Control your data" />
+ <XDSListItem label="Security" description="Password and 2FA" />
</XDSList>
);
}
diff --git a/packages/cli/templates/showcase/Markdown.doc.mjs b/packages/cli/templates/showcase/Markdown.doc.mjs
index ad0867548a..0ea1ce72f6 100644
--- a/packages/cli/templates/showcase/Markdown.doc.mjs
+++ b/packages/cli/templates/showcase/Markdown.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Markdown', aspectRatio: 4 / 3};
+export const doc = {name: 'Markdown', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Markdown.tsx b/packages/cli/templates/showcase/Markdown.tsx
index 500ed357ab..21a1205003 100644
--- a/packages/cli/templates/showcase/Markdown.tsx
+++ b/packages/cli/templates/showcase/Markdown.tsx
@@ -2,6 +2,21 @@
import {XDSMarkdown} from '@xds/core/Markdown';
+const content = [
+ '# Markdown Demo',
+ '',
+ 'Renders **markdown** with *design-system-consistent* styling.',
+ '',
+ '## Features',
+ '',
+ '- Headings mapped to the XDS type scale',
+ '- **Bold**, *italic*, and ~~strikethrough~~ text',
+ '- [Links](https://example.com) with external detection',
+ '- Inline `code` and fenced code blocks',
+ '',
+ '> Design systems free teams to focus on problems that matter.',
+].join('\n');
+
export default function MarkdownShowcase() {
- return <XDSMarkdown content="# Hello" />;
+ return <XDSMarkdown>{content}</XDSMarkdown>;
}
diff --git a/packages/cli/templates/showcase/MetadataList.doc.mjs b/packages/cli/templates/showcase/MetadataList.doc.mjs
index 9703d4ab3b..ce02ecf366 100644
--- a/packages/cli/templates/showcase/MetadataList.doc.mjs
+++ b/packages/cli/templates/showcase/MetadataList.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'MetadataList', aspectRatio: 4 / 3};
+export const doc = {name: 'MetadataList', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/MetadataList.tsx b/packages/cli/templates/showcase/MetadataList.tsx
index 0ab70c8987..f3a776527e 100644
--- a/packages/cli/templates/showcase/MetadataList.tsx
+++ b/packages/cli/templates/showcase/MetadataList.tsx
@@ -1,7 +1,13 @@
'use client';
-import {XDSMetadataList} from '@xds/core/MetadataList';
+import {XDSMetadataList, XDSMetadataListItem} from '@xds/core/MetadataList';
export default function MetadataListShowcase() {
- return <XDSMetadataList items={[{label: 'Status', value: 'Active'}]} />;
+ return (
+ <XDSMetadataList>
+ <XDSMetadataListItem label="Name">XDSMetadataList</XDSMetadataListItem>
+ <XDSMetadataListItem label="Status">Active</XDSMetadataListItem>
+ <XDSMetadataListItem label="Owner">Joey</XDSMetadataListItem>
+ </XDSMetadataList>
+ );
}
diff --git a/packages/cli/templates/showcase/MobileNav.doc.mjs b/packages/cli/templates/showcase/MobileNav.doc.mjs
index 901916e812..ccd8505178 100644
--- a/packages/cli/templates/showcase/MobileNav.doc.mjs
+++ b/packages/cli/templates/showcase/MobileNav.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'MobileNav', aspectRatio: 3 / 4};
+export const doc = {name: 'MobileNav', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/MobileNav.tsx b/packages/cli/templates/showcase/MobileNav.tsx
index 742e21587e..4e0ccb7c33 100644
--- a/packages/cli/templates/showcase/MobileNav.tsx
+++ b/packages/cli/templates/showcase/MobileNav.tsx
@@ -1,7 +1,23 @@
'use client';
import {XDSMobileNav} from '@xds/core/MobileNav';
+import {XDSSideNavSection, XDSSideNavItem} from '@xds/core/SideNav';
export default function MobileNavShowcase() {
- return <XDSMobileNav>Nav items</XDSMobileNav>;
+ return (
+ <XDSMobileNav
+ isOpen={true}
+ onOpenChange={() => {}}
+ title="Navigation">
+ <XDSSideNavSection title="Main">
+ <XDSSideNavItem label="Dashboard" isSelected href="/dashboard" />
+ <XDSSideNavItem label="Projects" href="/projects" />
+ <XDSSideNavItem label="Analytics" href="/analytics" />
+ </XDSSideNavSection>
+ <XDSSideNavSection title="Settings">
+ <XDSSideNavItem label="General" href="/settings" />
+ <XDSSideNavItem label="Team" href="/team" />
+ </XDSSideNavSection>
+ </XDSMobileNav>
+ );
}
diff --git a/packages/cli/templates/showcase/MoreMenu.doc.mjs b/packages/cli/templates/showcase/MoreMenu.doc.mjs
index c9db61734c..bb313d38d3 100644
--- a/packages/cli/templates/showcase/MoreMenu.doc.mjs
+++ b/packages/cli/templates/showcase/MoreMenu.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'MoreMenu', aspectRatio: 4 / 3};
+export const doc = {name: 'MoreMenu', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/MoreMenu.tsx b/packages/cli/templates/showcase/MoreMenu.tsx
index 959f9b82c9..1658df5e46 100644
--- a/packages/cli/templates/showcase/MoreMenu.tsx
+++ b/packages/cli/templates/showcase/MoreMenu.tsx
@@ -3,5 +3,13 @@
import {XDSMoreMenu} from '@xds/core/MoreMenu';
export default function MoreMenuShowcase() {
- return <XDSMoreMenu items={[{label: 'Edit'}]} />;
+ return (
+ <XDSMoreMenu
+ items={[
+ {label: 'Edit', onClick: () => {}},
+ {label: 'Duplicate', onClick: () => {}},
+ {label: 'Delete', onClick: () => {}},
+ ]}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/MultiSelector.doc.mjs b/packages/cli/templates/showcase/MultiSelector.doc.mjs
index 71b2e87074..5b438be63b 100644
--- a/packages/cli/templates/showcase/MultiSelector.doc.mjs
+++ b/packages/cli/templates/showcase/MultiSelector.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'MultiSelector', aspectRatio: 4 / 3};
+export const doc = {name: 'MultiSelector', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/MultiSelector.tsx b/packages/cli/templates/showcase/MultiSelector.tsx
index 3d6dac2a69..8e565373f3 100644
--- a/packages/cli/templates/showcase/MultiSelector.tsx
+++ b/packages/cli/templates/showcase/MultiSelector.tsx
@@ -1,7 +1,15 @@
-'use client';
-
import {XDSMultiSelector} from '@xds/core/MultiSelector';
export default function MultiSelectorShowcase() {
- return <XDSMultiSelector label="Tags" items={[]} />;
+ return (
+ <div style={{width: 300}}>
+ <XDSMultiSelector
+ label="Columns"
+ options={['Name', 'Email', 'Role', 'Status', 'Created']}
+ value={[]}
+ onChange={() => {}}
+ placeholder="Select columns..."
+ />
+ </div>
+ );
}
diff --git a/packages/cli/templates/showcase/NavIcon.doc.mjs b/packages/cli/templates/showcase/NavIcon.doc.mjs
deleted file mode 100644
index 2e1eb4f861..0000000000
--- a/packages/cli/templates/showcase/NavIcon.doc.mjs
+++ /dev/null
@@ -1,2 +0,0 @@
-/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'NavIcon', aspectRatio: 16 / 4};
diff --git a/packages/cli/templates/showcase/NavIcon.tsx b/packages/cli/templates/showcase/NavIcon.tsx
deleted file mode 100644
index a3ee5bf05a..0000000000
--- a/packages/cli/templates/showcase/NavIcon.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-'use client';
-
-import {XDSNavIcon} from '@xds/core/NavIcon';
-
-export default function NavIconShowcase() {
- return <XDSNavIcon label="Home" />;
-}
diff --git a/packages/cli/templates/showcase/NumberInput.doc.mjs b/packages/cli/templates/showcase/NumberInput.doc.mjs
index 31a0a246af..60a5410ee5 100644
--- a/packages/cli/templates/showcase/NumberInput.doc.mjs
+++ b/packages/cli/templates/showcase/NumberInput.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'NumberInput', aspectRatio: 4 / 3};
+export const doc = {name: 'NumberInput', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/NumberInput.tsx b/packages/cli/templates/showcase/NumberInput.tsx
index 8203a2fe6c..c722badf82 100644
--- a/packages/cli/templates/showcase/NumberInput.tsx
+++ b/packages/cli/templates/showcase/NumberInput.tsx
@@ -1,7 +1,14 @@
-'use client';
-
import {XDSNumberInput} from '@xds/core/NumberInput';
export default function NumberInputShowcase() {
- return <XDSNumberInput label="Amount" value={0} onChange={() => {}} />;
+ return (
+ <div style={{maxWidth: 300}}>
+ <XDSNumberInput
+ label="Quantity"
+ placeholder="Enter quantity"
+ value={0}
+ onChange={() => {}}
+ />
+ </div>
+ );
}
diff --git a/packages/cli/templates/showcase/OverflowList.doc.mjs b/packages/cli/templates/showcase/OverflowList.doc.mjs
index 0e257193f1..5ff95e45a6 100644
--- a/packages/cli/templates/showcase/OverflowList.doc.mjs
+++ b/packages/cli/templates/showcase/OverflowList.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'OverflowList', aspectRatio: 16 / 4};
+export const doc = {name: 'OverflowList', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/OverflowList.tsx b/packages/cli/templates/showcase/OverflowList.tsx
index 818be7ba74..b76710b9cb 100644
--- a/packages/cli/templates/showcase/OverflowList.tsx
+++ b/packages/cli/templates/showcase/OverflowList.tsx
@@ -1,13 +1,26 @@
'use client';
import {XDSOverflowList} from '@xds/core/OverflowList';
+import {XDSButton} from '@xds/core/Button';
export default function OverflowListShowcase() {
return (
- <XDSOverflowList
- items={[]}
- renderItem={() => null}
- renderOverflow={() => null}
- />
+ <div style={{maxWidth: 400, border: '1px dashed #ccc', padding: 8}}>
+ <XDSOverflowList
+ gap={2}
+ overflowRenderer={overflowItems => (
+ <XDSButton
+ label={`+${overflowItems.length} more`}
+ variant="ghost"
+ size="sm"
+ />
+ )}>
+ <XDSButton label="Edit" size="sm" />
+ <XDSButton label="Duplicate" size="sm" />
+ <XDSButton label="Share" size="sm" />
+ <XDSButton label="Archive" size="sm" />
+ <XDSButton label="Delete" size="sm" />
+ </XDSOverflowList>
+ </div>
);
}
diff --git a/packages/cli/templates/showcase/Pagination.doc.mjs b/packages/cli/templates/showcase/Pagination.doc.mjs
index c8abf2e101..eaef354560 100644
--- a/packages/cli/templates/showcase/Pagination.doc.mjs
+++ b/packages/cli/templates/showcase/Pagination.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Pagination', aspectRatio: 16 / 4};
+export const doc = {name: 'Pagination', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Pagination.tsx b/packages/cli/templates/showcase/Pagination.tsx
index 0529c54d3c..970b011090 100644
--- a/packages/cli/templates/showcase/Pagination.tsx
+++ b/packages/cli/templates/showcase/Pagination.tsx
@@ -1,9 +1,12 @@
-'use client';
-
import {XDSPagination} from '@xds/core/Pagination';
export default function PaginationShowcase() {
return (
- <XDSPagination totalPages={10} currentPage={1} onPageChange={() => {}} />
+ <XDSPagination
+ page={1}
+ onChange={() => {}}
+ totalItems={100}
+ pageSize={10}
+ />
);
}
diff --git a/packages/cli/templates/showcase/Popover.doc.mjs b/packages/cli/templates/showcase/Popover.doc.mjs
index 484b9752ac..933abc3532 100644
--- a/packages/cli/templates/showcase/Popover.doc.mjs
+++ b/packages/cli/templates/showcase/Popover.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Popover', aspectRatio: 4 / 3};
+export const doc = {name: 'Popover', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Popover.tsx b/packages/cli/templates/showcase/Popover.tsx
index e22a3976c3..91482c301f 100644
--- a/packages/cli/templates/showcase/Popover.tsx
+++ b/packages/cli/templates/showcase/Popover.tsx
@@ -1,7 +1,27 @@
'use client';
import {XDSPopover} from '@xds/core/Popover';
+import {XDSButton} from '@xds/core/Button';
+import {XDSVStack} from '@xds/core/Layout';
+import {XDSText, XDSHeading} from '@xds/core/Text';
+import {XDSDivider} from '@xds/core/Divider';
export default function PopoverShowcase() {
- return <XDSPopover trigger={<button>Open</button>}>Content</XDSPopover>;
+ return (
+ <XDSPopover
+ placement="below"
+ label="Settings"
+ width={280}
+ content={
+ <XDSVStack gap={3}>
+ <XDSHeading level={4} tabIndex={-1}>
+ Settings
+ </XDSHeading>
+ <XDSDivider />
+ <XDSText type="body">Notifications, dark mode, and sound preferences.</XDSText>
+ </XDSVStack>
+ }>
+ <XDSButton label="Settings">Settings</XDSButton>
+ </XDSPopover>
+ );
}
diff --git a/packages/cli/templates/showcase/PowerSearch.doc.mjs b/packages/cli/templates/showcase/PowerSearch.doc.mjs
index 73ac965640..babac78025 100644
--- a/packages/cli/templates/showcase/PowerSearch.doc.mjs
+++ b/packages/cli/templates/showcase/PowerSearch.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'PowerSearch', aspectRatio: 4 / 3};
+export const doc = {name: 'PowerSearch', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/PowerSearch.tsx b/packages/cli/templates/showcase/PowerSearch.tsx
index 84dd7359e2..5c5de28586 100644
--- a/packages/cli/templates/showcase/PowerSearch.tsx
+++ b/packages/cli/templates/showcase/PowerSearch.tsx
@@ -1,7 +1,46 @@
-'use client';
-
import {XDSPowerSearch} from '@xds/core/PowerSearch';
+import type {PowerSearchConfig} from '@xds/core/PowerSearch';
+
+const config: PowerSearchConfig = {
+ name: 'BasicSearch',
+ fields: [
+ {
+ key: 'status',
+ label: 'Status',
+ defaultOperator: 'is',
+ operators: [
+ {
+ key: 'is',
+ label: 'is',
+ value: {
+ type: 'enum',
+ values: [
+ {value: 'open', label: 'Open'},
+ {value: 'in_progress', label: 'In Progress'},
+ {value: 'closed', label: 'Closed'},
+ ],
+ },
+ },
+ ],
+ },
+ {
+ key: 'title',
+ label: 'Title',
+ defaultOperator: 'contains',
+ operators: [
+ {key: 'contains', label: 'contains', value: {type: 'string'}},
+ ],
+ },
+ ],
+};
export default function PowerSearchShowcase() {
- return <XDSPowerSearch config={{name: 'search', fields: []}} />;
+ return (
+ <XDSPowerSearch
+ config={config}
+ filters={[]}
+ onChange={() => {}}
+ placeholder="Search by status, title..."
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/ProgressBar.doc.mjs b/packages/cli/templates/showcase/ProgressBar.doc.mjs
index 3b634d8d8e..048356fec3 100644
--- a/packages/cli/templates/showcase/ProgressBar.doc.mjs
+++ b/packages/cli/templates/showcase/ProgressBar.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'ProgressBar', aspectRatio: 16 / 4};
+export const doc = {name: 'ProgressBar', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/ProgressBar.tsx b/packages/cli/templates/showcase/ProgressBar.tsx
index 0d8c6ef726..cb108d1de3 100644
--- a/packages/cli/templates/showcase/ProgressBar.tsx
+++ b/packages/cli/templates/showcase/ProgressBar.tsx
@@ -3,5 +3,5 @@
import {XDSProgressBar} from '@xds/core/ProgressBar';
export default function ProgressBarShowcase() {
- return <XDSProgressBar label="Loading" value={60} />;
+ return <XDSProgressBar value={60} label="Progress" />;
}
diff --git a/packages/cli/templates/showcase/RadioList.doc.mjs b/packages/cli/templates/showcase/RadioList.doc.mjs
index 5bc2433b16..999ad2f813 100644
--- a/packages/cli/templates/showcase/RadioList.doc.mjs
+++ b/packages/cli/templates/showcase/RadioList.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'RadioList', aspectRatio: 4 / 3};
+export const doc = {name: 'RadioList', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/RadioList.tsx b/packages/cli/templates/showcase/RadioList.tsx
index 2ba4a068ee..893d5d0a93 100644
--- a/packages/cli/templates/showcase/RadioList.tsx
+++ b/packages/cli/templates/showcase/RadioList.tsx
@@ -1,7 +1,11 @@
-'use client';
-
-import {XDSRadioList} from '@xds/core/RadioList';
+import {XDSRadioList, XDSRadioListItem} from '@xds/core/RadioList';
export default function RadioListShowcase() {
- return <XDSRadioList label="Choice" items={[{label: 'A', value: 'a'}]} />;
+ return (
+ <XDSRadioList label="Notification preference" value="" onChange={() => {}}>
+ <XDSRadioListItem label="Email" value="email" />
+ <XDSRadioListItem label="SMS" value="sms" />
+ <XDSRadioListItem label="Push notification" value="push" />
+ </XDSRadioList>
+ );
}
diff --git a/packages/cli/templates/showcase/Section.doc.mjs b/packages/cli/templates/showcase/Section.doc.mjs
index 3ebbcf5202..1c4e6cf7bf 100644
--- a/packages/cli/templates/showcase/Section.doc.mjs
+++ b/packages/cli/templates/showcase/Section.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Section', aspectRatio: 4 / 3};
+export const doc = {name: 'Section', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Section.tsx b/packages/cli/templates/showcase/Section.tsx
index 8c62ecd521..0a6dd6c27e 100644
--- a/packages/cli/templates/showcase/Section.tsx
+++ b/packages/cli/templates/showcase/Section.tsx
@@ -3,5 +3,12 @@
import {XDSSection} from '@xds/core/Section';
export default function SectionShowcase() {
- return <XDSSection title="Section">Content</XDSSection>;
+ return (
+ <XDSSection variant="section" width={300}>
+ <p style={{margin: 0}}>
+ A section with default padding. Sections define distinct areas within a
+ page.
+ </p>
+ </XDSSection>
+ );
}
diff --git a/packages/cli/templates/showcase/SegmentedControl.doc.mjs b/packages/cli/templates/showcase/SegmentedControl.doc.mjs
index 2d1bfaab14..1ae6c366e5 100644
--- a/packages/cli/templates/showcase/SegmentedControl.doc.mjs
+++ b/packages/cli/templates/showcase/SegmentedControl.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'SegmentedControl', aspectRatio: 4 / 3};
+export const doc = {name: 'SegmentedControl', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/SegmentedControl.tsx b/packages/cli/templates/showcase/SegmentedControl.tsx
index 9bf32239bb..ed849884c5 100644
--- a/packages/cli/templates/showcase/SegmentedControl.tsx
+++ b/packages/cli/templates/showcase/SegmentedControl.tsx
@@ -1,7 +1,16 @@
'use client';
-import {XDSSegmentedControl} from '@xds/core/SegmentedControl';
+import {
+ XDSSegmentedControl,
+ XDSSegmentedControlItem,
+} from '@xds/core/SegmentedControl';
export default function SegmentedControlShowcase() {
- return <XDSSegmentedControl items={[{label: 'Tab 1', value: '1'}]} />;
+ return (
+ <XDSSegmentedControl value="grid" onChange={() => {}} label="View mode">
+ <XDSSegmentedControlItem value="grid" label="Grid" />
+ <XDSSegmentedControlItem value="list" label="List" />
+ <XDSSegmentedControlItem value="table" label="Table" />
+ </XDSSegmentedControl>
+ );
}
diff --git a/packages/cli/templates/showcase/Selector.doc.mjs b/packages/cli/templates/showcase/Selector.doc.mjs
index 23792a4f32..3ff5daff17 100644
--- a/packages/cli/templates/showcase/Selector.doc.mjs
+++ b/packages/cli/templates/showcase/Selector.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Selector', aspectRatio: 4 / 3};
+export const doc = {name: 'Selector', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Selector.tsx b/packages/cli/templates/showcase/Selector.tsx
index 049f216501..d6de335358 100644
--- a/packages/cli/templates/showcase/Selector.tsx
+++ b/packages/cli/templates/showcase/Selector.tsx
@@ -3,5 +3,12 @@
import {XDSSelector} from '@xds/core/Selector';
export default function SelectorShowcase() {
- return <XDSSelector label="Choose" items={['Option A', 'Option B']} />;
+ return (
+ <XDSSelector
+ label="Fruit"
+ options={['Apple', 'Banana', 'Orange', 'Mango', 'Pineapple']}
+ placeholder="Select a fruit..."
+ onChange={() => {}}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/SideNav.doc.mjs b/packages/cli/templates/showcase/SideNav.doc.mjs
index f65f1e2e00..4e55468aa3 100644
--- a/packages/cli/templates/showcase/SideNav.doc.mjs
+++ b/packages/cli/templates/showcase/SideNav.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'SideNav', aspectRatio: 3 / 4};
+export const doc = {name: 'SideNav', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/SideNav.tsx b/packages/cli/templates/showcase/SideNav.tsx
index cdfb5e69ec..880c37453c 100644
--- a/packages/cli/templates/showcase/SideNav.tsx
+++ b/packages/cli/templates/showcase/SideNav.tsx
@@ -1,11 +1,74 @@
'use client';
-import {XDSSideNav, XDSSideNavItem} from '@xds/core/SideNav';
+import type {ComponentProps} from 'react';
+import {
+ XDSSideNav,
+ XDSSideNavHeading,
+ XDSSideNavItem,
+ XDSSideNavSection,
+} from '@xds/core/SideNav';
+
+function HomeIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
+ </svg>
+ );
+}
+
+function FolderIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z" />
+ </svg>
+ );
+}
+
+function ChartBarIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z" />
+ </svg>
+ );
+}
+
+function DocumentTextIcon(props: ComponentProps<'svg'>) {
+ return (
+ <svg fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" {...props}>
+ <path strokeLinecap="round" strokeLinejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" />
+ </svg>
+ );
+}
export default function SideNavShowcase() {
return (
- <XDSSideNav>
- <XDSSideNavItem label="Dashboard" />
+ <XDSSideNav
+ header={<XDSSideNavHeading heading="My App" headingHref="/" />}>
+ <XDSSideNavSection title="Main">
+ <XDSSideNavItem
+ label="Dashboard"
+ icon={HomeIcon}
+ isSelected
+ href="/dashboard"
+ />
+ <XDSSideNavItem
+ label="Projects"
+ icon={FolderIcon}
+ href="/projects"
+ />
+ <XDSSideNavItem
+ label="Analytics"
+ icon={ChartBarIcon}
+ href="/analytics"
+ />
+ </XDSSideNavSection>
+ <XDSSideNavSection title="Documents">
+ <XDSSideNavItem
+ label="All Documents"
+ icon={DocumentTextIcon}
+ href="/documents"
+ />
+ </XDSSideNavSection>
</XDSSideNav>
);
}
diff --git a/packages/cli/templates/showcase/Skeleton.doc.mjs b/packages/cli/templates/showcase/Skeleton.doc.mjs
index 9f130245a1..4a5ce2d3cf 100644
--- a/packages/cli/templates/showcase/Skeleton.doc.mjs
+++ b/packages/cli/templates/showcase/Skeleton.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Skeleton', aspectRatio: 4 / 3};
+export const doc = {name: 'Skeleton', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Skeleton.tsx b/packages/cli/templates/showcase/Skeleton.tsx
index fa7855f461..fcb493d2c8 100644
--- a/packages/cli/templates/showcase/Skeleton.tsx
+++ b/packages/cli/templates/showcase/Skeleton.tsx
@@ -3,5 +3,5 @@
import {XDSSkeleton} from '@xds/core/Skeleton';
export default function SkeletonShowcase() {
- return <XDSSkeleton />;
+ return <XDSSkeleton width={200} height={20} radius="container" />;
}
diff --git a/packages/cli/templates/showcase/Slider.doc.mjs b/packages/cli/templates/showcase/Slider.doc.mjs
index d26165e29d..20b13b1c20 100644
--- a/packages/cli/templates/showcase/Slider.doc.mjs
+++ b/packages/cli/templates/showcase/Slider.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Slider', aspectRatio: 4 / 3};
+export const doc = {name: 'Slider', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Slider.tsx b/packages/cli/templates/showcase/Slider.tsx
index 61e8856572..fc48e85003 100644
--- a/packages/cli/templates/showcase/Slider.tsx
+++ b/packages/cli/templates/showcase/Slider.tsx
@@ -3,5 +3,5 @@
import {XDSSlider} from '@xds/core/Slider';
export default function SliderShowcase() {
- return <XDSSlider label="Volume" value={50} onChange={() => {}} />;
+ return <XDSSlider label="Volume" value={50} />;
}
diff --git a/packages/cli/templates/showcase/Spinner.tsx b/packages/cli/templates/showcase/Spinner.tsx
index ac7994b60d..f7ef75680b 100644
--- a/packages/cli/templates/showcase/Spinner.tsx
+++ b/packages/cli/templates/showcase/Spinner.tsx
@@ -3,5 +3,5 @@
import {XDSSpinner} from '@xds/core/Spinner';
export default function SpinnerShowcase() {
- return <XDSSpinner label="Loading" />;
+ return <XDSSpinner size="lg" />;
}
diff --git a/packages/cli/templates/showcase/Stack.doc.mjs b/packages/cli/templates/showcase/Stack.doc.mjs
index d8d97de1b8..7b7b618e38 100644
--- a/packages/cli/templates/showcase/Stack.doc.mjs
+++ b/packages/cli/templates/showcase/Stack.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Stack', aspectRatio: 4 / 3};
+export const doc = {name: 'Stack', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Stack.tsx b/packages/cli/templates/showcase/Stack.tsx
index 653ac8975c..b45a3ed815 100644
--- a/packages/cli/templates/showcase/Stack.tsx
+++ b/packages/cli/templates/showcase/Stack.tsx
@@ -1,12 +1,40 @@
'use client';
-import {XDSVStack} from '@xds/core/Stack';
+import {XDSStack} from '@xds/core/Layout';
export default function StackShowcase() {
return (
- <XDSVStack gap={2}>
- <div>Item 1</div>
- <div>Item 2</div>
- </XDSVStack>
+ <XDSStack direction="vertical" gap={2}>
+ <div
+ style={{
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#e8f0fe',
+ color: '#1a73e8',
+ border: '1px solid #c6dafc',
+ }}>
+ Item 1
+ </div>
+ <div
+ style={{
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#e8f0fe',
+ color: '#1a73e8',
+ border: '1px solid #c6dafc',
+ }}>
+ Item 2
+ </div>
+ <div
+ style={{
+ padding: '8px 16px',
+ borderRadius: 6,
+ backgroundColor: '#e8f0fe',
+ color: '#1a73e8',
+ border: '1px solid #c6dafc',
+ }}>
+ Item 3
+ </div>
+ </XDSStack>
);
}
diff --git a/packages/cli/templates/showcase/Switch.doc.mjs b/packages/cli/templates/showcase/Switch.doc.mjs
index a84adfc0c4..393e3ea405 100644
--- a/packages/cli/templates/showcase/Switch.doc.mjs
+++ b/packages/cli/templates/showcase/Switch.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Switch', aspectRatio: 4 / 3};
+export const doc = {name: 'Switch', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Switch.tsx b/packages/cli/templates/showcase/Switch.tsx
index fb6deed51e..4f25ba543f 100644
--- a/packages/cli/templates/showcase/Switch.tsx
+++ b/packages/cli/templates/showcase/Switch.tsx
@@ -3,5 +3,11 @@
import {XDSSwitch} from '@xds/core/Switch';
export default function SwitchShowcase() {
- return <XDSSwitch label="Dark mode" />;
+ return (
+ <XDSSwitch
+ label="Enable notifications"
+ value={false}
+ onChange={() => {}}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/TabList.doc.mjs b/packages/cli/templates/showcase/TabList.doc.mjs
index 7735e8b25b..2c3c43885b 100644
--- a/packages/cli/templates/showcase/TabList.doc.mjs
+++ b/packages/cli/templates/showcase/TabList.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'TabList', aspectRatio: 16 / 4};
+export const doc = {name: 'TabList', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/TabList.tsx b/packages/cli/templates/showcase/TabList.tsx
index f3a993b259..2642c81bea 100644
--- a/packages/cli/templates/showcase/TabList.tsx
+++ b/packages/cli/templates/showcase/TabList.tsx
@@ -1,7 +1,13 @@
'use client';
-import {XDSTabList} from '@xds/core/TabList';
+import {XDSTabList, XDSTab} from '@xds/core/TabList';
export default function TabListShowcase() {
- return <XDSTabList tabs={[{label: 'Tab 1'}, {label: 'Tab 2'}]} />;
+ return (
+ <XDSTabList value="home" onChange={() => {}}>
+ <XDSTab value="home" label="Home" />
+ <XDSTab value="projects" label="Projects" />
+ <XDSTab value="settings" label="Settings" />
+ </XDSTabList>
+ );
}
diff --git a/packages/cli/templates/showcase/Table.doc.mjs b/packages/cli/templates/showcase/Table.doc.mjs
index ad236a3b17..3bab312c1f 100644
--- a/packages/cli/templates/showcase/Table.doc.mjs
+++ b/packages/cli/templates/showcase/Table.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Table', aspectRatio: 4 / 3};
+export const doc = {name: 'Table', aspectRatio: 16 / 9};
diff --git a/packages/cli/templates/showcase/Table.tsx b/packages/cli/templates/showcase/Table.tsx
index b54cc994f9..823658eebb 100644
--- a/packages/cli/templates/showcase/Table.tsx
+++ b/packages/cli/templates/showcase/Table.tsx
@@ -1,7 +1,29 @@
'use client';
-import {XDSTable} from '@xds/core/Table';
+import {XDSTable, proportional, pixel} from '@xds/core/Table';
+import type {XDSTableColumn} from '@xds/core/Table';
+
+interface User extends Record<string, unknown> {
+ id: string;
+ name: string;
+ email: string;
+ role: string;
+ age: number;
+}
+
+const users: User[] = [
+ {id: '1', name: 'Alice Johnson', email: '[email protected]', role: 'Engineer', age: 30},
+ {id: '2', name: 'Bob Smith', email: '[email protected]', role: 'Designer', age: 25},
+ {id: '3', name: 'Charlie Brown', email: '[email protected]', role: 'PM', age: 35},
+];
+
+const columns: XDSTableColumn<User>[] = [
+ {key: 'name', header: 'Name'},
+ {key: 'email', header: 'Email', width: proportional(2)},
+ {key: 'role', header: 'Role'},
+ {key: 'age', header: 'Age', width: pixel(80)},
+];
export default function TableShowcase() {
- return <XDSTable data={[]} columns={[]} />;
+ return <XDSTable data={users} columns={columns} idKey="id" hasHover />;
}
diff --git a/packages/cli/templates/showcase/Text.tsx b/packages/cli/templates/showcase/Text.tsx
index f863c4e7da..a10fa03b55 100644
--- a/packages/cli/templates/showcase/Text.tsx
+++ b/packages/cli/templates/showcase/Text.tsx
@@ -3,5 +3,13 @@
import {XDSText} from '@xds/core/Text';
export default function TextShowcase() {
- return <XDSText type="body">Hello world</XDSText>;
+ return (
+ <div style={{display: 'flex', flexDirection: 'column', gap: 12}}>
+ <XDSText type="body">Body: The bulk of content</XDSText>
+ <XDSText type="large">Large: Emphasized content</XDSText>
+ <XDSText type="label">Label: Form and chart labels</XDSText>
+ <XDSText type="supporting">Supporting: Helper text</XDSText>
+ <XDSText type="code">Code: const x = 42;</XDSText>
+ </div>
+ );
}
diff --git a/packages/cli/templates/showcase/TextArea.doc.mjs b/packages/cli/templates/showcase/TextArea.doc.mjs
index f8a60012a3..5dade83d1b 100644
--- a/packages/cli/templates/showcase/TextArea.doc.mjs
+++ b/packages/cli/templates/showcase/TextArea.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'TextArea', aspectRatio: 4 / 3};
+export const doc = {name: 'TextArea', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/TextArea.tsx b/packages/cli/templates/showcase/TextArea.tsx
index 4ddac8dcc7..bf27f47803 100644
--- a/packages/cli/templates/showcase/TextArea.tsx
+++ b/packages/cli/templates/showcase/TextArea.tsx
@@ -3,5 +3,12 @@
import {XDSTextArea} from '@xds/core/TextArea';
export default function TextAreaShowcase() {
- return <XDSTextArea label="Description" value="" onChange={() => {}} />;
+ return (
+ <XDSTextArea
+ label="Description"
+ value=""
+ onChange={() => {}}
+ placeholder="Enter a description..."
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/TextInput.doc.mjs b/packages/cli/templates/showcase/TextInput.doc.mjs
index 1ebb38a9f9..93e576fc9e 100644
--- a/packages/cli/templates/showcase/TextInput.doc.mjs
+++ b/packages/cli/templates/showcase/TextInput.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'TextInput', aspectRatio: 4 / 3};
+export const doc = {name: 'TextInput', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/TextInput.tsx b/packages/cli/templates/showcase/TextInput.tsx
index 8317ea329b..21b56c71c4 100644
--- a/packages/cli/templates/showcase/TextInput.tsx
+++ b/packages/cli/templates/showcase/TextInput.tsx
@@ -3,5 +3,12 @@
import {XDSTextInput} from '@xds/core/TextInput';
export default function TextInputShowcase() {
- return <XDSTextInput label="Name" value="" onChange={() => {}} />;
+ return (
+ <XDSTextInput
+ label="Name"
+ value=""
+ onChange={() => {}}
+ placeholder="Enter your name"
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Thumbnail.tsx b/packages/cli/templates/showcase/Thumbnail.tsx
index 22edc0267e..d5244d022f 100644
--- a/packages/cli/templates/showcase/Thumbnail.tsx
+++ b/packages/cli/templates/showcase/Thumbnail.tsx
@@ -3,5 +3,11 @@
import {XDSThumbnail} from '@xds/core/Thumbnail';
export default function ThumbnailShowcase() {
- return <XDSThumbnail src="https://via.placeholder.com/80" alt="Preview" />;
+ return (
+ <XDSThumbnail
+ src="https://picsum.photos/id/1043/200/200"
+ alt="Sample image"
+ label="photo.jpg"
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/TimeInput.doc.mjs b/packages/cli/templates/showcase/TimeInput.doc.mjs
index 574bebe4d0..593f762d78 100644
--- a/packages/cli/templates/showcase/TimeInput.doc.mjs
+++ b/packages/cli/templates/showcase/TimeInput.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'TimeInput', aspectRatio: 4 / 3};
+export const doc = {name: 'TimeInput', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/TimeInput.tsx b/packages/cli/templates/showcase/TimeInput.tsx
index c0e993cb5f..4cccc81e40 100644
--- a/packages/cli/templates/showcase/TimeInput.tsx
+++ b/packages/cli/templates/showcase/TimeInput.tsx
@@ -3,5 +3,5 @@
import {XDSTimeInput} from '@xds/core/TimeInput';
export default function TimeInputShowcase() {
- return <XDSTimeInput label="Time" />;
+ return <XDSTimeInput label="Time" placeholder="Select a time" />;
}
diff --git a/packages/cli/templates/showcase/Timestamp.tsx b/packages/cli/templates/showcase/Timestamp.tsx
index 87880f49d9..844791c093 100644
--- a/packages/cli/templates/showcase/Timestamp.tsx
+++ b/packages/cli/templates/showcase/Timestamp.tsx
@@ -3,5 +3,5 @@
import {XDSTimestamp} from '@xds/core/Timestamp';
export default function TimestampShowcase() {
- return <XDSTimestamp date={new Date()} />;
+ return <XDSTimestamp value="2026-03-25T12:00:00Z" />;
}
diff --git a/packages/cli/templates/showcase/Toast.doc.mjs b/packages/cli/templates/showcase/Toast.doc.mjs
index 9b8e5cb48e..8996f27953 100644
--- a/packages/cli/templates/showcase/Toast.doc.mjs
+++ b/packages/cli/templates/showcase/Toast.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Toast', aspectRatio: 4 / 3};
+export const doc = {name: 'Toast', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Toast.tsx b/packages/cli/templates/showcase/Toast.tsx
index 9ab243cb87..8664eefe63 100644
--- a/packages/cli/templates/showcase/Toast.tsx
+++ b/packages/cli/templates/showcase/Toast.tsx
@@ -1,7 +1,14 @@
'use client';
-import {XDSToast} from '@xds/core/Toast';
+import {useXDSToast} from '@xds/core/Toast';
+import {XDSButton} from '@xds/core/Button';
export default function ToastShowcase() {
- return <XDSToast message="Saved successfully" />;
+ const toast = useXDSToast();
+ return (
+ <XDSButton
+ label="Show toast"
+ onClick={() => toast({body: 'This is an info toast'})}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/ToggleButton.tsx b/packages/cli/templates/showcase/ToggleButton.tsx
index 64ae552169..e52d6b1889 100644
--- a/packages/cli/templates/showcase/ToggleButton.tsx
+++ b/packages/cli/templates/showcase/ToggleButton.tsx
@@ -1,7 +1,20 @@
-'use client';
-
import {XDSToggleButton} from '@xds/core/ToggleButton';
+const BoldIcon = (
+ <svg width={16} height={16} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2} strokeLinecap="round" strokeLinejoin="round">
+ <path d="M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" />
+ <path d="M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" />
+ </svg>
+);
+
export default function ToggleButtonShowcase() {
- return <XDSToggleButton label="Bold" isIconOnly />;
+ return (
+ <XDSToggleButton
+ label="Bold"
+ icon={BoldIcon}
+ isPressed={false}
+ onPressedChange={() => {}}
+ isIconOnly
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Token.tsx b/packages/cli/templates/showcase/Token.tsx
index d3390ecbe8..79a402cb12 100644
--- a/packages/cli/templates/showcase/Token.tsx
+++ b/packages/cli/templates/showcase/Token.tsx
@@ -3,5 +3,5 @@
import {XDSToken} from '@xds/core/Token';
export default function TokenShowcase() {
- return <XDSToken label="Tag" />;
+ return <XDSToken label="Token" />;
}
diff --git a/packages/cli/templates/showcase/Tokenizer.tsx b/packages/cli/templates/showcase/Tokenizer.tsx
index f526ea32cb..917ca8e08a 100644
--- a/packages/cli/templates/showcase/Tokenizer.tsx
+++ b/packages/cli/templates/showcase/Tokenizer.tsx
@@ -1,7 +1,24 @@
'use client';
import {XDSTokenizer} from '@xds/core/Tokenizer';
+import type {XDSSearchSource} from '@xds/core/Typeahead';
+
+const source: XDSSearchSource = {
+ search: () => [],
+ bootstrap: () => [],
+};
export default function TokenizerShowcase() {
- return <XDSTokenizer label="Tags" items={[]} />;
+ return (
+ <XDSTokenizer
+ label="Tags"
+ placeholder="Search..."
+ searchSource={source}
+ value={[
+ {id: '1', label: 'Design'},
+ {id: '2', label: 'Engineering'},
+ ]}
+ onChange={() => {}}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Toolbar.doc.mjs b/packages/cli/templates/showcase/Toolbar.doc.mjs
index d4e65380d1..3114abafaf 100644
--- a/packages/cli/templates/showcase/Toolbar.doc.mjs
+++ b/packages/cli/templates/showcase/Toolbar.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Toolbar', aspectRatio: 16 / 4};
+export const doc = {name: 'Toolbar', aspectRatio: 4 / 3};
diff --git a/packages/cli/templates/showcase/Toolbar.tsx b/packages/cli/templates/showcase/Toolbar.tsx
index cadfdf0b2f..9fa002b083 100644
--- a/packages/cli/templates/showcase/Toolbar.tsx
+++ b/packages/cli/templates/showcase/Toolbar.tsx
@@ -1,7 +1,38 @@
'use client';
import {XDSToolbar} from '@xds/core/Toolbar';
+import {XDSButton} from '@xds/core/Button';
export default function ToolbarShowcase() {
- return <XDSToolbar label="Actions" />;
+ return (
+ <XDSToolbar
+ label="Actions"
+ startContent={
+ <>
+ <XDSButton label="Cut" variant="ghost" />
+ <XDSButton label="Copy" variant="ghost" />
+ <XDSButton label="Paste" variant="ghost" />
+ </>
+ }
+ endContent={
+ <XDSButton
+ label="Settings"
+ variant="ghost"
+ icon={
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={1.5}>
+ <circle cx="8" cy="8" r="2" />
+ <path d="M8 1v2M8 13v2M1 8h2M13 8h2M3.05 3.05l1.41 1.41M11.54 11.54l1.41 1.41M3.05 12.95l1.41-1.41M11.54 4.46l1.41-1.41" />
+ </svg>
+ }
+ isIconOnly
+ />
+ }
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Tooltip.tsx b/packages/cli/templates/showcase/Tooltip.tsx
index ef42e1857e..57db8ba8bf 100644
--- a/packages/cli/templates/showcase/Tooltip.tsx
+++ b/packages/cli/templates/showcase/Tooltip.tsx
@@ -1,11 +1,12 @@
'use client';
import {XDSTooltip} from '@xds/core/Tooltip';
+import {XDSButton} from '@xds/core/Button';
export default function TooltipShowcase() {
return (
- <XDSTooltip content="Help text">
- <button>Hover</button>
+ <XDSTooltip content="This is a helpful tooltip" placement="above">
+ <XDSButton label="Hover me" />
</XDSTooltip>
);
}
diff --git a/packages/cli/templates/showcase/TopNav.doc.mjs b/packages/cli/templates/showcase/TopNav.doc.mjs
index b49196ca91..b065e0e921 100644
--- a/packages/cli/templates/showcase/TopNav.doc.mjs
+++ b/packages/cli/templates/showcase/TopNav.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'TopNav', aspectRatio: 16 / 4};
+export const doc = {name: 'TopNav', aspectRatio: 3};
diff --git a/packages/cli/templates/showcase/TopNav.tsx b/packages/cli/templates/showcase/TopNav.tsx
index 7c9b5c3aef..9ccf0d057c 100644
--- a/packages/cli/templates/showcase/TopNav.tsx
+++ b/packages/cli/templates/showcase/TopNav.tsx
@@ -1,7 +1,66 @@
'use client';
-import {XDSTopNav} from '@xds/core/TopNav';
+import {XDSTopNav, XDSTopNavHeading, XDSTopNavItem} from '@xds/core/TopNav';
+import {XDSButton} from '@xds/core/Button';
+
+function SearchIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
+ </svg>
+ );
+}
+
+function BellIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" />
+ </svg>
+ );
+}
+
+function UserIcon() {
+ return (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
+ <path strokeLinecap="round" strokeLinejoin="round" d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ </svg>
+ );
+}
export default function TopNavShowcase() {
- return <XDSTopNav label="Navigation" />;
+ return (
+ <XDSTopNav
+ label="Main navigation"
+ heading={<XDSTopNavHeading heading="My App" />}
+ startContent={
+ <>
+ <XDSTopNavItem label="Home" href="#" isSelected />
+ <XDSTopNavItem label="Products" href="#" />
+ <XDSTopNavItem label="About" href="#" />
+ </>
+ }
+ endContent={
+ <>
+ <XDSButton
+ label="Search"
+ variant="ghost"
+ icon={<SearchIcon />}
+ isIconOnly
+ />
+ <XDSButton
+ label="Notifications"
+ variant="ghost"
+ icon={<BellIcon />}
+ isIconOnly
+ />
+ <XDSButton
+ label="Profile"
+ variant="ghost"
+ icon={<UserIcon />}
+ isIconOnly
+ />
+ </>
+ }
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/TreeList.doc.mjs b/packages/cli/templates/showcase/TreeList.doc.mjs
index d791084f6b..e79456291a 100644
--- a/packages/cli/templates/showcase/TreeList.doc.mjs
+++ b/packages/cli/templates/showcase/TreeList.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'TreeList', aspectRatio: 3 / 4};
+export const doc = {name: 'TreeList', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/TreeList.tsx b/packages/cli/templates/showcase/TreeList.tsx
index 2888f9be58..0006ba5ee8 100644
--- a/packages/cli/templates/showcase/TreeList.tsx
+++ b/packages/cli/templates/showcase/TreeList.tsx
@@ -2,6 +2,41 @@
import {XDSTreeList} from '@xds/core/TreeList';
+const noop = () => {};
+
export default function TreeListShowcase() {
- return <XDSTreeList items={[{label: 'Root'}]} />;
+ return (
+ <XDSTreeList
+ items={[
+ {
+ id: 'src',
+ label: 'src',
+ isExpanded: true,
+ children: [
+ {
+ id: 'components',
+ label: 'components',
+ children: [
+ {id: 'button', label: 'Button.tsx', onClick: noop},
+ {id: 'card', label: 'Card.tsx', onClick: noop},
+ {id: 'list', label: 'List.tsx', onClick: noop},
+ ],
+ },
+ {id: 'app', label: 'App.tsx', onClick: noop},
+ {id: 'index', label: 'index.tsx', onClick: noop},
+ ],
+ },
+ {
+ id: 'public',
+ label: 'public',
+ children: [
+ {id: 'favicon', label: 'favicon.ico', onClick: noop},
+ {id: 'index-html', label: 'index.html', onClick: noop},
+ ],
+ },
+ {id: 'pkg', label: 'package.json', onClick: noop},
+ {id: 'readme', label: 'README.md', onClick: noop},
+ ]}
+ />
+ );
}
diff --git a/packages/cli/templates/showcase/Typeahead.doc.mjs b/packages/cli/templates/showcase/Typeahead.doc.mjs
index 3d34093de6..8082c1de7b 100644
--- a/packages/cli/templates/showcase/Typeahead.doc.mjs
+++ b/packages/cli/templates/showcase/Typeahead.doc.mjs
@@ -1,2 +1,2 @@
/** @type {import('@xds/core').ComponentShowcaseDoc} */
-export const doc = {name: 'Typeahead', aspectRatio: 4 / 3};
+export const doc = {name: 'Typeahead', aspectRatio: 1};
diff --git a/packages/cli/templates/showcase/Typeahead.tsx b/packages/cli/templates/showcase/Typeahead.tsx
index 35ceef4488..959b264b0b 100644
--- a/packages/cli/templates/showcase/Typeahead.tsx
+++ b/packages/cli/templates/showcase/Typeahead.tsx
@@ -1,7 +1,33 @@
-'use client';
-
import {XDSTypeahead} from '@xds/core/Typeahead';
+import type {XDSSearchableItem, XDSSearchSource} from '@xds/core/Typeahead';
+
+const fruits: XDSSearchableItem[] = [
+ {id: '1', label: 'Apple'},
+ {id: '2', label: 'Banana'},
+ {id: '3', label: 'Cherry'},
+ {id: '4', label: 'Date'},
+ {id: '5', label: 'Elderberry'},
+ {id: '6', label: 'Fig'},
+ {id: '7', label: 'Grape'},
+ {id: '8', label: 'Honeydew'},
+];
+
+const fruitSource: XDSSearchSource = {
+ search: (query: string) =>
+ fruits.filter(f => f.label.toLowerCase().includes(query.toLowerCase())),
+ bootstrap: () => fruits.slice(0, 5),
+};
export default function TypeaheadShowcase() {
- return <XDSTypeahead label="Search" />;
+ return (
+ <div style={{width: 320}}>
+ <XDSTypeahead
+ label="Fruit"
+ placeholder="Search fruits..."
+ searchSource={fruitSource}
+ value={null}
+ onChange={() => {}}
+ />
+ </div>
+ );
}