### Start Example Dev Server
Source: https://github.com/tanstack/select/blob/main/CONTRIBUTING.md
Starts the development server for a specific example directory.
```bash
pnpm start
```
--------------------------------
### Install Dependencies
Source: https://github.com/tanstack/select/blob/main/CONTRIBUTING.md
Installs project dependencies and sets up linkages using pnpm.
```bash
pnpm install
```
--------------------------------
### Install TanStack Select Packages
Source: https://github.com/tanstack/select/blob/main/README.md
Install the appropriate package for your framework or the vanilla JS version.
```bash
# Npm
npm install @tanstack/react-select
npm install @tanstack/select # no framework, just vanilla js
```
--------------------------------
### Development Server
Source: https://github.com/tanstack/select/blob/main/CONTRIBUTING.md
Starts the development server for auto-building and auto-testing files as you edit.
```bash
pnpm dev
```
--------------------------------
### Install TanStack Select React Adapter
Source: https://github.com/tanstack/select/blob/main/docs/framework/react/adapter.md
Install the React Adapter for TanStack Select using npm.
```sh
npm install @tanstack/react-select
```
--------------------------------
### Install Solid TanStack Select
Source: https://github.com/tanstack/select/blob/main/docs/installation.md
Install the Solid-specific package for TanStack Select. Compatible with Solid v1.9.5+.
```bash
npm install @tanstack/solid-select
```
--------------------------------
### Monorepo Development Setup Commands
Source: https://context7.com/tanstack/select/llms.txt
Common commands for setting up and developing within the TanStack Select monorepo using pnpm and Nx.
```sh
# Prerequisites: Node >=18, pnpm installed globally
npm install -g pnpm
# Clone and install all dependencies (run from repo root only)
git clone https://github.com/TanStack/select.git
cd select
pnpm install
# Build all packages (excludes examples)
pnpm build
# Build only the core package
pnpm build:core
# Watch-mode: rebuild all packages on change
pnpm dev
# Run all tests (format, lint, types, lib, build)
pnpm test
# Run only unit tests (affected packages)
pnpm test:lib
# Run a specific example (after root install)
cd examples/react/basic
pnpm dev
# Generate API reference docs from TypeScript source
pnpm docs:generate
```
--------------------------------
### Install Vanilla JS TanStack Select
Source: https://github.com/tanstack/select/blob/main/docs/installation.md
Install the core TanStack Select package for use with any framework or vanilla JavaScript. This package is also re-exported by the framework-specific packages.
```bash
npm install @tanstack/select
```
--------------------------------
### Solid Adapter Usage: @tanstack/solid-select
Source: https://context7.com/tanstack/select/llms.txt
Example of setting up a SolidJS application using the @tanstack/solid-select adapter. Future Solid primitives will be available here.
```tsx
// Install: npm install @tanstack/solid-select
import { render } from 'solid-js/web'
// Import primitives and core utilities from the Solid adapter.
// No need to separately install @tanstack/select.
import { select } from '@tanstack/solid-select'
function App() {
// Future Solid primitives (e.g. createSelect) will be available here.
return (
TanStack Select — Solid
{/* Custom headless select UI will be composed here */}
)
}
render(() => , document.getElementById('root')!)
```
--------------------------------
### React Adapter Usage: @tanstack/react-select
Source: https://context7.com/tanstack/select/llms.txt
Example of setting up a React application using the @tanstack/react-select adapter. Future React hooks will be available here.
```tsx
// Install: npm install @tanstack/react-select
import ReactDOM from 'react-dom/client'
// Import hooks and core utilities from the React adapter.
// No need to separately install @tanstack/select.
import { select } from '@tanstack/react-select'
function App() {
// Future React hooks (e.g. useSelect) will be available here.
return (
TanStack Select — React
{/* Custom headless select UI will be composed here */}
)
}
const root = ReactDOM.createRoot(document.getElementById('root')!)
root.render()
```
--------------------------------
### Build and Watch
Source: https://github.com/tanstack/select/blob/main/CONTRIBUTING.md
Builds the project and watches for changes, useful for testing in your own projects.
```bash
pnpm build
```
```bash
pnpm dev
```
--------------------------------
### Vanilla JS / TypeScript Usage: @tanstack/select
Source: https://context7.com/tanstack/select/llms.txt
Demonstrates importing the core 'select' identifier from the framework-agnostic package.
```ts
// Vanilla JS / TypeScript usage
import { select } from '@tanstack/select'
// 'select' is the core identifier exported by the library.
// Framework adapters re-export this and all other core APIs:
// import { select } from '@tanstack/react-select'
// import { select } from '@tanstack/solid-select'
console.log(select) // 'select'
```
--------------------------------
### Generate API Reference Docs with Typedoc
Source: https://context7.com/tanstack/select/llms.txt
This script uses `@tanstack/config/typedoc` to auto-generate Markdown API reference documentation from TypeScript source comments. It processes multiple packages and outputs to a specified directory. Run this script using `pnpm docs:generate`.
```javascript
// scripts/generateDocs.js
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { generateReferenceDocs } from '@tanstack/config/typedoc'
const __dirname = fileURLToPath(new URL('.', import.meta.url))
const packages = [
{
name: 'select',
entryPoints: [resolve(__dirname, '../packages/select/src/index.ts')],
tsconfig: resolve(__dirname, '../packages/select/tsconfig.docs.json'),
outputDir: resolve(__dirname, '../docs/reference'),
},
{
name: 'react-select',
entryPoints: [resolve(__dirname, '../packages/react-select/src/index.ts')],
tsconfig: resolve(__dirname, '../packages/react-select/tsconfig.docs.json'),
outputDir: resolve(__dirname, '../docs/framework/react/reference'),
exclude: ['packages/select/**/*'], // exclude core re-exports from React docs
},
{
name: 'solid-select',
entryPoints: [resolve(__dirname, '../packages/solid-select/src/index.ts')],
tsconfig: resolve(__dirname, '../packages/solid-select/tsconfig.docs.json'),
outputDir: resolve(__dirname, '../docs/framework/solid/reference'),
exclude: ['packages/select/**/*'], // exclude core re-exports from Solid docs
},
]
await generateReferenceDocs({ packages })
// Run via: pnpm docs:generate
```
--------------------------------
### Select Variable Declaration
Source: https://github.com/tanstack/select/blob/main/docs/reference/variables/select.md
This constant 'select' is a string literal type, typically used for internal type checking or as a specific identifier.
```typescript
const select: "select" = 'select';
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.