skillfullstack 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.skillsRegistry/catalog.json +231 -0
- package/AGENTS.md +89 -0
- package/README.md +210 -2
- package/bin/index.js +508 -0
- package/package.json +57 -4
- package/skills/backend/apiEngineering/SKILL.md +102 -0
- package/skills/backend/apiEngineering/evals/evalApiEngineering.py +81 -0
- package/skills/backend/apiEngineering/evals/fixtures/invalid/sampleInvalidOpenApi.json +40 -0
- package/skills/backend/apiEngineering/evals/fixtures/valid/sampleValidOpenApi.json +47 -0
- package/skills/backend/apiEngineering/policies/compatibility.md +42 -0
- package/skills/backend/apiEngineering/policies/mandatory.md +48 -0
- package/skills/backend/apiEngineering/policies/performance.md +39 -0
- package/skills/backend/apiEngineering/policies/security.md +36 -0
- package/skills/backend/apiEngineering/references/apiObservability.md +39 -0
- package/skills/backend/apiEngineering/references/apiReference.md +3 -0
- package/skills/backend/apiEngineering/references/apiSecurityOwasp.md +47 -0
- package/skills/backend/apiEngineering/references/contractCompatibility.md +26 -0
- package/skills/backend/apiEngineering/references/databaseTransactions.md +40 -0
- package/skills/backend/apiEngineering/references/distributedReliability.md +26 -0
- package/skills/backend/apiEngineering/references/multiTenancy.md +27 -0
- package/skills/backend/apiEngineering/references/openApi32Standards.md +58 -0
- package/skills/backend/apiEngineering/references/paginationVersioning.md +57 -0
- package/skills/backend/apiEngineering/references/responseStandards.md +94 -0
- package/skills/backend/apiEngineering/scripts/auditApiContract.py +123 -0
- package/skills/backend/apiEngineering/scripts/checkBreakingChanges.py +77 -0
- package/skills/backend/apiEngineering/scripts/generateResponseEnvelope.py +88 -0
- package/skills/backend/apiEngineering/templates/apiChecklist.md +27 -0
- package/skills/backend/apiEngineering/templates/openapi.yaml +125 -0
- package/skills/backend/apiEngineering/templates/problemDetails.json +44 -0
- package/skills/backend/databaseArchitecture/SKILL.md +118 -0
- package/skills/backend/databaseArchitecture/evals/evalDatabaseArchitecture.py +85 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/dangerousMigration.sql +4 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/invalidSchema.sql +23 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/safeMigration.sql +3 -0
- package/skills/backend/databaseArchitecture/evals/fixtures/validSchema.sql +37 -0
- package/skills/backend/databaseArchitecture/policies/integrity.md +25 -0
- package/skills/backend/databaseArchitecture/policies/mandatory.md +32 -0
- package/skills/backend/databaseArchitecture/policies/migration.md +22 -0
- package/skills/backend/databaseArchitecture/policies/normalization.md +25 -0
- package/skills/backend/databaseArchitecture/policies/performance.md +26 -0
- package/skills/backend/databaseArchitecture/policies/recovery.md +23 -0
- package/skills/backend/databaseArchitecture/policies/security.md +26 -0
- package/skills/backend/databaseArchitecture/policies/tableCreationChecklist.md +70 -0
- package/skills/backend/databaseArchitecture/references/analyticsWarehousing.md +32 -0
- package/skills/backend/databaseArchitecture/references/apiReference.md +3 -0
- package/skills/backend/databaseArchitecture/references/backupDisasterRecovery.md +27 -0
- package/skills/backend/databaseArchitecture/references/dataModelingLifecycle.md +30 -0
- package/skills/backend/databaseArchitecture/references/databaseTaxonomy.md +32 -0
- package/skills/backend/databaseArchitecture/references/indexingOptimization.md +32 -0
- package/skills/backend/databaseArchitecture/references/normalizationTheory.md +61 -0
- package/skills/backend/databaseArchitecture/references/scalabilitySharding.md +37 -0
- package/skills/backend/databaseArchitecture/references/transactionConcurrency.md +39 -0
- package/skills/backend/databaseArchitecture/scripts/analyzeMigration.py +99 -0
- package/skills/backend/databaseArchitecture/scripts/auditDatabaseSchema.py +177 -0
- package/skills/backend/databaseArchitecture/scripts/inspectDatabaseIndexes.py +149 -0
- package/skills/backend/databaseArchitecture/templates/adrTemplate.md +32 -0
- package/skills/backend/databaseArchitecture/templates/databaseChecklist.md +29 -0
- package/skills/backend/databaseArchitecture/templates/migrationPlan.md +40 -0
- package/skills/backend/durableBackgroundJobs/SKILL.md +112 -0
- package/skills/backend/durableBackgroundJobs/evals/durableJobVerification.json +14 -0
- package/skills/backend/durableBackgroundJobs/references/apiReference.md +3 -0
- package/skills/backend/durableBackgroundJobs/references/durableStepPatterns.md +6 -0
- package/skills/backend/durableBackgroundJobs/references/idempotencyKeys.md +5 -0
- package/skills/backend/durableBackgroundJobs/scripts/testWorkflowDispatch.py +24 -0
- package/skills/backend/golangStandard/SKILL.md +155 -0
- package/skills/backend/golangStandard/evals/goVerification.json +14 -0
- package/skills/backend/golangStandard/references/apiReference.md +3 -0
- package/skills/backend/golangStandard/references/layoutGuide.md +26 -0
- package/skills/backend/golangStandard/references/slogPatterns.md +26 -0
- package/skills/backend/golangStandard/scripts/scaffoldGoModule.py +105 -0
- package/skills/backend/pythonStandard/SKILL.md +138 -0
- package/skills/backend/pythonStandard/evals/pythonVerification.json +14 -0
- package/skills/backend/pythonStandard/references/apiReference.md +3 -0
- package/skills/backend/pythonStandard/references/pydanticPatterns.md +16 -0
- package/skills/backend/pythonStandard/references/pyprojectSpecs.md +37 -0
- package/skills/backend/pythonStandard/scripts/scaffoldUvProject.py +79 -0
- package/skills/backend/upstash/SKILL.md +98 -0
- package/skills/backend/upstash/evals/upstashVerification.json +14 -0
- package/skills/backend/upstash/references/apiReference.md +3 -0
- package/skills/backend/upstash/references/qstashFlowControl.md +34 -0
- package/skills/backend/upstash/references/ratelimitPatterns.md +53 -0
- package/skills/backend/upstash/references/workflowPatterns.md +35 -0
- package/skills/backend/upstash/scripts/testRedisConnection.py +36 -0
- package/skills/cicdDevops/cicdPipeline/SKILL.md +148 -0
- package/skills/cicdDevops/cicdPipeline/evals/evalCicd.py +37 -0
- package/skills/cicdDevops/cicdPipeline/references/apiReference.md +3 -0
- package/skills/cicdDevops/cicdPipeline/references/cicdDeploymentPatterns.md +27 -0
- package/skills/cicdDevops/cicdPipeline/scripts/auditDockerfileSecurity.py +56 -0
- package/skills/dataAi/mcpServerDevelopment/SKILL.md +123 -0
- package/skills/dataAi/mcpServerDevelopment/evals/mcpVerification.json +14 -0
- package/skills/dataAi/mcpServerDevelopment/references/apiReference.md +3 -0
- package/skills/dataAi/mcpServerDevelopment/references/mcpClientConfigs.md +38 -0
- package/skills/dataAi/mcpServerDevelopment/references/toolSchemaDesign.md +6 -0
- package/skills/dataAi/mcpServerDevelopment/scripts/runFastMcpBoilerplate.py +36 -0
- package/skills/dataAi/ragPipelineProduction/SKILL.md +113 -0
- package/skills/dataAi/ragPipelineProduction/evals/ragVerification.json +14 -0
- package/skills/dataAi/ragPipelineProduction/references/apiReference.md +3 -0
- package/skills/dataAi/ragPipelineProduction/references/chunkingStrategies.md +10 -0
- package/skills/dataAi/ragPipelineProduction/references/rrfAlgorithm.md +13 -0
- package/skills/dataAi/ragPipelineProduction/scripts/runHybridRrfSearch.py +33 -0
- package/skills/devopsCloud/cloudflare/SKILL.md +282 -0
- package/skills/devopsCloud/cloudflare/assets/README.md +48 -0
- package/skills/devopsCloud/cloudflare/assets/ai/agents-sdk.md +118 -0
- package/skills/devopsCloud/cloudflare/assets/ai/ai-gateway.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/ai/ai-search.md +129 -0
- package/skills/devopsCloud/cloudflare/assets/ai/workers-ai.md +127 -0
- package/skills/devopsCloud/cloudflare/assets/cli/c3.md +292 -0
- package/skills/devopsCloud/cloudflare/assets/cli/cf-cli.md +90 -0
- package/skills/devopsCloud/cloudflare/assets/cli/wrangler.md +43 -0
- package/skills/devopsCloud/cloudflare/assets/compute/cron-triggers.md +486 -0
- package/skills/devopsCloud/cloudflare/assets/compute/service-bindings.md +251 -0
- package/skills/devopsCloud/cloudflare/assets/compute/smart-placement.md +435 -0
- package/skills/devopsCloud/cloudflare/assets/compute/static-assets.md +220 -0
- package/skills/devopsCloud/cloudflare/assets/compute/workers.md +129 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/d1.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/durable-objects.md +122 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/hyperdrive.md +210 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/kv.md +198 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/queues.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/r2.md +105 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/vectorize.md +97 -0
- package/skills/devopsCloud/cloudflare/assets/database-storage/workflows.md +141 -0
- package/skills/devopsCloud/cloudflare/assets/llms.txt +143 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/cache-cdn.md +109 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/dns.md +71 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/rate-limiting.md +130 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/tunnels.md +57 -0
- package/skills/devopsCloud/cloudflare/assets/networking-security/waf.md +143 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/1xxx-errors.md +209 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/5xx-errors.md +111 -0
- package/skills/devopsCloud/cloudflare/assets/troubleshooting/http-status-codes.md +38 -0
- package/skills/devopsCloud/cloudflare/evals/evals.json +75 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/README.md +27 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/dynamic-routing.md +15 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/features.md +22 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/sdk-integration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/ai-gateway/troubleshooting.md +16 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/README.md +25 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/gotchas.md +13 -0
- package/skills/devopsCloud/cloudflare/references/ai-search/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/bindings/README.md +16 -0
- package/skills/devopsCloud/cloudflare/references/bindings/api.md +19 -0
- package/skills/devopsCloud/cloudflare/references/bindings/configuration.md +20 -0
- package/skills/devopsCloud/cloudflare/references/bindings/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/bindings/patterns.md +20 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/README.md +18 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/api.md +12 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/configuration.md +12 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/browser-rendering/patterns.md +12 -0
- package/skills/devopsCloud/cloudflare/references/cliComparison.md +93 -0
- package/skills/devopsCloud/cloudflare/references/containers/README.md +23 -0
- package/skills/devopsCloud/cloudflare/references/containers/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/containers/configuration.md +15 -0
- package/skills/devopsCloud/cloudflare/references/containers/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/containers/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/cron-triggers/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/README.md +15 -0
- package/skills/devopsCloud/cloudflare/references/d1/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/d1/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/frameworkCompatibility.md +110 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/README.md +28 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/api.md +26 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/configuration.md +34 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/gotchas.md +20 -0
- package/skills/devopsCloud/cloudflare/references/hyperdrive/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/images/README.md +12 -0
- package/skills/devopsCloud/cloudflare/references/images/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/images/configuration.md +17 -0
- package/skills/devopsCloud/cloudflare/references/images/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/images/patterns.md +16 -0
- package/skills/devopsCloud/cloudflare/references/kv/README.md +15 -0
- package/skills/devopsCloud/cloudflare/references/kv/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/kv/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/kv/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/kv/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/miniflare/patterns.md +19 -0
- package/skills/devopsCloud/cloudflare/references/observability/README.md +27 -0
- package/skills/devopsCloud/cloudflare/references/observability/api.md +20 -0
- package/skills/devopsCloud/cloudflare/references/observability/configuration.md +23 -0
- package/skills/devopsCloud/cloudflare/references/observability/gotchas.md +25 -0
- package/skills/devopsCloud/cloudflare/references/observability/patterns.md +14 -0
- package/skills/devopsCloud/cloudflare/references/pages/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/pages/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/pages/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/pages/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/pages/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/configuration.md +14 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/pages-functions/patterns.md +16 -0
- package/skills/devopsCloud/cloudflare/references/productSelectionMatrix.md +54 -0
- package/skills/devopsCloud/cloudflare/references/queues/README.md +24 -0
- package/skills/devopsCloud/cloudflare/references/queues/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/queues/configuration.md +20 -0
- package/skills/devopsCloud/cloudflare/references/queues/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/queues/patterns.md +21 -0
- package/skills/devopsCloud/cloudflare/references/r2/README.md +26 -0
- package/skills/devopsCloud/cloudflare/references/r2/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/r2/configuration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/r2/gotchas.md +17 -0
- package/skills/devopsCloud/cloudflare/references/r2/patterns.md +18 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/api.md +21 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/configuration.md +25 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/secrets-store/patterns.md +27 -0
- package/skills/devopsCloud/cloudflare/references/skill-feedback.md +41 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/api.md +16 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/static-assets/patterns.md +17 -0
- package/skills/devopsCloud/cloudflare/references/stream/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/stream/api-live.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/api.md +21 -0
- package/skills/devopsCloud/cloudflare/references/stream/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/gotchas.md +18 -0
- package/skills/devopsCloud/cloudflare/references/stream/patterns.md +22 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/configuration.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/gotchas.md +16 -0
- package/skills/devopsCloud/cloudflare/references/tail-workers/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/README.md +20 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/api.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/configuration.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/networking.md +14 -0
- package/skills/devopsCloud/cloudflare/references/tunnel/patterns.md +15 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/README.md +22 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/api.md +18 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/configuration.md +19 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/vectorize/patterns.md +24 -0
- package/skills/devopsCloud/cloudflare/references/waf/README.md +21 -0
- package/skills/devopsCloud/cloudflare/references/waf/api.md +17 -0
- package/skills/devopsCloud/cloudflare/references/waf/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/waf/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/waf/patterns.md +17 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/README.md +24 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/api.md +13 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/configuration.md +16 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/gotchas.md +15 -0
- package/skills/devopsCloud/cloudflare/references/workers-ai/patterns.md +14 -0
- package/skills/devopsCloud/cloudflare/references/workflows/README.md +23 -0
- package/skills/devopsCloud/cloudflare/references/workflows/api.md +17 -0
- package/skills/devopsCloud/cloudflare/references/workflows/configuration.md +18 -0
- package/skills/devopsCloud/cloudflare/references/workflows/gotchas.md +19 -0
- package/skills/devopsCloud/cloudflare/references/workflows/patterns.md +30 -0
- package/skills/devopsCloud/cloudflare/scripts/auditCloudflareProduction.py +95 -0
- package/skills/foundation/promptEvalTesting/SKILL.md +114 -0
- package/skills/foundation/promptEvalTesting/evals/promptEvalVerification.json +14 -0
- package/skills/foundation/promptEvalTesting/references/apiReference.md +3 -0
- package/skills/foundation/promptEvalTesting/references/evalMetricsCatalog.md +7 -0
- package/skills/foundation/promptEvalTesting/references/promptfooConfigSpecs.md +16 -0
- package/skills/foundation/promptEvalTesting/scripts/runPromptEvalSuite.py +29 -0
- package/skills/frontend/astro/SKILL.md +327 -0
- package/skills/frontend/astro/assets/README.md +71 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/content-collections.md +1061 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/data-fetching.md +109 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/images.md +719 -0
- package/skills/frontend/astro/assets/add-content-to-your-site/markdown.md +725 -0
- package/skills/frontend/astro/assets/build-your-ui/components.md +402 -0
- package/skills/frontend/astro/assets/build-your-ui/fonts.md +437 -0
- package/skills/frontend/astro/assets/build-your-ui/front-end-frameworks.md +245 -0
- package/skills/frontend/astro/assets/build-your-ui/layouts.md +267 -0
- package/skills/frontend/astro/assets/build-your-ui/scripts-and-event-handling.md +229 -0
- package/skills/frontend/astro/assets/build-your-ui/styles-and-css.md +782 -0
- package/skills/frontend/astro/assets/build-your-ui/syntax-highlighting.md +269 -0
- package/skills/frontend/astro/assets/configuration/build-with-ai.md +389 -0
- package/skills/frontend/astro/assets/configuration/configuration-overview.md +122 -0
- package/skills/frontend/astro/assets/configuration/dev-toolbar.md +86 -0
- package/skills/frontend/astro/assets/configuration/editor-setup.md +166 -0
- package/skills/frontend/astro/assets/configuration/environment-variables.md +352 -0
- package/skills/frontend/astro/assets/configuration/typescript.md +379 -0
- package/skills/frontend/astro/assets/configuration/working-with-integrations.md +606 -0
- package/skills/frontend/astro/assets/reference/adapter-reference.md +1242 -0
- package/skills/frontend/astro/assets/reference/cli-reference.md +575 -0
- package/skills/frontend/astro/assets/reference/configuration-reference.md +3144 -0
- package/skills/frontend/astro/assets/reference/content-loader-reference.md +1682 -0
- package/skills/frontend/astro/assets/reference/directives-reference.md +324 -0
- package/skills/frontend/astro/assets/reference/image-service-reference.md +346 -0
- package/skills/frontend/astro/assets/reference/integrations-reference.md +2813 -0
- package/skills/frontend/astro/assets/reference/modules/astro-actions.md +604 -0
- package/skills/frontend/astro/assets/reference/modules/astro-app.md +460 -0
- package/skills/frontend/astro/assets/reference/modules/astro-assets.md +1657 -0
- package/skills/frontend/astro/assets/reference/modules/astro-config.md +395 -0
- package/skills/frontend/astro/assets/reference/modules/astro-content.md +720 -0
- package/skills/frontend/astro/assets/reference/modules/astro-env.md +46 -0
- package/skills/frontend/astro/assets/reference/modules/astro-fetch.md +346 -0
- package/skills/frontend/astro/assets/reference/modules/astro-hono.md +37 -0
- package/skills/frontend/astro/assets/reference/modules/astro-i18n.md +462 -0
- package/skills/frontend/astro/assets/reference/modules/astro-middleware.md +292 -0
- package/skills/frontend/astro/assets/reference/modules/astro-static-paths.md +74 -0
- package/skills/frontend/astro/assets/reference/modules/astro-transitions.md +595 -0
- package/skills/frontend/astro/assets/reference/modules/astro-zod.md +120 -0
- package/skills/frontend/astro/assets/reference/session-driver-reference.md +205 -0
- package/skills/frontend/astro/assets/routing-and-navigation/endpoints.md +251 -0
- package/skills/frontend/astro/assets/routing-and-navigation/internationalization.md +374 -0
- package/skills/frontend/astro/assets/routing-and-navigation/middleware.md +288 -0
- package/skills/frontend/astro/assets/routing-and-navigation/pages.md +205 -0
- package/skills/frontend/astro/assets/routing-and-navigation/prefetch.md +273 -0
- package/skills/frontend/astro/assets/routing-and-navigation/routing.md +760 -0
- package/skills/frontend/astro/assets/routing-and-navigation/view-transitions.md +792 -0
- package/skills/frontend/astro/assets/server-rendering/actions.md +770 -0
- package/skills/frontend/astro/assets/server-rendering/caching.md +255 -0
- package/skills/frontend/astro/assets/server-rendering/on-demand-rendering.md +289 -0
- package/skills/frontend/astro/assets/server-rendering/server-islands.md +126 -0
- package/skills/frontend/astro/assets/server-rendering/sessions.md +270 -0
- package/skills/frontend/astro/assets/start-a-new-project/develop-and-build.md +147 -0
- package/skills/frontend/astro/assets/start-a-new-project/installation.md +342 -0
- package/skills/frontend/astro/assets/start-a-new-project/project-structure.md +137 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/testing.md +412 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/troubleshooting.md +229 -0
- package/skills/frontend/astro/assets/upgrade-and-troubleshooting/upgrade-astro.md +205 -0
- package/skills/frontend/astro/assets/welcome/courses.md +46 -0
- package/skills/frontend/astro/assets/welcome/islands-architecture.md +135 -0
- package/skills/frontend/astro/assets/welcome/why-astro.md +90 -0
- package/skills/frontend/astro/evals/evals.json +66 -0
- package/skills/frontend/astro/references/contentCollections.md +164 -0
- package/skills/frontend/astro/references/islandsArchitecture.md +128 -0
- package/skills/frontend/astro/references/serverIslandsAndActions.md +187 -0
- package/skills/frontend/astro/scripts/auditAstroProduction.py +78 -0
- package/skills/frontend/generativeUi/SKILL.md +128 -0
- package/skills/frontend/generativeUi/evals/generativeUiVerification.json +14 -0
- package/skills/frontend/generativeUi/references/apiReference.md +3 -0
- package/skills/frontend/generativeUi/references/clientToolComponentMapping.md +8 -0
- package/skills/frontend/generativeUi/references/dataStreamProtocol.md +10 -0
- package/skills/frontend/generativeUi/scripts/generateUiComponentStub.py +46 -0
- package/skills/frontend/nextjs/SKILL.md +138 -0
- package/skills/frontend/nextjs/assets/README.md +67 -0
- package/skills/frontend/nextjs/assets/api-reference/cli/create-next-app.md +210 -0
- package/skills/frontend/nextjs/assets/api-reference/cli/next.md +484 -0
- package/skills/frontend/nextjs/assets/api-reference/components/font.md +952 -0
- package/skills/frontend/nextjs/assets/api-reference/components/form.md +387 -0
- package/skills/frontend/nextjs/assets/api-reference/components/image.md +1372 -0
- package/skills/frontend/nextjs/assets/api-reference/components/link.md +954 -0
- package/skills/frontend/nextjs/assets/api-reference/components/script.md +421 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-private.md +211 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-remote.md +652 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-cache.md +848 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-client.md +149 -0
- package/skills/frontend/nextjs/assets/api-reference/directives/use-server.md +234 -0
- package/skills/frontend/nextjs/assets/api-reference/edge-runtime.md +188 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/default.md +80 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/dynamic-routes.md +417 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/error.md +361 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/forbidden.md +75 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation-client.md +308 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation.md +177 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/intercepting-routes.md +78 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/layout.md +803 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/loading.md +209 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/mdx-components.md +84 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/app-icons.md +302 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/manifest.md +90 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/opengraph-image.md +580 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/robots.md +234 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/sitemap.md +459 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/not-found.md +278 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/page.md +283 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/parallel-routes.md +517 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/proxy.md +857 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/public-folder.md +47 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-groups.md +40 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/dynamicParams.md +40 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/ensureStatic.md +195 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/instant.md +204 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/maxDuration.md +42 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/preferredRegion.md +55 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/prefetch.md +113 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/runtime.md +43 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/route.md +772 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/src-folder.md +42 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/template.md +174 -0
- package/skills/frontend/nextjs/assets/api-reference/file-conventions/unauthorized.md +143 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/after.md +332 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cacheLife.md +642 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cacheTag.md +272 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/catchError.md +267 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/connection.md +114 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/cookies.md +349 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/draft-mode.md +173 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/fetch.md +141 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/forbidden.md +327 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-image-metadata.md +311 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-metadata.md +1510 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-sitemaps.md +102 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-static-params.md +606 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/generate-viewport.md +347 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/headers.md +92 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/image-response.md +225 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/io.md +131 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/navigation.md +220 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-request.md +116 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-response.md +219 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/next-root-params.md +479 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/not-found.md +269 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/permanentRedirect.md +92 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/prefetch.md +202 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/redirect.md +255 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/refresh.md +91 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/revalidatePath.md +248 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/revalidateTag.md +175 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unauthorized.md +389 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_cache.md +131 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_noStore.md +61 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/unstable_rethrow.md +79 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/updateTag.md +173 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-link-status.md +268 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-offline.md +222 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-params.md +102 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-pathname.md +189 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-report-web-vitals.md +175 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-router.md +214 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-search-params.md +416 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segment.md +214 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segments.md +116 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/use-server-inserted-html.md +145 -0
- package/skills/frontend/nextjs/assets/api-reference/functions/userAgent.md +95 -0
- package/skills/frontend/nextjs/assets/api-reference/turbopack.md +552 -0
- package/skills/frontend/nextjs/assets/architecture/accessibility.md +47 -0
- package/skills/frontend/nextjs/assets/architecture/fast-refresh.md +122 -0
- package/skills/frontend/nextjs/assets/architecture/nextjs-compiler.md +376 -0
- package/skills/frontend/nextjs/assets/architecture/supported-browsers.md +146 -0
- package/skills/frontend/nextjs/assets/community/contribution-guide.md +459 -0
- package/skills/frontend/nextjs/assets/community/rspack.md +25 -0
- package/skills/frontend/nextjs/assets/getting-started/caching.md +626 -0
- package/skills/frontend/nextjs/assets/getting-started/css.md +336 -0
- package/skills/frontend/nextjs/assets/getting-started/deploying.md +115 -0
- package/skills/frontend/nextjs/assets/getting-started/error-handling.md +485 -0
- package/skills/frontend/nextjs/assets/getting-started/fetching-data.md +743 -0
- package/skills/frontend/nextjs/assets/getting-started/fonts.md +232 -0
- package/skills/frontend/nextjs/assets/getting-started/images.md +272 -0
- package/skills/frontend/nextjs/assets/getting-started/installation.md +446 -0
- package/skills/frontend/nextjs/assets/getting-started/layouts-and-pages.md +386 -0
- package/skills/frontend/nextjs/assets/getting-started/linking-and-navigating.md +475 -0
- package/skills/frontend/nextjs/assets/getting-started/metadata-and-og-images.md +370 -0
- package/skills/frontend/nextjs/assets/getting-started/mutating-data.md +679 -0
- package/skills/frontend/nextjs/assets/getting-started/project-structure.md +290 -0
- package/skills/frontend/nextjs/assets/getting-started/proxy.md +107 -0
- package/skills/frontend/nextjs/assets/getting-started/revalidating.md +241 -0
- package/skills/frontend/nextjs/assets/getting-started/route-handlers.md +233 -0
- package/skills/frontend/nextjs/assets/getting-started/server-and-client-components.md +683 -0
- package/skills/frontend/nextjs/assets/getting-started/upgrading.md +137 -0
- package/skills/frontend/nextjs/assets/glossary.md +315 -0
- package/skills/frontend/nextjs/evals/nextjsVerification.json +14 -0
- package/skills/frontend/nextjs/references/apiReference.md +3 -0
- package/skills/frontend/nextjs/references/dataAccessLayer.md +39 -0
- package/skills/frontend/nextjs/references/nextjsFeatureMap.md +276 -0
- package/skills/frontend/nextjs/references/productionChecklist.md +49 -0
- package/skills/frontend/nextjs/references/securityHeadersCsp.md +44 -0
- package/skills/frontend/nextjs/scripts/auditProductionReadiness.py +85 -0
- package/skills/frontend/shadcn-ui/SKILL.md +102 -0
- package/skills/frontend/shadcn-ui/assets/README.md +82 -0
- package/skills/frontend/shadcn-ui/assets/advanced/javascript.md +44 -0
- package/skills/frontend/shadcn-ui/assets/advanced/monorepo.md +254 -0
- package/skills/frontend/shadcn-ui/assets/advanced/react-19.md +166 -0
- package/skills/frontend/shadcn-ui/assets/advanced/tailwind-v4.md +333 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/chain-of-thought.md +519 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/chat.md +581 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/checkpoint.md +243 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/confirmation.md +382 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/context.md +188 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/file-tree.md +248 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/index.md +307 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/inline-citation.md +219 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/message.md +298 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/model-selector.md +368 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/plan.md +398 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/prompt-input.md +403 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/queue.md +517 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/reasoning.md +349 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/sources.md +303 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/stack-trace.md +514 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/subagent.md +551 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/suggestion.md +246 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/task.md +380 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/terminal.md +463 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/test-results.md +641 -0
- package/skills/frontend/shadcn-ui/assets/ai-elements/tool.md +915 -0
- package/skills/frontend/shadcn-ui/assets/components/accordion.md +490 -0
- package/skills/frontend/shadcn-ui/assets/components/alert-dialog.md +520 -0
- package/skills/frontend/shadcn-ui/assets/components/alert.md +351 -0
- package/skills/frontend/shadcn-ui/assets/components/aspect-ratio.md +206 -0
- package/skills/frontend/shadcn-ui/assets/components/attachment.md +715 -0
- package/skills/frontend/shadcn-ui/assets/components/avatar.md +581 -0
- package/skills/frontend/shadcn-ui/assets/components/badge.md +276 -0
- package/skills/frontend/shadcn-ui/assets/components/breadcrumb.md +556 -0
- package/skills/frontend/shadcn-ui/assets/components/bubble.md +706 -0
- package/skills/frontend/shadcn-ui/assets/components/button-group.md +969 -0
- package/skills/frontend/shadcn-ui/assets/components/button.md +523 -0
- package/skills/frontend/shadcn-ui/assets/components/calendar.md +959 -0
- package/skills/frontend/shadcn-ui/assets/components/card.md +684 -0
- package/skills/frontend/shadcn-ui/assets/components/carousel.md +643 -0
- package/skills/frontend/shadcn-ui/assets/components/chart.md +1295 -0
- package/skills/frontend/shadcn-ui/assets/components/checkbox.md +553 -0
- package/skills/frontend/shadcn-ui/assets/components/code-block.md +2041 -0
- package/skills/frontend/shadcn-ui/assets/components/collapsible.md +504 -0
- package/skills/frontend/shadcn-ui/assets/components/combobox.md +1102 -0
- package/skills/frontend/shadcn-ui/assets/components/command.md +682 -0
- package/skills/frontend/shadcn-ui/assets/components/context-menu.md +949 -0
- package/skills/frontend/shadcn-ui/assets/components/data-table.md +1667 -0
- package/skills/frontend/shadcn-ui/assets/components/date-picker.md +698 -0
- package/skills/frontend/shadcn-ui/assets/components/dialog.md +454 -0
- package/skills/frontend/shadcn-ui/assets/components/direction.md +205 -0
- package/skills/frontend/shadcn-ui/assets/components/drawer.md +806 -0
- package/skills/frontend/shadcn-ui/assets/components/dropdown-menu.md +1315 -0
- package/skills/frontend/shadcn-ui/assets/components/empty.md +562 -0
- package/skills/frontend/shadcn-ui/assets/components/field.md +1321 -0
- package/skills/frontend/shadcn-ui/assets/components/hover-card.md +342 -0
- package/skills/frontend/shadcn-ui/assets/components/index.md +82 -0
- package/skills/frontend/shadcn-ui/assets/components/input-group.md +980 -0
- package/skills/frontend/shadcn-ui/assets/components/input-otp.md +551 -0
- package/skills/frontend/shadcn-ui/assets/components/input.md +555 -0
- package/skills/frontend/shadcn-ui/assets/components/item.md +937 -0
- package/skills/frontend/shadcn-ui/assets/components/kbd.md +290 -0
- package/skills/frontend/shadcn-ui/assets/components/label.md +327 -0
- package/skills/frontend/shadcn-ui/assets/components/marker.md +445 -0
- package/skills/frontend/shadcn-ui/assets/components/menubar.md +804 -0
- package/skills/frontend/shadcn-ui/assets/components/message-scroller.md +2770 -0
- package/skills/frontend/shadcn-ui/assets/components/message.md +618 -0
- package/skills/frontend/shadcn-ui/assets/components/native-select.md +321 -0
- package/skills/frontend/shadcn-ui/assets/components/navigation-menu.md +568 -0
- package/skills/frontend/shadcn-ui/assets/components/pagination.md +425 -0
- package/skills/frontend/shadcn-ui/assets/components/popover.md +402 -0
- package/skills/frontend/shadcn-ui/assets/components/progress.md +240 -0
- package/skills/frontend/shadcn-ui/assets/components/questionnaire.md +2055 -0
- package/skills/frontend/shadcn-ui/assets/components/radio-group.md +440 -0
- package/skills/frontend/shadcn-ui/assets/components/resizable.md +302 -0
- package/skills/frontend/shadcn-ui/assets/components/scroll-area.md +226 -0
- package/skills/frontend/shadcn-ui/assets/components/select.md +647 -0
- package/skills/frontend/shadcn-ui/assets/components/separator.md +235 -0
- package/skills/frontend/shadcn-ui/assets/components/sheet.md +354 -0
- package/skills/frontend/shadcn-ui/assets/components/sidebar.md +1156 -0
- package/skills/frontend/shadcn-ui/assets/components/skeleton.md +217 -0
- package/skills/frontend/shadcn-ui/assets/components/slider.md +253 -0
- package/skills/frontend/shadcn-ui/assets/components/spinner.md +352 -0
- package/skills/frontend/shadcn-ui/assets/components/switch.md +296 -0
- package/skills/frontend/shadcn-ui/assets/components/table.md +572 -0
- package/skills/frontend/shadcn-ui/assets/components/tabs.md +425 -0
- package/skills/frontend/shadcn-ui/assets/components/textarea.md +218 -0
- package/skills/frontend/shadcn-ui/assets/components/toast.md +260 -0
- package/skills/frontend/shadcn-ui/assets/components/toggle-group.md +419 -0
- package/skills/frontend/shadcn-ui/assets/components/toggle.md +220 -0
- package/skills/frontend/shadcn-ui/assets/components/tooltip.md +332 -0
- package/skills/frontend/shadcn-ui/assets/components/trace.md +1890 -0
- package/skills/frontend/shadcn-ui/assets/components/typography.md +561 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/next.md +108 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/overview.md +75 -0
- package/skills/frontend/shadcn-ui/assets/dark-mode/vite.md +144 -0
- package/skills/frontend/shadcn-ui/assets/forms/next.md +716 -0
- package/skills/frontend/shadcn-ui/assets/forms/overview.md +60 -0
- package/skills/frontend/shadcn-ui/assets/forms/react-hook-form.md +2055 -0
- package/skills/frontend/shadcn-ui/assets/forms/tanstack-form.md +2236 -0
- package/skills/frontend/shadcn-ui/assets/installation/astro.md +252 -0
- package/skills/frontend/shadcn-ui/assets/installation/manual.md +255 -0
- package/skills/frontend/shadcn-ui/assets/installation/next.md +256 -0
- package/skills/frontend/shadcn-ui/assets/installation/react-router.md +226 -0
- package/skills/frontend/shadcn-ui/assets/installation/remix.md +52 -0
- package/skills/frontend/shadcn-ui/assets/installation/vite.md +314 -0
- package/skills/frontend/shadcn-ui/assets/mcp/mcp.md +338 -0
- package/skills/frontend/shadcn-ui/assets/overview/changelog.md +6 -0
- package/skills/frontend/shadcn-ui/assets/overview/cli.md +738 -0
- package/skills/frontend/shadcn-ui/assets/overview/components-json.md +379 -0
- package/skills/frontend/shadcn-ui/assets/overview/directory.md +74 -0
- package/skills/frontend/shadcn-ui/assets/overview/introduction.md +77 -0
- package/skills/frontend/shadcn-ui/assets/overview/skills.md +71 -0
- package/skills/frontend/shadcn-ui/assets/overview/theming.md +304 -0
- package/skills/frontend/shadcn-ui/assets/overview/typeset.md +242 -0
- package/skills/frontend/shadcn-ui/assets/registry/getting-started.md +648 -0
- package/skills/frontend/shadcn-ui/assets/registry/overview.md +90 -0
- package/skills/frontend/shadcn-ui/assets/registry/registry-item-json.md +483 -0
- package/skills/frontend/shadcn-ui/assets/registry/registry-json.md +178 -0
- package/skills/frontend/shadcn-ui/evals/componentVerification.json +19 -0
- package/skills/frontend/shadcn-ui/references/aiComponentsCatalog.md +51 -0
- package/skills/frontend/shadcn-ui/references/apiReference.md +3 -0
- package/skills/frontend/shadcn-ui/references/blocksCatalog.md +32 -0
- package/skills/frontend/shadcn-ui/references/cliCommands.md +47 -0
- package/skills/frontend/shadcn-ui/references/componentMarkdownSources.md +48 -0
- package/skills/frontend/shadcn-ui/scripts/fetchComponentDocs.py +43 -0
- package/skills/frontend/tsxReactStandard/SKILL.md +150 -0
- package/skills/frontend/tsxReactStandard/evals/tsxVerification.json +14 -0
- package/skills/frontend/tsxReactStandard/references/apiReference.md +3 -0
- package/skills/frontend/tsxReactStandard/references/discriminatedUnions.md +31 -0
- package/skills/frontend/tsxReactStandard/references/tsconfigStrict.md +36 -0
- package/skills/frontend/tsxReactStandard/scripts/validateTsxTypes.py +44 -0
- package/skills/gitVersionControl/gitWorkflow/SKILL.md +128 -0
- package/skills/gitVersionControl/gitWorkflow/assets/README.md +23 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-environment.md +87 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-formatting.md +156 -0
- package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-reference.md +2363 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-git.md +156 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-remote-repositories.md +65 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/associating-text-editors-with-git.md +93 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/caching-your-github-credentials.md +115 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/getting-changes-from-a-remote-repository.md +76 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/ignoring-files.md +51 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/managing-remote-repositories.md +231 -0
- package/skills/gitVersionControl/gitWorkflow/assets/using-git/pushing-commits-to-a-remote-repository.md +119 -0
- package/skills/gitVersionControl/gitWorkflow/evals/evalGitWorkflow.py +43 -0
- package/skills/gitVersionControl/gitWorkflow/references/apiReference.md +3 -0
- package/skills/gitVersionControl/gitWorkflow/references/branchingModels.md +32 -0
- package/skills/gitVersionControl/gitWorkflow/scripts/diagnoseGitGraph.py +68 -0
- package/skills/github/assets/README.md +39 -0
- package/skills/github/assets/cli/gh-environment.md +87 -0
- package/skills/github/assets/cli/gh-formatting.md +156 -0
- package/skills/github/assets/cli/gh-reference.md +2363 -0
- package/skills/github/assets/docs-api/github-docs-api.md +60 -0
- package/skills/github/assets/rest-api/actions-secrets.md +1272 -0
- package/skills/github/assets/rest-api/actions-variables.md +1247 -0
- package/skills/github/assets/rest-api/actions-workflow-runs.md +1697 -0
- package/skills/github/assets/rest-api/actions-workflows.md +348 -0
- package/skills/github/assets/rest-api/authenticating.md +174 -0
- package/skills/github/assets/rest-api/branches.md +727 -0
- package/skills/github/assets/rest-api/checks-runs.md +1013 -0
- package/skills/github/assets/rest-api/checks-suites.md +1142 -0
- package/skills/github/assets/rest-api/code-scanning.md +2957 -0
- package/skills/github/assets/rest-api/collaborators.md +547 -0
- package/skills/github/assets/rest-api/commits.md +957 -0
- package/skills/github/assets/rest-api/dependabot-alerts.md +895 -0
- package/skills/github/assets/rest-api/orgs.md +1172 -0
- package/skills/github/assets/rest-api/overview.md +875 -0
- package/skills/github/assets/rest-api/pull-reviews.md +722 -0
- package/skills/github/assets/rest-api/pulls.md +1605 -0
- package/skills/github/assets/rest-api/quickstart.md +344 -0
- package/skills/github/assets/rest-api/releases.md +650 -0
- package/skills/github/assets/rest-api/repos.md +2957 -0
- package/skills/github/assets/rest-api/rules.md +1507 -0
- package/skills/github/assets/rest-api/secret-scanning.md +947 -0
- package/skills/github/assets/rest-api/teams.md +1690 -0
- package/skills/github/githubAction/SKILL.md +159 -0
- package/skills/github/githubAction/assets/README.md +38 -0
- package/skills/github/githubAction/assets/reference/contexts.md +918 -0
- package/skills/github/githubAction/assets/reference/dependency-caching.md +393 -0
- package/skills/github/githubAction/assets/reference/events-that-trigger-workflows.md +1348 -0
- package/skills/github/githubAction/assets/reference/expressions.md +441 -0
- package/skills/github/githubAction/assets/reference/metadata-syntax.md +803 -0
- package/skills/github/githubAction/assets/reference/variables.md +149 -0
- package/skills/github/githubAction/assets/reference/workflow-cancellation.md +22 -0
- package/skills/github/githubAction/assets/reference/workflow-commands.md +1056 -0
- package/skills/github/githubAction/assets/reference/workflow-syntax.md +1721 -0
- package/skills/github/githubAction/assets/rest-api/secrets.md +1272 -0
- package/skills/github/githubAction/assets/rest-api/workflow-runs.md +1697 -0
- package/skills/github/githubAction/assets/rest-api/workflows.md +348 -0
- package/skills/github/githubAction/assets/starter-workflows/automation/stale.yml +27 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/blank.yml +36 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/docker-image.yml +18 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/go.yml +28 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/maven.yml +35 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/node.js.yml +31 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/python-app.yml +39 -0
- package/skills/github/githubAction/assets/starter-workflows/ci/rust.yml +22 -0
- package/skills/github/githubAction/assets/starter-workflows/code-scanning/codeql.yml +97 -0
- package/skills/github/githubAction/evals/actionVerification.json +14 -0
- package/skills/github/githubAction/references/apiReference.md +3 -0
- package/skills/github/githubAction/references/workflowPatterns.md +81 -0
- package/skills/github/githubAction/scripts/validateWorkflowYaml.py +53 -0
- package/skills/github/githubQuality/SKILL.md +136 -0
- package/skills/github/githubQuality/assets/README.md +24 -0
- package/skills/github/githubQuality/assets/pull-requests/about-code-owners.md +178 -0
- package/skills/github/githubQuality/assets/pull-requests/about-merge-methods.md +48 -0
- package/skills/github/githubQuality/assets/pull-requests/creating-a-pull-request.md +170 -0
- package/skills/github/githubQuality/assets/pull-requests/giving-reviews.md +48 -0
- package/skills/github/githubQuality/assets/pull-requests/managing-a-merge-queue.md +134 -0
- package/skills/github/githubQuality/assets/pull-requests/merging-a-pull-request.md +101 -0
- package/skills/github/githubQuality/assets/pull-requests/resolving-reviews.md +59 -0
- package/skills/github/githubQuality/assets/pull-requests/status-checks.md +135 -0
- package/skills/github/githubQuality/assets/rest-api/checks-runs.md +1013 -0
- package/skills/github/githubQuality/assets/rest-api/checks-suites.md +1142 -0
- package/skills/github/githubQuality/assets/rest-api/commits.md +957 -0
- package/skills/github/githubQuality/assets/rest-api/pulls.md +1605 -0
- package/skills/github/githubQuality/assets/rest-api/reviews.md +722 -0
- package/skills/github/githubQuality/evals/qualityVerification.json +14 -0
- package/skills/github/githubQuality/references/apiReference.md +3 -0
- package/skills/github/githubQuality/references/codeownersExample.md +26 -0
- package/skills/github/githubQuality/references/prTemplate.md +20 -0
- package/skills/github/githubQuality/scripts/auditPrQuality.py +52 -0
- package/skills/github/githubSecurity/SKILL.md +170 -0
- package/skills/github/githubSecurity/assets/README.md +32 -0
- package/skills/github/githubSecurity/assets/code-scanning/code-scanning-alerts.md +133 -0
- package/skills/github/githubSecurity/assets/code-scanning/code-scanning.md +67 -0
- package/skills/github/githubSecurity/assets/code-scanning/codeql-code-scanning.md +79 -0
- package/skills/github/githubSecurity/assets/code-scanning/configure-code-scanning.md +121 -0
- package/skills/github/githubSecurity/assets/dependabot/about-the-dependabot-yml-file.md +74 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-alerts.md +133 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-security-updates.md +95 -0
- package/skills/github/githubSecurity/assets/dependabot/dependabot-version-updates.md +80 -0
- package/skills/github/githubSecurity/assets/rest-api/code-scanning.md +2957 -0
- package/skills/github/githubSecurity/assets/rest-api/dependabot-alerts.md +895 -0
- package/skills/github/githubSecurity/assets/rest-api/secret-scanning.md +947 -0
- package/skills/github/githubSecurity/assets/secret-scanning/enable-secret-scanning.md +59 -0
- package/skills/github/githubSecurity/assets/secret-scanning/secret-scanning.md +105 -0
- package/skills/github/githubSecurity/assets/security-advisories/github-advisory-database.md +148 -0
- package/skills/github/githubSecurity/evals/securityVerification.json +14 -0
- package/skills/github/githubSecurity/references/apiReference.md +3 -0
- package/skills/github/githubSecurity/references/codeqlAnalysis.yml +42 -0
- package/skills/github/githubSecurity/references/dependabotConfig.yml +27 -0
- package/skills/github/githubSecurity/scripts/auditRepoSecurity.py +47 -0
- package/skills/github/githubSetup/SKILL.md +137 -0
- package/skills/github/githubSetup/assets/README.md +40 -0
- package/skills/github/githubSetup/assets/branches/about-protected-branches.md +198 -0
- package/skills/github/githubSetup/assets/branches/changing-the-default-branch.md +49 -0
- package/skills/github/githubSetup/assets/branches/deleting-and-restoring-branches.md +44 -0
- package/skills/github/githubSetup/assets/branches/managing-a-branch-protection-rule.md +115 -0
- package/skills/github/githubSetup/assets/branches/renaming-a-branch.md +74 -0
- package/skills/github/githubSetup/assets/branches/viewing-branches-in-your-repository.md +30 -0
- package/skills/github/githubSetup/assets/repositories/about-repositories.md +127 -0
- package/skills/github/githubSetup/assets/repositories/cloning-a-repository.md +114 -0
- package/skills/github/githubSetup/assets/repositories/creating-a-new-repository.md +82 -0
- package/skills/github/githubSetup/assets/repositories/creating-a-repository-from-a-template.md +51 -0
- package/skills/github/githubSetup/assets/repositories/deleting-a-repository.md +34 -0
- package/skills/github/githubSetup/assets/repositories/managing-teams-and-people-with-access.md +69 -0
- package/skills/github/githubSetup/assets/repositories/renaming-a-repository.md +47 -0
- package/skills/github/githubSetup/assets/repositories/restoring-a-deleted-repository.md +61 -0
- package/skills/github/githubSetup/assets/repositories/setting-repository-visibility.md +137 -0
- package/skills/github/githubSetup/assets/rest-api/branches.md +727 -0
- package/skills/github/githubSetup/assets/rest-api/quickstart.md +344 -0
- package/skills/github/githubSetup/assets/rest-api/repos.md +2957 -0
- package/skills/github/githubSetup/assets/rulesets/about-rulesets.md +72 -0
- package/skills/github/githubSetup/assets/rulesets/available-rules-for-rulesets.md +383 -0
- package/skills/github/githubSetup/assets/rulesets/converting-branch-protections-to-rulesets.md +92 -0
- package/skills/github/githubSetup/assets/rulesets/creating-rulesets-for-a-repository.md +108 -0
- package/skills/github/githubSetup/assets/rulesets/managing-rulesets-for-a-repository.md +149 -0
- package/skills/github/githubSetup/assets/rulesets/troubleshooting-rules.md +122 -0
- package/skills/github/githubSetup/evals/setupVerification.json +14 -0
- package/skills/github/githubSetup/references/apiReference.md +3 -0
- package/skills/github/githubSetup/references/repoSettingsBlueprint.md +13 -0
- package/skills/github/githubSetup/references/rulesetTemplates.json +42 -0
- package/skills/github/githubSetup/scripts/configureRepoBaseline.py +46 -0
- package/skills/github/githubTeam/SKILL.md +115 -0
- package/skills/github/githubTeam/assets/README.md +21 -0
- package/skills/github/githubTeam/assets/organizations/about-organizations.md +69 -0
- package/skills/github/githubTeam/assets/organizations/repository-roles-for-an-organization.md +94 -0
- package/skills/github/githubTeam/assets/rest-api/collaborators.md +547 -0
- package/skills/github/githubTeam/assets/rest-api/orgs.md +1172 -0
- package/skills/github/githubTeam/assets/rest-api/teams.md +1690 -0
- package/skills/github/githubTeam/assets/teams/about-teams.md +82 -0
- package/skills/github/githubTeam/assets/teams/adding-members-to-a-team.md +55 -0
- package/skills/github/githubTeam/evals/teamVerification.json +14 -0
- package/skills/github/githubTeam/references/apiReference.md +3 -0
- package/skills/github/githubTeam/references/permissionMatrix.md +17 -0
- package/skills/github/githubTeam/references/reviewAssignment.md +17 -0
- package/skills/github/githubTeam/scripts/manageTeamSync.py +31 -0
- package/skills/securityQa/llmSecurityRedteaming/SKILL.md +86 -0
- package/skills/securityQa/llmSecurityRedteaming/evals/securityRedteamVerification.json +14 -0
- package/skills/securityQa/llmSecurityRedteaming/references/apiReference.md +3 -0
- package/skills/securityQa/llmSecurityRedteaming/references/jailbreakTaxonomy.md +6 -0
- package/skills/securityQa/llmSecurityRedteaming/references/owaspLlmTopTen.md +12 -0
- package/skills/securityQa/llmSecurityRedteaming/scripts/testPromptInjection.py +34 -0
- package/skills/softwareDevelopment/requirementsEngineering/SKILL.md +110 -0
- package/skills/softwareDevelopment/requirementsEngineering/evals/evalRequirements.py +33 -0
- package/skills/softwareDevelopment/requirementsEngineering/references/apiReference.md +3 -0
- package/skills/softwareDevelopment/requirementsEngineering/references/requirementsAnalysisModels.md +34 -0
- package/skills/softwareDevelopment/requirementsEngineering/scripts/validateUserStories.py +49 -0
- package/skills/testing/testDrivenDevelopment/SKILL.md +122 -0
- package/skills/testing/testDrivenDevelopment/evals/evalTdd.py +25 -0
- package/skills/testing/testDrivenDevelopment/references/apiReference.md +3 -0
- package/skills/testing/testDrivenDevelopment/references/testPyramidDoubles.md +35 -0
- package/skills/testing/testDrivenDevelopment/scripts/auditTestPyramid.py +58 -0
|
@@ -0,0 +1,1321 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Field
|
|
3
|
+
description: Combine labels, controls, and help text to compose accessible form fields and grouped inputs.
|
|
4
|
+
base: base
|
|
5
|
+
component: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { Button } from "@/components/ui/button"
|
|
10
|
+
import { Checkbox } from "@/components/ui/checkbox"
|
|
11
|
+
import {
|
|
12
|
+
Field,
|
|
13
|
+
FieldDescription,
|
|
14
|
+
FieldGroup,
|
|
15
|
+
FieldLabel,
|
|
16
|
+
FieldLegend,
|
|
17
|
+
FieldSeparator,
|
|
18
|
+
FieldSet,
|
|
19
|
+
} from "@/components/ui/field"
|
|
20
|
+
import { Input } from "@/components/ui/input"
|
|
21
|
+
import {
|
|
22
|
+
Select,
|
|
23
|
+
SelectContent,
|
|
24
|
+
SelectGroup,
|
|
25
|
+
SelectItem,
|
|
26
|
+
SelectTrigger,
|
|
27
|
+
SelectValue,
|
|
28
|
+
} from "@/components/ui/select"
|
|
29
|
+
import { Textarea } from "@/components/ui/textarea"
|
|
30
|
+
|
|
31
|
+
const months = [
|
|
32
|
+
{ label: "MM", value: null },
|
|
33
|
+
{ label: "01", value: "01" },
|
|
34
|
+
{ label: "02", value: "02" },
|
|
35
|
+
{ label: "03", value: "03" },
|
|
36
|
+
{ label: "04", value: "04" },
|
|
37
|
+
{ label: "05", value: "05" },
|
|
38
|
+
{ label: "06", value: "06" },
|
|
39
|
+
{ label: "07", value: "07" },
|
|
40
|
+
{ label: "08", value: "08" },
|
|
41
|
+
{ label: "09", value: "09" },
|
|
42
|
+
{ label: "10", value: "10" },
|
|
43
|
+
{ label: "11", value: "11" },
|
|
44
|
+
{ label: "12", value: "12" },
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
const years = [
|
|
48
|
+
{ label: "YYYY", value: null },
|
|
49
|
+
{ label: "2024", value: "2024" },
|
|
50
|
+
{ label: "2025", value: "2025" },
|
|
51
|
+
{ label: "2026", value: "2026" },
|
|
52
|
+
{ label: "2027", value: "2027" },
|
|
53
|
+
{ label: "2028", value: "2028" },
|
|
54
|
+
{ label: "2029", value: "2029" },
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
export function FieldDemo() {
|
|
58
|
+
return (
|
|
59
|
+
<div className="w-full max-w-md">
|
|
60
|
+
<form>
|
|
61
|
+
<FieldGroup>
|
|
62
|
+
<FieldSet>
|
|
63
|
+
<FieldLegend>Payment Method</FieldLegend>
|
|
64
|
+
<FieldDescription>
|
|
65
|
+
All transactions are secure and encrypted
|
|
66
|
+
</FieldDescription>
|
|
67
|
+
<FieldGroup>
|
|
68
|
+
<Field>
|
|
69
|
+
<FieldLabel htmlFor="checkout-7j9-card-name-43j">
|
|
70
|
+
Name on Card
|
|
71
|
+
</FieldLabel>
|
|
72
|
+
<Input
|
|
73
|
+
id="checkout-7j9-card-name-43j"
|
|
74
|
+
placeholder="Evil Rabbit"
|
|
75
|
+
required
|
|
76
|
+
/>
|
|
77
|
+
</Field>
|
|
78
|
+
<Field>
|
|
79
|
+
<FieldLabel htmlFor="checkout-7j9-card-number-uw1">
|
|
80
|
+
Card Number
|
|
81
|
+
</FieldLabel>
|
|
82
|
+
<Input
|
|
83
|
+
id="checkout-7j9-card-number-uw1"
|
|
84
|
+
placeholder="1234 5678 9012 3456"
|
|
85
|
+
required
|
|
86
|
+
/>
|
|
87
|
+
<FieldDescription>
|
|
88
|
+
Enter your 16-digit card number
|
|
89
|
+
</FieldDescription>
|
|
90
|
+
</Field>
|
|
91
|
+
<div className="grid grid-cols-3 gap-4">
|
|
92
|
+
<Field>
|
|
93
|
+
<FieldLabel htmlFor="checkout-exp-month-ts6">
|
|
94
|
+
Month
|
|
95
|
+
</FieldLabel>
|
|
96
|
+
<Select items={months}>
|
|
97
|
+
<SelectTrigger id="checkout-exp-month-ts6">
|
|
98
|
+
<SelectValue />
|
|
99
|
+
</SelectTrigger>
|
|
100
|
+
<SelectContent>
|
|
101
|
+
<SelectGroup>
|
|
102
|
+
{months.map((item) => (
|
|
103
|
+
<SelectItem key={item.value} value={item.value}>
|
|
104
|
+
{item.label}
|
|
105
|
+
</SelectItem>
|
|
106
|
+
))}
|
|
107
|
+
</SelectGroup>
|
|
108
|
+
</SelectContent>
|
|
109
|
+
</Select>
|
|
110
|
+
</Field>
|
|
111
|
+
<Field>
|
|
112
|
+
<FieldLabel htmlFor="checkout-7j9-exp-year-f59">
|
|
113
|
+
Year
|
|
114
|
+
</FieldLabel>
|
|
115
|
+
<Select items={years}>
|
|
116
|
+
<SelectTrigger id="checkout-7j9-exp-year-f59">
|
|
117
|
+
<SelectValue />
|
|
118
|
+
</SelectTrigger>
|
|
119
|
+
<SelectContent>
|
|
120
|
+
<SelectGroup>
|
|
121
|
+
{years.map((item) => (
|
|
122
|
+
<SelectItem key={item.value} value={item.value}>
|
|
123
|
+
{item.label}
|
|
124
|
+
</SelectItem>
|
|
125
|
+
))}
|
|
126
|
+
</SelectGroup>
|
|
127
|
+
</SelectContent>
|
|
128
|
+
</Select>
|
|
129
|
+
</Field>
|
|
130
|
+
<Field>
|
|
131
|
+
<FieldLabel htmlFor="checkout-7j9-cvv">CVV</FieldLabel>
|
|
132
|
+
<Input id="checkout-7j9-cvv" placeholder="123" required />
|
|
133
|
+
</Field>
|
|
134
|
+
</div>
|
|
135
|
+
</FieldGroup>
|
|
136
|
+
</FieldSet>
|
|
137
|
+
<FieldSeparator />
|
|
138
|
+
<FieldSet>
|
|
139
|
+
<FieldLegend>Billing Address</FieldLegend>
|
|
140
|
+
<FieldDescription>
|
|
141
|
+
The billing address associated with your payment method
|
|
142
|
+
</FieldDescription>
|
|
143
|
+
<FieldGroup>
|
|
144
|
+
<Field orientation="horizontal">
|
|
145
|
+
<Checkbox
|
|
146
|
+
id="checkout-7j9-same-as-shipping-wgm"
|
|
147
|
+
defaultChecked
|
|
148
|
+
/>
|
|
149
|
+
<FieldLabel
|
|
150
|
+
htmlFor="checkout-7j9-same-as-shipping-wgm"
|
|
151
|
+
className="font-normal"
|
|
152
|
+
>
|
|
153
|
+
Same as shipping address
|
|
154
|
+
</FieldLabel>
|
|
155
|
+
</Field>
|
|
156
|
+
</FieldGroup>
|
|
157
|
+
</FieldSet>
|
|
158
|
+
<FieldSet>
|
|
159
|
+
<FieldGroup>
|
|
160
|
+
<Field>
|
|
161
|
+
<FieldLabel htmlFor="checkout-7j9-optional-comments">
|
|
162
|
+
Comments
|
|
163
|
+
</FieldLabel>
|
|
164
|
+
<Textarea
|
|
165
|
+
id="checkout-7j9-optional-comments"
|
|
166
|
+
placeholder="Add any additional comments"
|
|
167
|
+
className="resize-none"
|
|
168
|
+
/>
|
|
169
|
+
</Field>
|
|
170
|
+
</FieldGroup>
|
|
171
|
+
</FieldSet>
|
|
172
|
+
<Field orientation="horizontal">
|
|
173
|
+
<Button type="submit">Submit</Button>
|
|
174
|
+
<Button variant="outline" type="button">
|
|
175
|
+
Cancel
|
|
176
|
+
</Button>
|
|
177
|
+
</Field>
|
|
178
|
+
</FieldGroup>
|
|
179
|
+
</form>
|
|
180
|
+
</div>
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Installation
|
|
187
|
+
|
|
188
|
+
<CodeTabs>
|
|
189
|
+
|
|
190
|
+
<TabsList>
|
|
191
|
+
<TabsTrigger value="cli">Command</TabsTrigger>
|
|
192
|
+
<TabsTrigger value="manual">Manual</TabsTrigger>
|
|
193
|
+
</TabsList>
|
|
194
|
+
<TabsContent value="cli">
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
npx shadcn@latest add field
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
</TabsContent>
|
|
201
|
+
|
|
202
|
+
<TabsContent value="manual">
|
|
203
|
+
|
|
204
|
+
<Steps className="mb-0 pt-2">
|
|
205
|
+
|
|
206
|
+
<Step>Copy and paste the following code into your project.</Step>
|
|
207
|
+
|
|
208
|
+
<ComponentSource
|
|
209
|
+
name="field"
|
|
210
|
+
title="components/ui/field.tsx"
|
|
211
|
+
styleName="base-nova"
|
|
212
|
+
/>
|
|
213
|
+
|
|
214
|
+
<Step>Update the import paths to match your project setup.</Step>
|
|
215
|
+
|
|
216
|
+
</Steps>
|
|
217
|
+
|
|
218
|
+
</TabsContent>
|
|
219
|
+
|
|
220
|
+
</CodeTabs>
|
|
221
|
+
|
|
222
|
+
## Usage
|
|
223
|
+
|
|
224
|
+
```tsx showLineNumbers
|
|
225
|
+
import {
|
|
226
|
+
Field,
|
|
227
|
+
FieldContent,
|
|
228
|
+
FieldDescription,
|
|
229
|
+
FieldError,
|
|
230
|
+
FieldGroup,
|
|
231
|
+
FieldLabel,
|
|
232
|
+
FieldLegend,
|
|
233
|
+
FieldSeparator,
|
|
234
|
+
FieldSet,
|
|
235
|
+
FieldTitle,
|
|
236
|
+
} from "@/components/ui/field"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```tsx showLineNumbers
|
|
240
|
+
<FieldSet>
|
|
241
|
+
<FieldLegend>Profile</FieldLegend>
|
|
242
|
+
<FieldDescription>This appears on invoices and emails.</FieldDescription>
|
|
243
|
+
<FieldGroup>
|
|
244
|
+
<Field>
|
|
245
|
+
<FieldLabel htmlFor="name">Full name</FieldLabel>
|
|
246
|
+
<Input id="name" autoComplete="off" placeholder="Evil Rabbit" />
|
|
247
|
+
<FieldDescription>This appears on invoices and emails.</FieldDescription>
|
|
248
|
+
</Field>
|
|
249
|
+
<Field>
|
|
250
|
+
<FieldLabel htmlFor="username">Username</FieldLabel>
|
|
251
|
+
<Input id="username" autoComplete="off" aria-invalid />
|
|
252
|
+
<FieldError>Choose another username.</FieldError>
|
|
253
|
+
</Field>
|
|
254
|
+
<Field orientation="horizontal">
|
|
255
|
+
<Switch id="newsletter" />
|
|
256
|
+
<FieldLabel htmlFor="newsletter">Subscribe to the newsletter</FieldLabel>
|
|
257
|
+
</Field>
|
|
258
|
+
</FieldGroup>
|
|
259
|
+
</FieldSet>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Composition
|
|
263
|
+
|
|
264
|
+
### Field
|
|
265
|
+
|
|
266
|
+
A single control with label, helper text, and validation.
|
|
267
|
+
|
|
268
|
+
```text
|
|
269
|
+
Field
|
|
270
|
+
├── FieldLabel
|
|
271
|
+
├── Input / Textarea / Switch / Select
|
|
272
|
+
├── FieldDescription
|
|
273
|
+
└── FieldError
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### FieldGroup
|
|
277
|
+
|
|
278
|
+
Related fields in one group. Use `FieldSeparator` between sections when needed.
|
|
279
|
+
|
|
280
|
+
```text
|
|
281
|
+
FieldGroup
|
|
282
|
+
├── Field
|
|
283
|
+
│ ├── FieldLabel
|
|
284
|
+
│ ├── Input / Textarea / Switch / Select
|
|
285
|
+
│ ├── FieldDescription
|
|
286
|
+
│ └── FieldError
|
|
287
|
+
├── FieldSeparator
|
|
288
|
+
└── Field
|
|
289
|
+
├── FieldLabel
|
|
290
|
+
└── Input / Textarea / Switch / Select
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### FieldSet
|
|
294
|
+
|
|
295
|
+
Semantic grouping with a legend and description, usually containing a `FieldGroup`.
|
|
296
|
+
|
|
297
|
+
```text
|
|
298
|
+
FieldSet
|
|
299
|
+
├── FieldLegend
|
|
300
|
+
├── FieldDescription
|
|
301
|
+
└── FieldGroup
|
|
302
|
+
├── Field
|
|
303
|
+
│ ├── FieldLabel
|
|
304
|
+
│ ├── Input / Textarea / Switch / Select
|
|
305
|
+
│ ├── FieldDescription
|
|
306
|
+
│ └── FieldError
|
|
307
|
+
└── Field
|
|
308
|
+
├── FieldLabel
|
|
309
|
+
└── Input / Textarea / Switch / Select
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
## Anatomy
|
|
313
|
+
|
|
314
|
+
The `Field` family is designed for composing accessible forms. A typical field is structured as follows:
|
|
315
|
+
|
|
316
|
+
```tsx showLineNumbers
|
|
317
|
+
<Field>
|
|
318
|
+
<FieldLabel htmlFor="input-id">Label</FieldLabel>
|
|
319
|
+
{/* Input, Select, Switch, etc. */}
|
|
320
|
+
<FieldDescription>Optional helper text.</FieldDescription>
|
|
321
|
+
<FieldError>Validation message.</FieldError>
|
|
322
|
+
</Field>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
- `Field` is the core wrapper for a single field.
|
|
326
|
+
- `FieldContent` is a flex column that groups label and description. Not required if you have no description.
|
|
327
|
+
- Wrap related fields with `FieldGroup`, and use `FieldSet` with `FieldLegend` for semantic grouping.
|
|
328
|
+
|
|
329
|
+
## Form
|
|
330
|
+
|
|
331
|
+
See the [Form](/docs/forms) documentation for building forms with the `Field` component and [React Hook Form](/docs/forms/react-hook-form), [Tanstack Form](/docs/forms/tanstack-form), or [Formisch](/docs/forms/formisch).
|
|
332
|
+
|
|
333
|
+
## Input
|
|
334
|
+
|
|
335
|
+
```tsx
|
|
336
|
+
import {
|
|
337
|
+
Field,
|
|
338
|
+
FieldDescription,
|
|
339
|
+
FieldGroup,
|
|
340
|
+
FieldLabel,
|
|
341
|
+
FieldSet,
|
|
342
|
+
} from "@/components/ui/field"
|
|
343
|
+
import { Input } from "@/components/ui/input"
|
|
344
|
+
|
|
345
|
+
export function FieldInput() {
|
|
346
|
+
return (
|
|
347
|
+
<FieldSet className="w-full max-w-xs">
|
|
348
|
+
<FieldGroup>
|
|
349
|
+
<Field>
|
|
350
|
+
<FieldLabel htmlFor="username">Username</FieldLabel>
|
|
351
|
+
<Input id="username" type="text" placeholder="Max Leiter" />
|
|
352
|
+
<FieldDescription>
|
|
353
|
+
Choose a unique username for your account.
|
|
354
|
+
</FieldDescription>
|
|
355
|
+
</Field>
|
|
356
|
+
<Field>
|
|
357
|
+
<FieldLabel htmlFor="password">Password</FieldLabel>
|
|
358
|
+
<FieldDescription>
|
|
359
|
+
Must be at least 8 characters long.
|
|
360
|
+
</FieldDescription>
|
|
361
|
+
<Input id="password" type="password" placeholder="••••••••" />
|
|
362
|
+
</Field>
|
|
363
|
+
</FieldGroup>
|
|
364
|
+
</FieldSet>
|
|
365
|
+
)
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
## Textarea
|
|
371
|
+
|
|
372
|
+
```tsx
|
|
373
|
+
import {
|
|
374
|
+
Field,
|
|
375
|
+
FieldDescription,
|
|
376
|
+
FieldGroup,
|
|
377
|
+
FieldLabel,
|
|
378
|
+
FieldSet,
|
|
379
|
+
} from "@/components/ui/field"
|
|
380
|
+
import { Textarea } from "@/components/ui/textarea"
|
|
381
|
+
|
|
382
|
+
export function FieldTextarea() {
|
|
383
|
+
return (
|
|
384
|
+
<FieldSet className="w-full max-w-xs">
|
|
385
|
+
<FieldGroup>
|
|
386
|
+
<Field>
|
|
387
|
+
<FieldLabel htmlFor="feedback">Feedback</FieldLabel>
|
|
388
|
+
<Textarea
|
|
389
|
+
id="feedback"
|
|
390
|
+
placeholder="Your feedback helps us improve..."
|
|
391
|
+
rows={4}
|
|
392
|
+
/>
|
|
393
|
+
<FieldDescription>
|
|
394
|
+
Share your thoughts about our service.
|
|
395
|
+
</FieldDescription>
|
|
396
|
+
</Field>
|
|
397
|
+
</FieldGroup>
|
|
398
|
+
</FieldSet>
|
|
399
|
+
)
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
## Select
|
|
405
|
+
|
|
406
|
+
```tsx
|
|
407
|
+
import {
|
|
408
|
+
Field,
|
|
409
|
+
FieldDescription,
|
|
410
|
+
FieldLabel,
|
|
411
|
+
} from "@/components/ui/field"
|
|
412
|
+
import {
|
|
413
|
+
Select,
|
|
414
|
+
SelectContent,
|
|
415
|
+
SelectGroup,
|
|
416
|
+
SelectItem,
|
|
417
|
+
SelectTrigger,
|
|
418
|
+
SelectValue,
|
|
419
|
+
} from "@/components/ui/select"
|
|
420
|
+
|
|
421
|
+
const items = [
|
|
422
|
+
{ label: "Choose department", value: null },
|
|
423
|
+
{ label: "Engineering", value: "engineering" },
|
|
424
|
+
{ label: "Design", value: "design" },
|
|
425
|
+
{ label: "Marketing", value: "marketing" },
|
|
426
|
+
{ label: "Sales", value: "sales" },
|
|
427
|
+
{ label: "Customer Support", value: "support" },
|
|
428
|
+
{ label: "Human Resources", value: "hr" },
|
|
429
|
+
{ label: "Finance", value: "finance" },
|
|
430
|
+
{ label: "Operations", value: "operations" },
|
|
431
|
+
]
|
|
432
|
+
|
|
433
|
+
export function FieldSelect() {
|
|
434
|
+
return (
|
|
435
|
+
<Field className="w-full max-w-xs">
|
|
436
|
+
<FieldLabel>Department</FieldLabel>
|
|
437
|
+
<Select items={items}>
|
|
438
|
+
<SelectTrigger>
|
|
439
|
+
<SelectValue />
|
|
440
|
+
</SelectTrigger>
|
|
441
|
+
<SelectContent>
|
|
442
|
+
<SelectGroup>
|
|
443
|
+
{items.map((item) => (
|
|
444
|
+
<SelectItem key={item.value} value={item.value}>
|
|
445
|
+
{item.label}
|
|
446
|
+
</SelectItem>
|
|
447
|
+
))}
|
|
448
|
+
</SelectGroup>
|
|
449
|
+
</SelectContent>
|
|
450
|
+
</Select>
|
|
451
|
+
<FieldDescription>
|
|
452
|
+
Select your department or area of work.
|
|
453
|
+
</FieldDescription>
|
|
454
|
+
</Field>
|
|
455
|
+
)
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
## Slider
|
|
461
|
+
|
|
462
|
+
```tsx
|
|
463
|
+
"use client"
|
|
464
|
+
|
|
465
|
+
import * as React from "react"
|
|
466
|
+
|
|
467
|
+
import {
|
|
468
|
+
Field,
|
|
469
|
+
FieldDescription,
|
|
470
|
+
FieldTitle,
|
|
471
|
+
} from "@/components/ui/field"
|
|
472
|
+
import { Slider } from "@/components/ui/slider"
|
|
473
|
+
|
|
474
|
+
export function FieldSlider() {
|
|
475
|
+
const [value, setValue] = React.useState([200, 800])
|
|
476
|
+
|
|
477
|
+
return (
|
|
478
|
+
<Field className="w-full max-w-xs">
|
|
479
|
+
<FieldTitle>Price Range</FieldTitle>
|
|
480
|
+
<FieldDescription>
|
|
481
|
+
Set your budget range ($
|
|
482
|
+
<span className="font-medium tabular-nums">{value[0]}</span> -{" "}
|
|
483
|
+
<span className="font-medium tabular-nums">{value[1]}</span>).
|
|
484
|
+
</FieldDescription>
|
|
485
|
+
<Slider
|
|
486
|
+
value={value}
|
|
487
|
+
onValueChange={(value) => setValue(value as [number, number])}
|
|
488
|
+
max={1000}
|
|
489
|
+
min={0}
|
|
490
|
+
step={10}
|
|
491
|
+
className="mt-2 w-full"
|
|
492
|
+
aria-label="Price Range"
|
|
493
|
+
/>
|
|
494
|
+
</Field>
|
|
495
|
+
)
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
## Fieldset
|
|
501
|
+
|
|
502
|
+
```tsx
|
|
503
|
+
import {
|
|
504
|
+
Field,
|
|
505
|
+
FieldDescription,
|
|
506
|
+
FieldGroup,
|
|
507
|
+
FieldLabel,
|
|
508
|
+
FieldLegend,
|
|
509
|
+
FieldSet,
|
|
510
|
+
} from "@/components/ui/field"
|
|
511
|
+
import { Input } from "@/components/ui/input"
|
|
512
|
+
|
|
513
|
+
export function FieldFieldset() {
|
|
514
|
+
return (
|
|
515
|
+
<FieldSet className="w-full max-w-sm">
|
|
516
|
+
<FieldLegend>Address Information</FieldLegend>
|
|
517
|
+
<FieldDescription>
|
|
518
|
+
We need your address to deliver your order.
|
|
519
|
+
</FieldDescription>
|
|
520
|
+
<FieldGroup>
|
|
521
|
+
<Field>
|
|
522
|
+
<FieldLabel htmlFor="street">Street Address</FieldLabel>
|
|
523
|
+
<Input id="street" type="text" placeholder="123 Main St" />
|
|
524
|
+
</Field>
|
|
525
|
+
<div className="grid grid-cols-2 gap-4">
|
|
526
|
+
<Field>
|
|
527
|
+
<FieldLabel htmlFor="city">City</FieldLabel>
|
|
528
|
+
<Input id="city" type="text" placeholder="New York" />
|
|
529
|
+
</Field>
|
|
530
|
+
<Field>
|
|
531
|
+
<FieldLabel htmlFor="zip">Postal Code</FieldLabel>
|
|
532
|
+
<Input id="zip" type="text" placeholder="90502" />
|
|
533
|
+
</Field>
|
|
534
|
+
</div>
|
|
535
|
+
</FieldGroup>
|
|
536
|
+
</FieldSet>
|
|
537
|
+
)
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
## Checkbox
|
|
543
|
+
|
|
544
|
+
```tsx
|
|
545
|
+
import { Checkbox } from "@/components/ui/checkbox"
|
|
546
|
+
import {
|
|
547
|
+
Field,
|
|
548
|
+
FieldContent,
|
|
549
|
+
FieldDescription,
|
|
550
|
+
FieldGroup,
|
|
551
|
+
FieldLabel,
|
|
552
|
+
FieldLegend,
|
|
553
|
+
FieldSeparator,
|
|
554
|
+
FieldSet,
|
|
555
|
+
} from "@/components/ui/field"
|
|
556
|
+
|
|
557
|
+
export function FieldCheckbox() {
|
|
558
|
+
return (
|
|
559
|
+
<FieldGroup className="w-full max-w-xs">
|
|
560
|
+
<FieldSet>
|
|
561
|
+
<FieldLegend variant="label">
|
|
562
|
+
Show these items on the desktop
|
|
563
|
+
</FieldLegend>
|
|
564
|
+
<FieldDescription>
|
|
565
|
+
Select the items you want to show on the desktop.
|
|
566
|
+
</FieldDescription>
|
|
567
|
+
<FieldGroup className="gap-3">
|
|
568
|
+
<Field orientation="horizontal">
|
|
569
|
+
<Checkbox id="finder-pref-9k2-hard-disks-ljj" />
|
|
570
|
+
<FieldLabel
|
|
571
|
+
htmlFor="finder-pref-9k2-hard-disks-ljj"
|
|
572
|
+
className="font-normal"
|
|
573
|
+
defaultChecked
|
|
574
|
+
>
|
|
575
|
+
Hard disks
|
|
576
|
+
</FieldLabel>
|
|
577
|
+
</Field>
|
|
578
|
+
<Field orientation="horizontal">
|
|
579
|
+
<Checkbox id="finder-pref-9k2-external-disks-1yg" />
|
|
580
|
+
<FieldLabel
|
|
581
|
+
htmlFor="finder-pref-9k2-external-disks-1yg"
|
|
582
|
+
className="font-normal"
|
|
583
|
+
>
|
|
584
|
+
External disks
|
|
585
|
+
</FieldLabel>
|
|
586
|
+
</Field>
|
|
587
|
+
<Field orientation="horizontal">
|
|
588
|
+
<Checkbox id="finder-pref-9k2-cds-dvds-fzt" />
|
|
589
|
+
<FieldLabel
|
|
590
|
+
htmlFor="finder-pref-9k2-cds-dvds-fzt"
|
|
591
|
+
className="font-normal"
|
|
592
|
+
>
|
|
593
|
+
CDs, DVDs, and iPods
|
|
594
|
+
</FieldLabel>
|
|
595
|
+
</Field>
|
|
596
|
+
<Field orientation="horizontal">
|
|
597
|
+
<Checkbox id="finder-pref-9k2-connected-servers-6l2" />
|
|
598
|
+
<FieldLabel
|
|
599
|
+
htmlFor="finder-pref-9k2-connected-servers-6l2"
|
|
600
|
+
className="font-normal"
|
|
601
|
+
>
|
|
602
|
+
Connected servers
|
|
603
|
+
</FieldLabel>
|
|
604
|
+
</Field>
|
|
605
|
+
</FieldGroup>
|
|
606
|
+
</FieldSet>
|
|
607
|
+
<FieldSeparator />
|
|
608
|
+
<Field orientation="horizontal">
|
|
609
|
+
<Checkbox id="finder-pref-9k2-sync-folders-nep" defaultChecked />
|
|
610
|
+
<FieldContent>
|
|
611
|
+
<FieldLabel htmlFor="finder-pref-9k2-sync-folders-nep">
|
|
612
|
+
Sync Desktop & Documents folders
|
|
613
|
+
</FieldLabel>
|
|
614
|
+
<FieldDescription>
|
|
615
|
+
Your Desktop & Documents folders are being synced with iCloud Drive.
|
|
616
|
+
You can access them from other devices.
|
|
617
|
+
</FieldDescription>
|
|
618
|
+
</FieldContent>
|
|
619
|
+
</Field>
|
|
620
|
+
</FieldGroup>
|
|
621
|
+
)
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
## Radio
|
|
627
|
+
|
|
628
|
+
```tsx
|
|
629
|
+
import {
|
|
630
|
+
Field,
|
|
631
|
+
FieldDescription,
|
|
632
|
+
FieldLabel,
|
|
633
|
+
FieldLegend,
|
|
634
|
+
FieldSet,
|
|
635
|
+
} from "@/components/ui/field"
|
|
636
|
+
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
|
|
637
|
+
|
|
638
|
+
export function FieldRadio() {
|
|
639
|
+
return (
|
|
640
|
+
<FieldSet className="w-full max-w-xs">
|
|
641
|
+
<FieldLegend variant="label">Subscription Plan</FieldLegend>
|
|
642
|
+
<FieldDescription>
|
|
643
|
+
Yearly and lifetime plans offer significant savings.
|
|
644
|
+
</FieldDescription>
|
|
645
|
+
<RadioGroup defaultValue="monthly">
|
|
646
|
+
<Field orientation="horizontal">
|
|
647
|
+
<RadioGroupItem value="monthly" id="plan-monthly" />
|
|
648
|
+
<FieldLabel htmlFor="plan-monthly" className="font-normal">
|
|
649
|
+
Monthly ($9.99/month)
|
|
650
|
+
</FieldLabel>
|
|
651
|
+
</Field>
|
|
652
|
+
<Field orientation="horizontal">
|
|
653
|
+
<RadioGroupItem value="yearly" id="plan-yearly" />
|
|
654
|
+
<FieldLabel htmlFor="plan-yearly" className="font-normal">
|
|
655
|
+
Yearly ($99.99/year)
|
|
656
|
+
</FieldLabel>
|
|
657
|
+
</Field>
|
|
658
|
+
<Field orientation="horizontal">
|
|
659
|
+
<RadioGroupItem value="lifetime" id="plan-lifetime" />
|
|
660
|
+
<FieldLabel htmlFor="plan-lifetime" className="font-normal">
|
|
661
|
+
Lifetime ($299.99)
|
|
662
|
+
</FieldLabel>
|
|
663
|
+
</Field>
|
|
664
|
+
</RadioGroup>
|
|
665
|
+
</FieldSet>
|
|
666
|
+
)
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
## Switch
|
|
672
|
+
|
|
673
|
+
```tsx
|
|
674
|
+
import { Field, FieldLabel } from "@/components/ui/field"
|
|
675
|
+
import { Switch } from "@/components/ui/switch"
|
|
676
|
+
|
|
677
|
+
export function FieldSwitch() {
|
|
678
|
+
return (
|
|
679
|
+
<Field orientation="horizontal" className="w-fit">
|
|
680
|
+
<FieldLabel htmlFor="2fa">Multi-factor authentication</FieldLabel>
|
|
681
|
+
<Switch id="2fa" />
|
|
682
|
+
</Field>
|
|
683
|
+
)
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
## Choice Card
|
|
689
|
+
|
|
690
|
+
Wrap `Field` components inside `FieldLabel` to create selectable field groups. This works with `RadioItem`, `Checkbox` and `Switch` components.
|
|
691
|
+
|
|
692
|
+
```tsx
|
|
693
|
+
import {
|
|
694
|
+
Field,
|
|
695
|
+
FieldContent,
|
|
696
|
+
FieldDescription,
|
|
697
|
+
FieldGroup,
|
|
698
|
+
FieldLabel,
|
|
699
|
+
FieldLegend,
|
|
700
|
+
FieldSet,
|
|
701
|
+
FieldTitle,
|
|
702
|
+
} from "@/components/ui/field"
|
|
703
|
+
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
|
|
704
|
+
|
|
705
|
+
export function FieldChoiceCard() {
|
|
706
|
+
return (
|
|
707
|
+
<FieldGroup className="w-full max-w-xs">
|
|
708
|
+
<FieldSet>
|
|
709
|
+
<FieldLegend variant="label">Compute Environment</FieldLegend>
|
|
710
|
+
<FieldDescription>
|
|
711
|
+
Select the compute environment for your cluster.
|
|
712
|
+
</FieldDescription>
|
|
713
|
+
<RadioGroup defaultValue="kubernetes">
|
|
714
|
+
<FieldLabel htmlFor="kubernetes-r2h">
|
|
715
|
+
<Field orientation="horizontal">
|
|
716
|
+
<FieldContent>
|
|
717
|
+
<FieldTitle>Kubernetes</FieldTitle>
|
|
718
|
+
<FieldDescription>
|
|
719
|
+
Run GPU workloads on a K8s cluster.
|
|
720
|
+
</FieldDescription>
|
|
721
|
+
</FieldContent>
|
|
722
|
+
<RadioGroupItem value="kubernetes" id="kubernetes-r2h" />
|
|
723
|
+
</Field>
|
|
724
|
+
</FieldLabel>
|
|
725
|
+
<FieldLabel htmlFor="vm-z4k">
|
|
726
|
+
<Field orientation="horizontal">
|
|
727
|
+
<FieldContent>
|
|
728
|
+
<FieldTitle>Virtual Machine</FieldTitle>
|
|
729
|
+
<FieldDescription>
|
|
730
|
+
Access a cluster to run GPU workloads.
|
|
731
|
+
</FieldDescription>
|
|
732
|
+
</FieldContent>
|
|
733
|
+
<RadioGroupItem value="vm" id="vm-z4k" />
|
|
734
|
+
</Field>
|
|
735
|
+
</FieldLabel>
|
|
736
|
+
</RadioGroup>
|
|
737
|
+
</FieldSet>
|
|
738
|
+
</FieldGroup>
|
|
739
|
+
)
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
## Field Group
|
|
745
|
+
|
|
746
|
+
Stack `Field` components with `FieldGroup`. Add `FieldSeparator` to divide them.
|
|
747
|
+
|
|
748
|
+
```tsx
|
|
749
|
+
import { Checkbox } from "@/components/ui/checkbox"
|
|
750
|
+
import {
|
|
751
|
+
Field,
|
|
752
|
+
FieldDescription,
|
|
753
|
+
FieldGroup,
|
|
754
|
+
FieldLabel,
|
|
755
|
+
FieldSeparator,
|
|
756
|
+
FieldSet,
|
|
757
|
+
} from "@/components/ui/field"
|
|
758
|
+
|
|
759
|
+
export function FieldGroupExample() {
|
|
760
|
+
return (
|
|
761
|
+
<FieldGroup className="w-full max-w-xs">
|
|
762
|
+
<FieldSet>
|
|
763
|
+
<FieldLabel>Responses</FieldLabel>
|
|
764
|
+
<FieldDescription>
|
|
765
|
+
Get notified when ChatGPT responds to requests that take time, like
|
|
766
|
+
research or image generation.
|
|
767
|
+
</FieldDescription>
|
|
768
|
+
<FieldGroup data-slot="checkbox-group">
|
|
769
|
+
<Field orientation="horizontal">
|
|
770
|
+
<Checkbox id="push" defaultChecked disabled />
|
|
771
|
+
<FieldLabel htmlFor="push" className="font-normal">
|
|
772
|
+
Push notifications
|
|
773
|
+
</FieldLabel>
|
|
774
|
+
</Field>
|
|
775
|
+
</FieldGroup>
|
|
776
|
+
</FieldSet>
|
|
777
|
+
<FieldSeparator />
|
|
778
|
+
<FieldSet>
|
|
779
|
+
<FieldLabel>Tasks</FieldLabel>
|
|
780
|
+
<FieldDescription>
|
|
781
|
+
Get notified when tasks you've created have updates.{" "}
|
|
782
|
+
<a href="#">Manage tasks</a>
|
|
783
|
+
</FieldDescription>
|
|
784
|
+
<FieldGroup data-slot="checkbox-group">
|
|
785
|
+
<Field orientation="horizontal">
|
|
786
|
+
<Checkbox id="push-tasks" />
|
|
787
|
+
<FieldLabel htmlFor="push-tasks" className="font-normal">
|
|
788
|
+
Push notifications
|
|
789
|
+
</FieldLabel>
|
|
790
|
+
</Field>
|
|
791
|
+
<Field orientation="horizontal">
|
|
792
|
+
<Checkbox id="email-tasks" />
|
|
793
|
+
<FieldLabel htmlFor="email-tasks" className="font-normal">
|
|
794
|
+
Email notifications
|
|
795
|
+
</FieldLabel>
|
|
796
|
+
</Field>
|
|
797
|
+
</FieldGroup>
|
|
798
|
+
</FieldSet>
|
|
799
|
+
</FieldGroup>
|
|
800
|
+
)
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
## RTL
|
|
806
|
+
|
|
807
|
+
To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl).
|
|
808
|
+
|
|
809
|
+
```tsx
|
|
810
|
+
"use client"
|
|
811
|
+
|
|
812
|
+
import * as React from "react"
|
|
813
|
+
|
|
814
|
+
import {
|
|
815
|
+
useTranslation,
|
|
816
|
+
type Translations,
|
|
817
|
+
} from "@/components/language-selector"
|
|
818
|
+
import { Button } from "@/components/ui/button"
|
|
819
|
+
import { Checkbox } from "@/components/ui/checkbox"
|
|
820
|
+
import {
|
|
821
|
+
Field,
|
|
822
|
+
FieldDescription,
|
|
823
|
+
FieldGroup,
|
|
824
|
+
FieldLabel,
|
|
825
|
+
FieldLegend,
|
|
826
|
+
FieldSeparator,
|
|
827
|
+
FieldSet,
|
|
828
|
+
} from "@/components/ui/field"
|
|
829
|
+
import { Input } from "@/components/ui/input"
|
|
830
|
+
import {
|
|
831
|
+
Select,
|
|
832
|
+
SelectContent,
|
|
833
|
+
SelectGroup,
|
|
834
|
+
SelectItem,
|
|
835
|
+
SelectTrigger,
|
|
836
|
+
SelectValue,
|
|
837
|
+
} from "@/components/ui/select"
|
|
838
|
+
import { Textarea } from "@/components/ui/textarea"
|
|
839
|
+
|
|
840
|
+
const months = [
|
|
841
|
+
{ label: "MM", value: null },
|
|
842
|
+
{ label: "01", value: "01" },
|
|
843
|
+
{ label: "02", value: "02" },
|
|
844
|
+
{ label: "03", value: "03" },
|
|
845
|
+
{ label: "04", value: "04" },
|
|
846
|
+
{ label: "05", value: "05" },
|
|
847
|
+
{ label: "06", value: "06" },
|
|
848
|
+
{ label: "07", value: "07" },
|
|
849
|
+
{ label: "08", value: "08" },
|
|
850
|
+
{ label: "09", value: "09" },
|
|
851
|
+
{ label: "10", value: "10" },
|
|
852
|
+
{ label: "11", value: "11" },
|
|
853
|
+
{ label: "12", value: "12" },
|
|
854
|
+
]
|
|
855
|
+
|
|
856
|
+
const years = [
|
|
857
|
+
{ label: "YYYY", value: null },
|
|
858
|
+
{ label: "2024", value: "2024" },
|
|
859
|
+
{ label: "2025", value: "2025" },
|
|
860
|
+
{ label: "2026", value: "2026" },
|
|
861
|
+
{ label: "2027", value: "2027" },
|
|
862
|
+
{ label: "2028", value: "2028" },
|
|
863
|
+
{ label: "2029", value: "2029" },
|
|
864
|
+
]
|
|
865
|
+
|
|
866
|
+
const translations: Translations = {
|
|
867
|
+
en: {
|
|
868
|
+
dir: "ltr",
|
|
869
|
+
values: {
|
|
870
|
+
paymentMethod: "Payment Method",
|
|
871
|
+
secureTransactions: "All transactions are secure and encrypted",
|
|
872
|
+
nameOnCard: "Name on Card",
|
|
873
|
+
cardNumber: "Card Number",
|
|
874
|
+
cardNumberDescription: "Enter your 16-digit card number",
|
|
875
|
+
month: "Month",
|
|
876
|
+
year: "Year",
|
|
877
|
+
cvv: "CVV",
|
|
878
|
+
monthPlaceholder: "MM",
|
|
879
|
+
month01: "01",
|
|
880
|
+
month02: "02",
|
|
881
|
+
month03: "03",
|
|
882
|
+
month04: "04",
|
|
883
|
+
month05: "05",
|
|
884
|
+
month06: "06",
|
|
885
|
+
month07: "07",
|
|
886
|
+
month08: "08",
|
|
887
|
+
month09: "09",
|
|
888
|
+
month10: "10",
|
|
889
|
+
month11: "11",
|
|
890
|
+
month12: "12",
|
|
891
|
+
billingAddress: "Billing Address",
|
|
892
|
+
billingAddressDescription:
|
|
893
|
+
"The billing address associated with your payment method",
|
|
894
|
+
sameAsShipping: "Same as shipping address",
|
|
895
|
+
comments: "Comments",
|
|
896
|
+
commentsPlaceholder: "Add any additional comments",
|
|
897
|
+
submit: "Submit",
|
|
898
|
+
cancel: "Cancel",
|
|
899
|
+
},
|
|
900
|
+
},
|
|
901
|
+
ar: {
|
|
902
|
+
dir: "rtl",
|
|
903
|
+
values: {
|
|
904
|
+
paymentMethod: "طريقة الدفع",
|
|
905
|
+
secureTransactions: "جميع المعاملات آمنة ومشفرة",
|
|
906
|
+
nameOnCard: "الاسم على البطاقة",
|
|
907
|
+
cardNumber: "رقم البطاقة",
|
|
908
|
+
cardNumberDescription: "أدخل رقم البطاقة المكون من 16 رقمًا",
|
|
909
|
+
month: "الشهر",
|
|
910
|
+
year: "السنة",
|
|
911
|
+
cvv: "CVV",
|
|
912
|
+
monthPlaceholder: "ش.ش",
|
|
913
|
+
month01: "٠١",
|
|
914
|
+
month02: "٠٢",
|
|
915
|
+
month03: "٠٣",
|
|
916
|
+
month04: "٠٤",
|
|
917
|
+
month05: "٠٥",
|
|
918
|
+
month06: "٠٦",
|
|
919
|
+
month07: "٠٧",
|
|
920
|
+
month08: "٠٨",
|
|
921
|
+
month09: "٠٩",
|
|
922
|
+
month10: "١٠",
|
|
923
|
+
month11: "١١",
|
|
924
|
+
month12: "١٢",
|
|
925
|
+
billingAddress: "عنوان الفوترة",
|
|
926
|
+
billingAddressDescription: "عنوان الفوترة المرتبط بطريقة الدفع الخاصة بك",
|
|
927
|
+
sameAsShipping: "نفس عنوان الشحن",
|
|
928
|
+
comments: "تعليقات",
|
|
929
|
+
commentsPlaceholder: "أضف أي تعليقات إضافية",
|
|
930
|
+
submit: "إرسال",
|
|
931
|
+
cancel: "إلغاء",
|
|
932
|
+
},
|
|
933
|
+
},
|
|
934
|
+
he: {
|
|
935
|
+
dir: "rtl",
|
|
936
|
+
values: {
|
|
937
|
+
paymentMethod: "אמצעי תשלום",
|
|
938
|
+
secureTransactions: "כל העסקאות מאובטחות ומוצפנות",
|
|
939
|
+
nameOnCard: "שם על הכרטיס",
|
|
940
|
+
cardNumber: "מספר כרטיס",
|
|
941
|
+
cardNumberDescription: "הזן את מספר הכרטיס בן 16 הספרות שלך",
|
|
942
|
+
month: "חודש",
|
|
943
|
+
year: "שנה",
|
|
944
|
+
cvv: "CVV",
|
|
945
|
+
monthPlaceholder: "MM",
|
|
946
|
+
month01: "01",
|
|
947
|
+
month02: "02",
|
|
948
|
+
month03: "03",
|
|
949
|
+
month04: "04",
|
|
950
|
+
month05: "05",
|
|
951
|
+
month06: "06",
|
|
952
|
+
month07: "07",
|
|
953
|
+
month08: "08",
|
|
954
|
+
month09: "09",
|
|
955
|
+
month10: "10",
|
|
956
|
+
month11: "11",
|
|
957
|
+
month12: "12",
|
|
958
|
+
billingAddress: "כתובת חיוב",
|
|
959
|
+
billingAddressDescription: "כתובת החיוב המשויכת לאמצעי התשלום שלך",
|
|
960
|
+
sameAsShipping: "זהה לכתובת המשלוח",
|
|
961
|
+
comments: "הערות",
|
|
962
|
+
commentsPlaceholder: "הוסף הערות נוספות",
|
|
963
|
+
submit: "שלח",
|
|
964
|
+
cancel: "בטל",
|
|
965
|
+
},
|
|
966
|
+
},
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export function FieldRtl() {
|
|
970
|
+
const { dir, t } = useTranslation(translations, "ar")
|
|
971
|
+
|
|
972
|
+
const getMonthLabel = (value: string | null): string => {
|
|
973
|
+
if (value === null) return t.monthPlaceholder
|
|
974
|
+
const monthKey = `month${value}` as keyof typeof t
|
|
975
|
+
return t[monthKey] || value
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
return (
|
|
979
|
+
<div className="w-full max-w-md py-6" dir={dir}>
|
|
980
|
+
<form>
|
|
981
|
+
<FieldGroup>
|
|
982
|
+
<FieldSet>
|
|
983
|
+
<FieldLegend>{t.paymentMethod}</FieldLegend>
|
|
984
|
+
<FieldDescription>{t.secureTransactions}</FieldDescription>
|
|
985
|
+
<FieldGroup>
|
|
986
|
+
<Field>
|
|
987
|
+
<FieldLabel htmlFor="checkout-7j9-card-name-43j-rtl">
|
|
988
|
+
{t.nameOnCard}
|
|
989
|
+
</FieldLabel>
|
|
990
|
+
<Input
|
|
991
|
+
id="checkout-7j9-card-name-43j-rtl"
|
|
992
|
+
placeholder="Evil Rabbit"
|
|
993
|
+
required
|
|
994
|
+
/>
|
|
995
|
+
</Field>
|
|
996
|
+
<Field>
|
|
997
|
+
<FieldLabel htmlFor="checkout-7j9-card-number-uw1-rtl">
|
|
998
|
+
{t.cardNumber}
|
|
999
|
+
</FieldLabel>
|
|
1000
|
+
<Input
|
|
1001
|
+
id="checkout-7j9-card-number-uw1-rtl"
|
|
1002
|
+
placeholder="1234 5678 9012 3456"
|
|
1003
|
+
required
|
|
1004
|
+
/>
|
|
1005
|
+
<FieldDescription>{t.cardNumberDescription}</FieldDescription>
|
|
1006
|
+
</Field>
|
|
1007
|
+
<div className="grid grid-cols-3 gap-4">
|
|
1008
|
+
<Field>
|
|
1009
|
+
<FieldLabel htmlFor="checkout-exp-month-ts6-rtl">
|
|
1010
|
+
{t.month}
|
|
1011
|
+
</FieldLabel>
|
|
1012
|
+
<Select items={months}>
|
|
1013
|
+
<SelectTrigger id="checkout-exp-month-ts6-rtl">
|
|
1014
|
+
<SelectValue />
|
|
1015
|
+
</SelectTrigger>
|
|
1016
|
+
<SelectContent dir={dir}>
|
|
1017
|
+
<SelectGroup>
|
|
1018
|
+
{months.map((item) => (
|
|
1019
|
+
<SelectItem key={item.value} value={item.value}>
|
|
1020
|
+
{getMonthLabel(item.value)}
|
|
1021
|
+
</SelectItem>
|
|
1022
|
+
))}
|
|
1023
|
+
</SelectGroup>
|
|
1024
|
+
</SelectContent>
|
|
1025
|
+
</Select>
|
|
1026
|
+
</Field>
|
|
1027
|
+
<Field>
|
|
1028
|
+
<FieldLabel htmlFor="checkout-7j9-exp-year-f59-rtl">
|
|
1029
|
+
{t.year}
|
|
1030
|
+
</FieldLabel>
|
|
1031
|
+
<Select items={years}>
|
|
1032
|
+
<SelectTrigger id="checkout-7j9-exp-year-f59-rtl">
|
|
1033
|
+
<SelectValue />
|
|
1034
|
+
</SelectTrigger>
|
|
1035
|
+
<SelectContent dir={dir}>
|
|
1036
|
+
<SelectGroup>
|
|
1037
|
+
{years.map((item) => (
|
|
1038
|
+
<SelectItem key={item.value} value={item.value}>
|
|
1039
|
+
{item.label}
|
|
1040
|
+
</SelectItem>
|
|
1041
|
+
))}
|
|
1042
|
+
</SelectGroup>
|
|
1043
|
+
</SelectContent>
|
|
1044
|
+
</Select>
|
|
1045
|
+
</Field>
|
|
1046
|
+
<Field>
|
|
1047
|
+
<FieldLabel htmlFor="checkout-7j9-cvv-rtl">
|
|
1048
|
+
{t.cvv}
|
|
1049
|
+
</FieldLabel>
|
|
1050
|
+
<Input id="checkout-7j9-cvv-rtl" placeholder="123" required />
|
|
1051
|
+
</Field>
|
|
1052
|
+
</div>
|
|
1053
|
+
</FieldGroup>
|
|
1054
|
+
</FieldSet>
|
|
1055
|
+
<FieldSeparator />
|
|
1056
|
+
<FieldSet>
|
|
1057
|
+
<FieldLegend>{t.billingAddress}</FieldLegend>
|
|
1058
|
+
<FieldDescription>{t.billingAddressDescription}</FieldDescription>
|
|
1059
|
+
<FieldGroup>
|
|
1060
|
+
<Field orientation="horizontal">
|
|
1061
|
+
<Checkbox
|
|
1062
|
+
id="checkout-7j9-same-as-shipping-wgm-rtl"
|
|
1063
|
+
defaultChecked
|
|
1064
|
+
/>
|
|
1065
|
+
<FieldLabel
|
|
1066
|
+
htmlFor="checkout-7j9-same-as-shipping-wgm-rtl"
|
|
1067
|
+
className="font-normal"
|
|
1068
|
+
>
|
|
1069
|
+
{t.sameAsShipping}
|
|
1070
|
+
</FieldLabel>
|
|
1071
|
+
</Field>
|
|
1072
|
+
</FieldGroup>
|
|
1073
|
+
</FieldSet>
|
|
1074
|
+
<FieldSet>
|
|
1075
|
+
<FieldGroup>
|
|
1076
|
+
<Field>
|
|
1077
|
+
<FieldLabel htmlFor="checkout-7j9-optional-comments-rtl">
|
|
1078
|
+
{t.comments}
|
|
1079
|
+
</FieldLabel>
|
|
1080
|
+
<Textarea
|
|
1081
|
+
id="checkout-7j9-optional-comments-rtl"
|
|
1082
|
+
placeholder={t.commentsPlaceholder}
|
|
1083
|
+
className="resize-none"
|
|
1084
|
+
/>
|
|
1085
|
+
</Field>
|
|
1086
|
+
</FieldGroup>
|
|
1087
|
+
</FieldSet>
|
|
1088
|
+
<Field orientation="horizontal">
|
|
1089
|
+
<Button type="submit">{t.submit}</Button>
|
|
1090
|
+
<Button variant="outline" type="button">
|
|
1091
|
+
{t.cancel}
|
|
1092
|
+
</Button>
|
|
1093
|
+
</Field>
|
|
1094
|
+
</FieldGroup>
|
|
1095
|
+
</form>
|
|
1096
|
+
</div>
|
|
1097
|
+
)
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
## Responsive Layout
|
|
1103
|
+
|
|
1104
|
+
- **Vertical fields:** Default orientation stacks label, control, and helper text—ideal for mobile-first layouts.
|
|
1105
|
+
- **Horizontal fields:** Set `orientation="horizontal"` on `Field` to align the label and control side-by-side. Pair with `FieldContent` to keep descriptions aligned.
|
|
1106
|
+
- **Responsive fields:** Set `orientation="responsive"` for automatic column layouts inside container-aware parents. Apply `@container/field-group` classes on `FieldGroup` to switch orientations at specific breakpoints.
|
|
1107
|
+
|
|
1108
|
+
```tsx
|
|
1109
|
+
import { Button } from "@/components/ui/button"
|
|
1110
|
+
import {
|
|
1111
|
+
Field,
|
|
1112
|
+
FieldContent,
|
|
1113
|
+
FieldDescription,
|
|
1114
|
+
FieldGroup,
|
|
1115
|
+
FieldLabel,
|
|
1116
|
+
FieldLegend,
|
|
1117
|
+
FieldSet,
|
|
1118
|
+
} from "@/components/ui/field"
|
|
1119
|
+
import { Input } from "@/components/ui/input"
|
|
1120
|
+
|
|
1121
|
+
export function FieldResponsive() {
|
|
1122
|
+
return (
|
|
1123
|
+
<div className="w-full max-w-lg">
|
|
1124
|
+
<form>
|
|
1125
|
+
<FieldSet>
|
|
1126
|
+
<FieldLegend>Profile</FieldLegend>
|
|
1127
|
+
<FieldDescription>Fill in your profile information.</FieldDescription>
|
|
1128
|
+
<FieldGroup>
|
|
1129
|
+
<Field orientation="responsive">
|
|
1130
|
+
<FieldContent>
|
|
1131
|
+
<FieldLabel htmlFor="name">Name</FieldLabel>
|
|
1132
|
+
<FieldDescription>
|
|
1133
|
+
Provide your full name for identification
|
|
1134
|
+
</FieldDescription>
|
|
1135
|
+
</FieldContent>
|
|
1136
|
+
<Input id="name" placeholder="Evil Rabbit" required />
|
|
1137
|
+
</Field>
|
|
1138
|
+
<Field orientation="responsive">
|
|
1139
|
+
<Button type="submit">Submit</Button>
|
|
1140
|
+
<Button type="button" variant="outline">
|
|
1141
|
+
Cancel
|
|
1142
|
+
</Button>
|
|
1143
|
+
</Field>
|
|
1144
|
+
</FieldGroup>
|
|
1145
|
+
</FieldSet>
|
|
1146
|
+
</form>
|
|
1147
|
+
</div>
|
|
1148
|
+
)
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
```
|
|
1152
|
+
|
|
1153
|
+
## Validation and Errors
|
|
1154
|
+
|
|
1155
|
+
- Add `data-invalid` to `Field` to switch the entire block into an error state.
|
|
1156
|
+
- Add `aria-invalid` on the input itself for assistive technologies.
|
|
1157
|
+
- Render `FieldError` immediately after the control or inside `FieldContent` to keep error messages aligned with the field.
|
|
1158
|
+
|
|
1159
|
+
```tsx showLineNumbers /data-invalid/ /aria-invalid/
|
|
1160
|
+
<Field data-invalid>
|
|
1161
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
1162
|
+
<Input id="email" type="email" aria-invalid />
|
|
1163
|
+
<FieldError>Enter a valid email address.</FieldError>
|
|
1164
|
+
</Field>
|
|
1165
|
+
```
|
|
1166
|
+
|
|
1167
|
+
## Accessibility
|
|
1168
|
+
|
|
1169
|
+
- `FieldSet` and `FieldLegend` keep related controls grouped for keyboard and assistive tech users.
|
|
1170
|
+
- `Field` outputs `role="group"` so nested controls inherit labeling from `FieldLabel` and `FieldLegend` when combined.
|
|
1171
|
+
- Apply `FieldSeparator` sparingly to ensure screen readers encounter clear section boundaries.
|
|
1172
|
+
|
|
1173
|
+
## API Reference
|
|
1174
|
+
|
|
1175
|
+
### FieldSet
|
|
1176
|
+
|
|
1177
|
+
Container that renders a semantic `fieldset` with spacing presets.
|
|
1178
|
+
|
|
1179
|
+
| Prop | Type | Default |
|
|
1180
|
+
| ----------- | -------- | ------- |
|
|
1181
|
+
| `className` | `string` | |
|
|
1182
|
+
|
|
1183
|
+
```tsx
|
|
1184
|
+
<FieldSet>
|
|
1185
|
+
<FieldLegend>Delivery</FieldLegend>
|
|
1186
|
+
<FieldGroup>{/* Fields */}</FieldGroup>
|
|
1187
|
+
</FieldSet>
|
|
1188
|
+
```
|
|
1189
|
+
|
|
1190
|
+
### FieldLegend
|
|
1191
|
+
|
|
1192
|
+
Legend element for a `FieldSet`. Switch to the `label` variant to align with label sizing.
|
|
1193
|
+
|
|
1194
|
+
| Prop | Type | Default |
|
|
1195
|
+
| ----------- | --------------------- | ---------- |
|
|
1196
|
+
| `variant` | `"legend" \| "label"` | `"legend"` |
|
|
1197
|
+
| `className` | `string` | |
|
|
1198
|
+
|
|
1199
|
+
```tsx
|
|
1200
|
+
<FieldLegend variant="label">Notification Preferences</FieldLegend>
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
The `FieldLegend` has two variants: `legend` and `label`. The `label` variant applies label sizing and alignment. Handy if you have nested `FieldSet`.
|
|
1204
|
+
|
|
1205
|
+
### FieldGroup
|
|
1206
|
+
|
|
1207
|
+
Layout wrapper that stacks `Field` components and enables container queries for responsive orientations.
|
|
1208
|
+
|
|
1209
|
+
| Prop | Type | Default |
|
|
1210
|
+
| ----------- | -------- | ------- |
|
|
1211
|
+
| `className` | `string` | |
|
|
1212
|
+
|
|
1213
|
+
```tsx
|
|
1214
|
+
<FieldGroup className="@container/field-group flex flex-col gap-6">
|
|
1215
|
+
<Field>{/* ... */}</Field>
|
|
1216
|
+
<Field>{/* ... */}</Field>
|
|
1217
|
+
</FieldGroup>
|
|
1218
|
+
```
|
|
1219
|
+
|
|
1220
|
+
### Field
|
|
1221
|
+
|
|
1222
|
+
The core wrapper for a single field. Provides orientation control, invalid state styling, and spacing.
|
|
1223
|
+
|
|
1224
|
+
| Prop | Type | Default |
|
|
1225
|
+
| -------------- | -------------------------------------------- | ------------ |
|
|
1226
|
+
| `orientation` | `"vertical" \| "horizontal" \| "responsive"` | `"vertical"` |
|
|
1227
|
+
| `className` | `string` | |
|
|
1228
|
+
| `data-invalid` | `boolean` | |
|
|
1229
|
+
|
|
1230
|
+
```tsx
|
|
1231
|
+
<Field orientation="horizontal">
|
|
1232
|
+
<FieldLabel htmlFor="remember">Remember me</FieldLabel>
|
|
1233
|
+
<Switch id="remember" />
|
|
1234
|
+
</Field>
|
|
1235
|
+
```
|
|
1236
|
+
|
|
1237
|
+
### FieldContent
|
|
1238
|
+
|
|
1239
|
+
Flex column that groups control and descriptions when the label sits beside the control. Not required if you have no description.
|
|
1240
|
+
|
|
1241
|
+
| Prop | Type | Default |
|
|
1242
|
+
| ----------- | -------- | ------- |
|
|
1243
|
+
| `className` | `string` | |
|
|
1244
|
+
|
|
1245
|
+
```tsx
|
|
1246
|
+
<Field>
|
|
1247
|
+
<Checkbox id="notifications" />
|
|
1248
|
+
<FieldContent>
|
|
1249
|
+
<FieldLabel htmlFor="notifications">Notifications</FieldLabel>
|
|
1250
|
+
<FieldDescription>Email, SMS, and push options.</FieldDescription>
|
|
1251
|
+
</FieldContent>
|
|
1252
|
+
</Field>
|
|
1253
|
+
```
|
|
1254
|
+
|
|
1255
|
+
### FieldLabel
|
|
1256
|
+
|
|
1257
|
+
Label styled for both direct inputs and nested `Field` children.
|
|
1258
|
+
|
|
1259
|
+
| Prop | Type | Default |
|
|
1260
|
+
| ----------- | -------- | ------- |
|
|
1261
|
+
| `className` | `string` | |
|
|
1262
|
+
|
|
1263
|
+
```tsx
|
|
1264
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
1265
|
+
```
|
|
1266
|
+
|
|
1267
|
+
### FieldTitle
|
|
1268
|
+
|
|
1269
|
+
Renders a title with label styling inside `FieldContent`.
|
|
1270
|
+
|
|
1271
|
+
| Prop | Type | Default |
|
|
1272
|
+
| ----------- | -------- | ------- |
|
|
1273
|
+
| `className` | `string` | |
|
|
1274
|
+
|
|
1275
|
+
```tsx
|
|
1276
|
+
<FieldContent>
|
|
1277
|
+
<FieldTitle>Enable Touch ID</FieldTitle>
|
|
1278
|
+
<FieldDescription>Unlock your device faster.</FieldDescription>
|
|
1279
|
+
</FieldContent>
|
|
1280
|
+
```
|
|
1281
|
+
|
|
1282
|
+
### FieldDescription
|
|
1283
|
+
|
|
1284
|
+
Helper text slot that automatically balances long lines in horizontal layouts.
|
|
1285
|
+
|
|
1286
|
+
| Prop | Type | Default |
|
|
1287
|
+
| ----------- | -------- | ------- |
|
|
1288
|
+
| `className` | `string` | |
|
|
1289
|
+
|
|
1290
|
+
```tsx
|
|
1291
|
+
<FieldDescription>We never share your email with anyone.</FieldDescription>
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
### FieldSeparator
|
|
1295
|
+
|
|
1296
|
+
Visual divider to separate sections inside a `FieldGroup`. Accepts optional inline content.
|
|
1297
|
+
|
|
1298
|
+
| Prop | Type | Default |
|
|
1299
|
+
| ----------- | -------- | ------- |
|
|
1300
|
+
| `className` | `string` | |
|
|
1301
|
+
|
|
1302
|
+
```tsx
|
|
1303
|
+
<FieldSeparator>Or continue with</FieldSeparator>
|
|
1304
|
+
```
|
|
1305
|
+
|
|
1306
|
+
### FieldError
|
|
1307
|
+
|
|
1308
|
+
Accessible error container that accepts children or an `errors` array (e.g., from `react-hook-form`).
|
|
1309
|
+
|
|
1310
|
+
| Prop | Type | Default |
|
|
1311
|
+
| ----------- | ------------------------------------------ | ------- |
|
|
1312
|
+
| `errors` | `Array<{ message?: string } \| undefined>` | |
|
|
1313
|
+
| `className` | `string` | |
|
|
1314
|
+
|
|
1315
|
+
```tsx
|
|
1316
|
+
<FieldError errors={errors.username} />
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
When the `errors` array contains multiple messages, the component renders a list automatically.
|
|
1320
|
+
|
|
1321
|
+
`FieldError` also accepts issues produced by any validator that implements [Standard Schema](https://standardschema.dev/), including Zod, Valibot, and ArkType. Pass the `issues` array from the schema result directly to render a unified error list across libraries.
|