Last updated today.
>
);
}
```
--------------------------------
### Prompting Agents with DESIGN.md
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/advanced/design-md.mdx
Example prompt for requesting UI components while instructing the agent to adhere to the design system.
```text
> Using the design system in DESIGN.md, build a settings card with a
text input, a toggle row, and primary/secondary action buttons.
```
--------------------------------
### Quick Start HighlightedText
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/highlighted-text.mdx
Import the component and provide the text as children along with the search keyword.
```tsx
import { HighlightedText } from 'reablocks';
export default function App() {
return reablocks;
}
```
--------------------------------
### Custom Animation Tooltip Example
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/tooltip.mdx
Demonstrates how to apply custom animations using the animation and animationViewChange props.
```tsx
```
--------------------------------
### Quick Start DotsLoader
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/loader.mdx
Basic implementation of the DotsLoader component imported from the reablocks library.
```tsx
import { DotsLoader } from 'reablocks';
export default function App() {
return
}
```
--------------------------------
### Quick Start AvatarGroup
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/avatar-group.mdx
Basic implementation showing how to import and nest Avatar components within an AvatarGroup.
```tsx
import { AvatarGroup, Avatar } from 'reablocks';
export default function App() {
return (
)
}
```
--------------------------------
### Install Reablocks skills at user level
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/skills.mdx
Make skills available across all personal projects by symlinking them into the global ~/.claude/skills/ directory.
```bash
mkdir -p ~/.claude/skills
# Symlink the library
ln -s /path/to/reaviz/skills/reablocks ~/.claude/skills/reablocks
```
--------------------------------
### Basic Dialog Story
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/dialog.mdx
Renders a simple dialog example from the storybook.
```tsx
```
--------------------------------
### MFA Authenticator Story
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/blocks/authentication/mfa.mdx
Renders the MFA authenticator setup component.
```tsx
```
--------------------------------
### Quick Start with useInfinityList Hook
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/infinity-list.mdx
Initializes the Infinity List functionality by providing an array of items to the useInfinityList hook.
```typescript
import { useMemo } from 'react';
import { useInfinityList } from 'reablocks';
export default function App() {
const items = useMemo(() => [...Array(30).keys()], []);
const { data, hasMore, showNext } = useInfinityList({ items });
return (
{data.map(i => (
Item {i}
))}
{hasMore && }
);
}
```
--------------------------------
### Quick Start Avatar Implementation
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/avatar.mdx
Basic usage of the Avatar component by importing it from reablocks and providing a name prop.
```tsx
import { Avatar } from 'reablocks';
export default function App() {
return
}
```
--------------------------------
### Basic Textarea Usage
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/form/textarea.mdx
A minimal setup for a standard multiline text input field.
```tsx
```
--------------------------------
### Quick Start Duration Component
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/duration.mdx
Basic implementation of the Duration component using a millisecond value.
```tsx
import { Duration } from 'reablocks';
export default function App() {
return (
);
}
```
--------------------------------
### Install Reablocks skills at project level
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/skills.mdx
Use this method to share skills across a team by committing them to version control within the project's .claude/skills/ directory.
```bash
# From your project root
mkdir -p .claude/skills
# Symlink the reablocks skill tree
ln -s /path/to/reaviz/skills/reablocks .claude/skills/reablocks
```
--------------------------------
### Quick Start Sort Component
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/sort.mdx
Basic implementation requiring the direction state and an onSort callback function.
```typescript
import { useState } from 'react';
import { Sort } from 'reablocks';
export default function App() {
const [dir, setDir] = useState('asc');
return
Age
;
}
```
--------------------------------
### Define Button Theme Sizes
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-unify.mdx
Example of referencing detail tier variables within a component theme definition.
```ts
// excerpt from ButtonTheme.ts
sizes: {
small: 'h-(--buttons-details-height-core-icon-sm) text-xs px-(--buttons-details-horizontal-padding-sm)',
medium: 'h-(--buttons-details-height-core-icon-md) text-sm px-(--buttons-details-horizontal-padding-md)',
large: 'h-(--buttons-details-height-core-icon-lg) text-base px-(--buttons-details-horizontal-padding-lg)',
},
```
--------------------------------
### Quick Start DateFormat
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/date-format.mdx
Basic implementation of the DateFormat component using a date string and a specific format pattern.
```tsx
import { DateFormat } from 'reablocks';
export default function App() {
return (
);
}
```
--------------------------------
### Quick Start DataSize Component
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/data-size.mdx
Basic implementation of the DataSize component by passing a byte value to the value prop.
```tsx
import { DataSize } from 'reablocks';
export default function App() {
return (
);
}
```
--------------------------------
### Textarea Value Initialization
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/form/textarea.mdx
Set default values or placeholder text to guide user input.
```tsx
```
```tsx
```
--------------------------------
### Dialog with Footer and Custom Header Story
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/dialog.mdx
Renders a dialog example featuring a footer and custom header.
```tsx
```
--------------------------------
### Skeleton Storybook Renderers
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/skeleton.mdx
Various storybook examples demonstrating different states and configurations of the Skeleton component.
```tsx
```
```tsx
```
```tsx
```
```tsx
```
```tsx
```
--------------------------------
### Full Table Implementation with Sorting and Pagination
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/recipes/table.mdx
A complete example integrating TanStack Table with reablocks Pager and Sort components.
```tsx
import { useState } from 'react';
import {
createColumnHelper,
flexRender,
getCoreRowModel,
getPaginationRowModel,
getSortedRowModel,
useReactTable,
type SortingState
} from '@tanstack/react-table';
import { Pager, Sort } from 'reablocks';
type User = { id: string; name: string; email: string; age: number };
const columnHelper = createColumnHelper();
const columns = [
columnHelper.accessor('name', { header: 'Name' }),
columnHelper.accessor('email', { header: 'Email' }),
columnHelper.accessor('age', { header: 'Age' })
];
export const UserTable = ({ data }: { data: User[] }) => {
const [sorting, setSorting] = useState([]);
const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 10 });
const table = useReactTable({
data,
columns,
state: { sorting, pagination },
onSortingChange: setSorting,
onPaginationChange: setPagination,
getCoreRowModel: getCoreRowModel(),
getSortedRowModel: getSortedRowModel(),
getPaginationRowModel: getPaginationRowModel()
});
return (
);
};
```
--------------------------------
### Configure CSS entry point
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-unify.mdx
The index.css file serves as the entry point. Import order is critical: light and dark themes must precede root variables, and tw.css must be imported last.
```css
@import "./common.css";
@import "./light.css";
@import "./dark.css";
@import "./root.css";
@import "./tw.css";
```
--------------------------------
### Implement Input Adornments
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/form/input.mdx
Adds icons or text at the start or end of the input field using the start and end props.
```tsx
} placeholder="Search..." />
USD} type="number" />
```
```tsx
```
--------------------------------
### Initialize ThemeProvider
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/setup.mdx
Wrap the application with the ThemeProvider component to provide theme tokens to all components.
```tsx
import { ThemeProvider, theme } from 'reablocks';
// NOTE: You can extend 'theme' with your own custom theme tokens.
export const App = () => (
);
```
--------------------------------
### Disabled Tooltip Example
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/tooltip.mdx
Displays a tooltip in a disabled state.
```tsx
```
--------------------------------
### Clone the repository
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/setup.mdx
Use this command to download the project source code to your local machine.
```bash
git clone git@github.com:reaviz/reablocks.git
```
--------------------------------
### Import prebuilt Reablocks styles
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/setup.mdx
Include this in your app entry file if you are using the default theme without customization.
```ts
import "reablocks/index.css";
```
--------------------------------
### Complete .storybook/preview.jsx configuration
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/storybook.mdx
The full configuration file combining imports, decorators, and parameters for Reablocks integration.
```jsx
import { DocsContainer } from '@storybook/addon-docs';
import { ThemeProvider } from 'reablocks';
import { theme } from '[INSERT_PATH_TO_YOUR_THEME]';
export const decorators = [
Story => (
)
];
export const parameters = {
layout: 'centered',
docs: {
container: ({ context, children }) => (
{children}
)
},
controls: {
hideNoControlsWarning: true
}
};
```
--------------------------------
### Configuring global Storybook parameters
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/storybook.mdx
Set global layout and documentation container settings, including wrapping the DocsContainer with the ThemeProvider.
```jsx
export const parameters = {
layout: 'centered',
docs: {
container: ({ context, children }) => (
{children}
)
},
controls: {
hideNoControlsWarning: true
}
};
```
--------------------------------
### Plugin Import Comparison
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/migration.mdx
Comparison between incorrect and correct plugin registration methods for Storybook compatibility.
```js
{
plugins: [
require('@mertasan/tailwindcss-variables')
]
}
```
```js
import tailwindcssVariables from '@mertasan/tailwindcss-variables';
{
plugins: [
tailwindcssVariables
]
}
```
--------------------------------
### Custom Animation Dialog Story
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/dialog.mdx
Renders a dialog example demonstrating custom animation props.
```tsx
```
--------------------------------
### Configure ThemeProvider at App Root
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-unify.mdx
Wrap the application with the ThemeProvider and import the theme and CSS layers.
```tsx
// src/index.tsx
import { ThemeProvider } from 'reablocks';
import { theme } from 'shared/utils/Theme';
import './assets/styles/index.css'; // pulls in all CSS layers
```
--------------------------------
### Add Icons to Buttons
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/button.mdx
Usage of start and end props to include icons within a button.
```tsx
}>Search
}>Next
```
--------------------------------
### Define primitive and component tokens
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-unify.mdx
The root.css file contains raw palette values, spacing, sizing, corner radius, and per-component detail tokens.
```css
:root,
:host {
/* Colors */
--color-blue-hyperstream-500: #3476ff;
--color-blue-hyperstream-600: #105eff;
/* …more brand scales… */
/* Spacing */
--spacing-padding-base: 16px;
/* Corner radius */
--corner-radius-primary: 6px;
/* Per-component detail — the Unify differentiator */
--buttons-details-height-core-icon-lg: var(--sizing-size-tokens-base);
--inputs-details-corner-radius-primary: var(--corner-radius-primary);
--tabs-details-stroke-width-underline-lg: 2px;
/* …more per-component detail tokens */
}
```
--------------------------------
### Run Tailwind migration command
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/migration.mdx
Execute the official Tailwind CSS upgrade tool to migrate class names.
```shell
npx @tailwindcss/upgrade
```
--------------------------------
### Render Table Header
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/recipes/table.mdx
Example of mapping through header groups to render the sortable headers in a table structure.
```tsx
{table.getHeaderGroups().map(group => (
))}
```
--------------------------------
### Render Select with Adornments
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/form/select.mdx
Use the start and end props to render custom content before or after the input field.
```tsx
} placeholder="Search a country..." options={options} />
```
--------------------------------
### Basic Drawer Implementation
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/drawer.mdx
Compose a drawer using the Drawer component and its optional slot components.
```tsx
import { Drawer, DrawerHeader, DrawerContent, DrawerFooter } from 'reablocks';
setOpen(false)}>
Drawer Title
{/* Your content here */}
{/* Footer actions here */}
```
--------------------------------
### Implement a spring-driven drop-in Dialog
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/custom-animations.mdx
Demonstrates overriding default Dialog animations with a custom spring-based drop-in effect using the animation prop.
```tsx
import { useState } from 'react';
import { Button, Dialog, DialogHeader, DialogContent } from 'reablocks';
export const DropDialog = () => {
const [open, setOpen] = useState(false);
return (
<>
>
);
};
```
--------------------------------
### Configure Button Sizes
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/button.mdx
Theme configuration for button dimensions and associated icon padding.
```javascript
{
sizes: {
small: 'text-sm px-2 py-1 leading-[normal]',
medium: 'text-base px-4 py-2 leading-[normal]',
large: 'text-xl px-5 py-2.5 leading-[normal]'
}
iconSizes: {
small: 'p-1',
medium: 'p-2',
large: 'p-2.5'
}
}
```
--------------------------------
### Inline Input API Documentation
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/form/inline-input.mdx
Displays the available properties and configuration options for the InlineInput component.
```tsx
```
--------------------------------
### Quick Start Pluralize Usage
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/pluralize.mdx
Basic implementation of the Pluralize component requiring the count and singular word form.
```tsx
import { Pluralize } from 'reablocks';
export default function App() {
return
}
```
--------------------------------
### Build for distribution
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/setup.mdx
Executes the Rollup build process to generate the distribution files in the dist folder.
```bash
npm run build
```
--------------------------------
### Configure Storybook Decorators
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/setup.mdx
Add the ThemeProvider to Storybook decorators to ensure components are rendered with the correct theme context.
```javascript
import type { Preview } from "@storybook/react";
import { ThemeProvider, theme } from "reablocks";
export const decorators = [
Story => (
// NOTE: You can extend 'theme' with your own custom theme tokens.
)
];
const preview: Preview = {
// Your other configurations here too
decorators: [withProvider],
};
```
--------------------------------
### Initialize Table Model
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/recipes/table.mdx
Define the data structure and column configuration using Tanstack Table's column helper.
```tsx
import { useState } from 'react';
import {
createColumnHelper,
flexRender,
getCoreRowModel,
getPaginationRowModel,
getSortedRowModel,
useReactTable,
type SortingState
} from '@tanstack/react-table';
import { Pager, Sort } from 'reablocks';
type User = { id: string; name: string; email: string; age: number };
const columnHelper = createColumnHelper();
const columns = [
columnHelper.accessor('name', { header: 'Name' }),
columnHelper.accessor('email', { header: 'Email' }),
columnHelper.accessor('age', { header: 'Age' })
];
```
--------------------------------
### Quick Start Ellipsis
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/ellipsis.mdx
Basic implementation requiring the value and limit props to truncate a string by character count.
```tsx
import { Ellipsis } from 'reablocks';
export default function App() {
const longString = "Integer a aliquet ligula. Fusce vel eros libero. Sed dictum tincidunt hendrerit. Integer id neque faucibus, imperdiet purus dapibus, rutrum tellus. Nullam facilisis odio sit amet metus efficitur.";
return (
);
}
```
--------------------------------
### Configure CSS Import Order
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-unify.mdx
Ensure overrides are applied correctly by importing the overrides file after the root CSS file.
```css
@import "./root.css";
@import "./overrides.css"; /* must come after root.css */
@import "./tw.css";
```
--------------------------------
### Configure Icon Adornments
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/button.mdx
Theme configuration for icon layout and sizing within buttons.
```javascript
{
adornment: {
base: "flex",
start: "pr-1",
end: "pl-1",
sizes: {
small: "[&>svg]:w-3 [&>svg]:h-3",
medium: "[&>svg]:w-4 [&>svg]:h-4",
large" "[&>svg]:w-5 [&>svg]:h-5"
}
}
}
```
--------------------------------
### Quick Start Redact Component
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/redact.mdx
Basic implementation of the Redact component by importing it from reablocks and providing a value prop.
```tsx
import { Redact } from 'reablocks';
export default function App() {
return
}
```
--------------------------------
### Step API Documentation
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layout/stepper.mdx
Displays the API documentation for the Step component.
```tsx
```
--------------------------------
### Update ThemeProvider
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/migration.mdx
Apply the new theme to the application via the ThemeProvider.
```diff
import { projectNameTheme } from './path_to_theme/theme.ts';
-
+
```
--------------------------------
### Configure Custom Themes in Tailwind
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/migration.mdx
Example of defining light and dark themes within the tailwind.config.js file using the createThemes plugin.
```tsx
import plugin from 'tailwindcss/plugin';
import { createThemes } from 'tw-colors';
const colorPalette = {
// Define your color palette here
};
const config: Config = {
darkMode: 'selector',
plugins: [
createThemes({
light: {
primary: {
DEFAULT: colorPalette.blue[500],
active: colorPalette.blue[500],
hover: colorPalette.blue[400],
inactive: colorPalette.gray[500]
}
// etc...
},
dark: {
primary: {
DEFAULT: colorPalette.blue[500],
active: colorPalette.blue[500],
hover: colorPalette.blue[600],
inactive: colorPalette.blue[200]
}
// etc...
}
})
]
};
```
--------------------------------
### Toggle themes at runtime
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-unify.mdx
Apply a theme by setting a class or data-theme attribute on a wrapping element.
```html
```
--------------------------------
### Implement Tab Adornments
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layout/tabs.mdx
Use start and end props to add icons or badges to tabs. This feature is available from version 10.0.0.
```tsx
}>Inbox
12}>Notifications
```
--------------------------------
### Defining Storybook decorators
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/storybook.mdx
Use the ThemeProvider as a decorator to wrap all stories with your design tokens.
```jsx
export const decorators = [
Story => (
)
];
```
--------------------------------
### Implement a rotating and scaling Dialog
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/custom-animations.mdx
Shows a Dialog animation configuration using rotation and scaling properties with a spring transition.
```tsx
import { Dialog, DialogHeader, DialogContent } from 'reablocks';
```
--------------------------------
### Create an Icon Loader
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-icons.mdx
Uses Vite's glob import to dynamically load SVG files and convert them into lazy-loaded React components.
```tsx
import React from 'react';
const iconPaths = import.meta.glob('./*.svg');
export const icons = Object.keys(iconPaths).map(key => ({
name: key.replace('.svg', '').replace('./', ''),
component: React.lazy(async () => {
const lazy: any = await iconPaths[key]();
return { default: lazy.ReactComponent };
})
}));
```
--------------------------------
### Implement Theme Blocks in a Storybook Story
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-block.mdx
Demonstrates how to use theme block components within a Storybook story, utilizing decorators to extract and provide theme tokens.
```tsx
import React from 'react';
import {
TypographyBlocks,
ColorBlocks,
SpacingBlocks,
BorderBlocks,
ShadowBlocks,
ThemeProvider,
theme,
useTheme,
extractTheme
} from 'reablocks';
const { theme: TWConfig } = resolveConfig(tailwindConfig);
export default {
title: 'Components/Theme',
decorators: [
Story => {
const { tokens } = useTheme();
const {
colors,
borderRadius,
boxShadow,
spacing,
fontFamily,
fontSize,
fontWeight
} = extractTheme(tokens);
return (
>
);
```
--------------------------------
### Import the composed theme
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/theme/theme-unify.mdx
Import the pre-built TypeScript theme bundle into your application.
```tsx
import { theme } from './themeUnify';
```
--------------------------------
### Import Tailwind CSS
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/setup.mdx
Add the Tailwind directive to your main CSS file.
```bash
@import "tailwindcss";
```
--------------------------------
### Implement a basic Pager component
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/pager.mdx
Initializes a Pager with page, size, total, and onPageChange props to manage state.
```tsx
import { useState } from 'react';
import { Pager } from 'reablocks';
export default function App() {
const [page, setPage] = useState(0);
return (
);
}
```
--------------------------------
### Importing Reablocks modules for Storybook
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/getting-started/storybook.mdx
Import the necessary components and your custom theme file to configure the Storybook preview environment.
```jsx
import { DocsContainer } from '@storybook/addon-docs';
import { ThemeProvider } from 'reablocks';
import { theme } from '[INSERT_PATH_TO_YOUR_THEME]';
```
--------------------------------
### useInfinityList
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/data/infinity-list.mdx
A hook to manage progressive data loading for large lists.
```APIDOC
## useInfinityList
### Description
A hook that manages a dataset and provides methods to progressively load more items.
### Parameters
- **items** (Array) - Required - The full dataset to be managed.
### Returns
- **data** (Array) - The current subset of items to display.
- **hasMore** (Boolean) - Indicates if there are more items available to load.
- **showNext** (Function) - A function to trigger the loading of the next batch of items.
```
--------------------------------
### Generate IDs with useId
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/utils/id.mdx
Demonstrates both auto-generating an ID and providing a custom deterministic ID string.
```jsx
// Auto generate one...
const id = useId();
// Provide your own...
const myId = useId('foo-1');
```
--------------------------------
### Configure Claude Code for DESIGN.md
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/advanced/design-md.mdx
Add this instruction to your CLAUDE.md file to ensure the agent references the design tokens during UI generation.
```markdown
@DESIGN.md
Always follow the design tokens in DESIGN.md when generating or editing UI.
Use only colors, fonts, spacing, and radii defined there — never invent values.
```
--------------------------------
### Menu API Documentation
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/menu.mdx
Displays the API properties for the Menu component.
```tsx
```
--------------------------------
### Command Palette API Documentation
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/elements/command-palette.mdx
Displays the available properties and types for the CommandPalette component.
```tsx
```
--------------------------------
### Initialize Notifications Provider
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/layers/notification.mdx
Wrap the application with the Notifications provider to enable notification functionality.
```jsx
import { Notifications } from 'reablocks';
const App = () => {
return (
);
};
```
--------------------------------
### useTheme()
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/utils/theme.mdx
The useTheme hook returns the global theme object, containing all available theme options and component-specific style definitions.
```APIDOC
## useTheme()
### Description
Retrieves the global theme object from the reablocks context. This allows components to access defined theme properties for styling.
### Usage
```jsx
import { useTheme } from 'reablocks';
const theme = useTheme();
```
### Returns
- **theme** (Object) - An object containing the global theme configuration, including nested component theme definitions (e.g., theme.button, theme.input).
```
--------------------------------
### Date Input with Presets
Source: https://github.com/reaviz/reablocks-website/blob/master/src/content/docs/components/form/date-input.mdx
Configures the date input to include a list of selectable date presets using the presets prop.
```tsx
```