opencode-skills-collection 3.1.0 → 3.1.1
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/bundled-skills/.antigravity-install-manifest.json +84 -1
- package/bundled-skills/android-ui-journey-testing/SKILL.md +191 -0
- package/bundled-skills/ask-matt/SKILL.md +92 -0
- package/bundled-skills/bugs-are-annoying/SKILL.md +137 -0
- package/bundled-skills/codebase-design/DEEPENING.md +37 -0
- package/bundled-skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
- package/bundled-skills/codebase-design/SKILL.md +145 -0
- package/bundled-skills/competitor-analysis/LICENSE.txt +21 -0
- package/bundled-skills/competitor-analysis/SKILL.md +434 -0
- package/bundled-skills/competitor-analysis/references/battle-card-subagent.md +127 -0
- package/bundled-skills/competitor-analysis/references/battle-card.md +91 -0
- package/bundled-skills/competitor-analysis/references/example-research.md +130 -0
- package/bundled-skills/competitor-analysis/references/report-template.html +127 -0
- package/bundled-skills/competitor-analysis/references/research-patterns.md +217 -0
- package/bundled-skills/competitor-analysis/references/workflow.md +434 -0
- package/bundled-skills/competitor-analysis/scripts/capture_screenshots.mjs +142 -0
- package/bundled-skills/competitor-analysis/scripts/compile_report.mjs +929 -0
- package/bundled-skills/competitor-analysis/scripts/extract_vs_names.mjs +140 -0
- package/bundled-skills/competitor-analysis/scripts/gate_candidates.mjs +194 -0
- package/bundled-skills/competitor-analysis/scripts/list_urls.mjs +90 -0
- package/bundled-skills/competitor-analysis/scripts/md_utils.mjs +50 -0
- package/bundled-skills/competitor-analysis/scripts/merge_partials.mjs +291 -0
- package/bundled-skills/competitor-analysis/scripts/package.json +6 -0
- package/bundled-skills/design-it/3d-ui/SKILL.md +259 -0
- package/bundled-skills/design-it/SKILL.md +170 -0
- package/bundled-skills/design-it/ai-native-ui/SKILL.md +295 -0
- package/bundled-skills/design-it/aurora-ui/SKILL.md +307 -0
- package/bundled-skills/design-it/bento-ui/SKILL.md +314 -0
- package/bundled-skills/design-it/brutalism/SKILL.md +270 -0
- package/bundled-skills/design-it/brutalist-typography/SKILL.md +287 -0
- package/bundled-skills/design-it/card-based-design/SKILL.md +262 -0
- package/bundled-skills/design-it/claymorphism/SKILL.md +287 -0
- package/bundled-skills/design-it/color-blocking/SKILL.md +278 -0
- package/bundled-skills/design-it/command-center-ui/SKILL.md +345 -0
- package/bundled-skills/design-it/cyber-y2k/SKILL.md +312 -0
- package/bundled-skills/design-it/cyberpunk-ui/SKILL.md +262 -0
- package/bundled-skills/design-it/dark-mode/SKILL.md +289 -0
- package/bundled-skills/design-it/dashboard-design/SKILL.md +331 -0
- package/bundled-skills/design-it/data-dense-design/SKILL.md +322 -0
- package/bundled-skills/design-it/duotone-design/SKILL.md +248 -0
- package/bundled-skills/design-it/editorial-design/SKILL.md +328 -0
- package/bundled-skills/design-it/flat-design/SKILL.md +221 -0
- package/bundled-skills/design-it/flat-design-2/SKILL.md +240 -0
- package/bundled-skills/design-it/floating-ui/SKILL.md +299 -0
- package/bundled-skills/design-it/frutiger-aero/SKILL.md +274 -0
- package/bundled-skills/design-it/glassmorphism/SKILL.md +272 -0
- package/bundled-skills/design-it/gradient-design/SKILL.md +309 -0
- package/bundled-skills/design-it/high-contrast/SKILL.md +288 -0
- package/bundled-skills/design-it/holographic-ui/SKILL.md +310 -0
- package/bundled-skills/design-it/isometric-design/SKILL.md +228 -0
- package/bundled-skills/design-it/layered-design/SKILL.md +247 -0
- package/bundled-skills/design-it/material-design/SKILL.md +275 -0
- package/bundled-skills/design-it/maximalism/SKILL.md +297 -0
- package/bundled-skills/design-it/minimalism/SKILL.md +267 -0
- package/bundled-skills/design-it/monochromatic-ui/SKILL.md +296 -0
- package/bundled-skills/design-it/neo-brutalism/SKILL.md +270 -0
- package/bundled-skills/design-it/neumorphism/SKILL.md +248 -0
- package/bundled-skills/design-it/retro-design/SKILL.md +283 -0
- package/bundled-skills/design-it/retro-futurism/SKILL.md +259 -0
- package/bundled-skills/design-it/sci-fi-interface/SKILL.md +309 -0
- package/bundled-skills/design-it/skeuomorphism/SKILL.md +280 -0
- package/bundled-skills/design-it/soft-pastel/SKILL.md +307 -0
- package/bundled-skills/design-it/spatial-computing-ui/SKILL.md +300 -0
- package/bundled-skills/design-it/spatial-design/SKILL.md +268 -0
- package/bundled-skills/design-it/swiss-design/SKILL.md +293 -0
- package/bundled-skills/design-it/synthwave/SKILL.md +257 -0
- package/bundled-skills/design-it/tile-design/SKILL.md +297 -0
- package/bundled-skills/design-it/typography-first/SKILL.md +247 -0
- package/bundled-skills/design-it/vaporwave/SKILL.md +331 -0
- package/bundled-skills/design-it/vibrant-maximalism/SKILL.md +291 -0
- package/bundled-skills/design-it/widget-based-design/SKILL.md +274 -0
- package/bundled-skills/design-it/y2k-design/SKILL.md +268 -0
- package/bundled-skills/diagnosing-bugs/SKILL.md +165 -0
- package/bundled-skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
- package/bundled-skills/docs/contributors/skill-scoring.md +235 -0
- package/bundled-skills/docs/integrations/jetski-cortex.md +3 -3
- package/bundled-skills/docs/integrations/jetski-gemini-loader/README.md +1 -1
- package/bundled-skills/docs/maintainers/repo-growth-seo.md +3 -3
- package/bundled-skills/docs/maintainers/skills-update-guide.md +1 -1
- package/bundled-skills/docs/users/bundles.md +1 -1
- package/bundled-skills/docs/users/claude-code-skills.md +1 -1
- package/bundled-skills/docs/users/gemini-cli-skills.md +1 -1
- package/bundled-skills/docs/users/getting-started.md +1 -1
- package/bundled-skills/docs/users/kiro-integration.md +1 -1
- package/bundled-skills/docs/users/usage.md +4 -4
- package/bundled-skills/docs/users/visual-guide.md +4 -4
- package/bundled-skills/domain-modeling/ADR-FORMAT.md +47 -0
- package/bundled-skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/bundled-skills/domain-modeling/SKILL.md +105 -0
- package/bundled-skills/grill-me/SKILL.md +36 -0
- package/bundled-skills/grill-with-docs/SKILL.md +36 -0
- package/bundled-skills/grilling/SKILL.md +39 -0
- package/bundled-skills/handoff/SKILL.md +45 -0
- package/bundled-skills/image-generator/.env.example +7 -0
- package/bundled-skills/image-generator/SKILL.md +509 -0
- package/bundled-skills/improve-codebase-architecture/HTML-REPORT.md +123 -0
- package/bundled-skills/improve-codebase-architecture/SKILL.md +97 -0
- package/bundled-skills/learn/SKILL.md +156 -0
- package/bundled-skills/lesson-generator/SKILL.md +90 -0
- package/bundled-skills/llm-council/.env.example +7 -0
- package/bundled-skills/llm-council/SKILL.md +602 -0
- package/bundled-skills/loop-library/SKILL.md +205 -0
- package/bundled-skills/loop-library/agents/openai.yaml +4 -0
- package/bundled-skills/loop-library/references/catalog.md +270 -0
- package/bundled-skills/mailtrap-managing-contacts/SKILL.md +112 -0
- package/bundled-skills/mailtrap-sending-emails/SKILL.md +167 -0
- package/bundled-skills/mailtrap-setting-up-sending-domain/SKILL.md +77 -0
- package/bundled-skills/mailtrap-testing-with-sandbox/SKILL.md +110 -0
- package/bundled-skills/prototype/LOGIC.md +79 -0
- package/bundled-skills/prototype/SKILL.md +62 -0
- package/bundled-skills/prototype/UI.md +112 -0
- package/bundled-skills/setup-matt-pocock-skills/SKILL.md +158 -0
- package/bundled-skills/setup-matt-pocock-skills/domain.md +51 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-github.md +34 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +35 -0
- package/bundled-skills/setup-matt-pocock-skills/issue-tracker-local.md +19 -0
- package/bundled-skills/setup-matt-pocock-skills/triage-labels.md +15 -0
- package/bundled-skills/survey-generator/LICENSE +21 -0
- package/bundled-skills/survey-generator/SKILL.md +143 -0
- package/bundled-skills/survey-generator/build_artifact.py +208 -0
- package/bundled-skills/survey-generator/examples/agentic-engineering/research_bundle.json +1196 -0
- package/bundled-skills/survey-generator/examples/agentic-engineering/survey.html +706 -0
- package/bundled-skills/survey-generator/style_spec.json +85 -0
- package/bundled-skills/survey-generator/templates/research_bundle_template.json +69 -0
- package/bundled-skills/tdd/SKILL.md +139 -0
- package/bundled-skills/tdd/mocking.md +59 -0
- package/bundled-skills/tdd/refactoring.md +10 -0
- package/bundled-skills/tdd/tests.md +61 -0
- package/bundled-skills/teach/GLOSSARY-FORMAT.md +35 -0
- package/bundled-skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/bundled-skills/teach/MISSION-FORMAT.md +31 -0
- package/bundled-skills/teach/RESOURCES-FORMAT.md +32 -0
- package/bundled-skills/teach/SKILL.md +169 -0
- package/bundled-skills/to-issues/SKILL.md +115 -0
- package/bundled-skills/to-prd/SKILL.md +104 -0
- package/bundled-skills/tools-page-seo-optimizer/SKILL.md +616 -0
- package/bundled-skills/triage/AGENT-BRIEF.md +207 -0
- package/bundled-skills/triage/OUT-OF-SCOPE.md +105 -0
- package/bundled-skills/triage/SKILL.md +143 -0
- package/bundled-skills/vibecode-production-qa-validator/SKILL.md +371 -141
- package/bundled-skills/wiki-builder/SKILL.md +157 -0
- package/bundled-skills/wiki-builder/agents/openai.yaml +5 -0
- package/bundled-skills/wiki-builder/references/wiki-flavors.md +98 -0
- package/bundled-skills/wiki-builder/scripts/init_wiki.sh +105 -0
- package/bundled-skills/wiki-builder/templates/index.md +20 -0
- package/bundled-skills/wiki-builder/templates/maintenance-log.md +7 -0
- package/bundled-skills/wiki-builder/templates/prompts/compile-concept-page.md +12 -0
- package/bundled-skills/wiki-builder/templates/prompts/compile-index.md +11 -0
- package/bundled-skills/wiki-builder/templates/prompts/compile-source-page.md +12 -0
- package/bundled-skills/wiki-builder/templates/prompts/lint-wiki.md +10 -0
- package/bundled-skills/wiki-builder/templates/prompts/query-and-file.md +11 -0
- package/bundled-skills/wiki-builder/templates/sources.md +9 -0
- package/bundled-skills/wiki-builder/templates/wiki.config.md +53 -0
- package/bundled-skills/writing-great-skills/GLOSSARY.md +181 -0
- package/bundled-skills/writing-great-skills/SKILL.md +111 -0
- package/bundled-skills/yao-meta-skill/SKILL.md +86 -0
- package/bundled-skills/yao-meta-skill/agents/interface.yaml +26 -0
- package/bundled-skills/yao-meta-skill/manifest.json +24 -0
- package/bundled-skills/yao-meta-skill/references/artifact-design-doctrine.md +49 -0
- package/bundled-skills/yao-meta-skill/references/authoring-discipline.md +78 -0
- package/bundled-skills/yao-meta-skill/references/autonomous-adaptation.md +65 -0
- package/bundled-skills/yao-meta-skill/references/distribution-registry-method.md +60 -0
- package/bundled-skills/yao-meta-skill/references/eval-playbook.md +69 -0
- package/bundled-skills/yao-meta-skill/references/gate-selection.md +68 -0
- package/bundled-skills/yao-meta-skill/references/governance.md +134 -0
- package/bundled-skills/yao-meta-skill/references/human-review-template.md +54 -0
- package/bundled-skills/yao-meta-skill/references/intent-dialogue.md +138 -0
- package/bundled-skills/yao-meta-skill/references/iteration-philosophy.md +30 -0
- package/bundled-skills/yao-meta-skill/references/non-skill-decision-tree.md +39 -0
- package/bundled-skills/yao-meta-skill/references/operating-modes.md +107 -0
- package/bundled-skills/yao-meta-skill/references/output-eval-method.md +113 -0
- package/bundled-skills/yao-meta-skill/references/output-quality-risk.md +41 -0
- package/bundled-skills/yao-meta-skill/references/output-visual-quality.md +53 -0
- package/bundled-skills/yao-meta-skill/references/packaging-contracts.md +70 -0
- package/bundled-skills/yao-meta-skill/references/pattern-extraction-doctrine.md +76 -0
- package/bundled-skills/yao-meta-skill/references/platform-capability-matrix.md +49 -0
- package/bundled-skills/yao-meta-skill/references/prompt-engineering-doctrine.md +76 -0
- package/bundled-skills/yao-meta-skill/references/qa-ladder.md +57 -0
- package/bundled-skills/yao-meta-skill/references/reference-scan.md +126 -0
- package/bundled-skills/yao-meta-skill/references/regression-cause-taxonomy.md +80 -0
- package/bundled-skills/yao-meta-skill/references/resource-boundaries.md +120 -0
- package/bundled-skills/yao-meta-skill/references/review-studio-method.md +87 -0
- package/bundled-skills/yao-meta-skill/references/review-waiver-method.md +76 -0
- package/bundled-skills/yao-meta-skill/references/runtime-conformance-method.md +21 -0
- package/bundled-skills/yao-meta-skill/references/skill-archetypes.md +86 -0
- package/bundled-skills/yao-meta-skill/references/skill-atlas-method.md +35 -0
- package/bundled-skills/yao-meta-skill/references/skill-engineering-method.md +210 -0
- package/bundled-skills/yao-meta-skill/references/skill-ir-method.md +41 -0
- package/bundled-skills/yao-meta-skill/references/skillops-decision-policy.md +53 -0
- package/bundled-skills/yao-meta-skill/references/systems-thinking-doctrine.md +75 -0
- package/bundled-skills/yao-meta-skill/references/telemetry-drift-method.md +182 -0
- package/bundled-skills/yao-meta-skill/references/trust-security-method.md +79 -0
- package/bundled-skills/yao-meta-skill/references/user-memory-policy.md +35 -0
- package/bundled-skills/youtube-notetaker/SKILL.md +209 -0
- package/bundled-skills/youtube-notetaker/reference/artifact.html +269 -0
- package/bundled-skills/youtube-notetaker/scripts/contact_sheet.py +53 -0
- package/bundled-skills/youtube-notetaker/scripts/detect_slides.sh +19 -0
- package/bundled-skills/youtube-notetaker/scripts/download.sh +24 -0
- package/bundled-skills/youtube-notetaker/scripts/extract_slides.py +43 -0
- package/bundled-skills/youtube-notetaker/scripts/serve.py +173 -0
- package/bundled-skills/youtube-notetaker/scripts/setup.sh +27 -0
- package/bundled-skills/youtube-notetaker/scripts/verify.sh +31 -0
- package/bundled-skills/youtube-notetaker/scripts/vtt_to_transcript.py +59 -0
- package/bundled-skills/youtube-notetaker/scripts/write_library_item.py +69 -0
- package/package.json +1 -1
- package/skills_index.json +1956 -286
- package/bundled-skills/ai-md/SKILL.md +0 -523
- package/bundled-skills/atlas-contract/SKILL.md +0 -650
- package/bundled-skills/busybox-on-windows/SKILL.md +0 -40
- package/bundled-skills/monte-carlo-prevent/SKILL.md +0 -257
- package/bundled-skills/monte-carlo-prevent/references/TROUBLESHOOTING.md +0 -23
- package/bundled-skills/monte-carlo-prevent/references/parameters.md +0 -32
- package/bundled-skills/monte-carlo-prevent/references/workflows.md +0 -478
- package/bundled-skills/monte-carlo-push-ingestion/SKILL.md +0 -372
- package/bundled-skills/monte-carlo-push-ingestion/references/anomaly-detection.md +0 -87
- package/bundled-skills/monte-carlo-push-ingestion/references/custom-lineage.md +0 -203
- package/bundled-skills/monte-carlo-push-ingestion/references/direct-http-api.md +0 -207
- package/bundled-skills/monte-carlo-push-ingestion/references/prerequisites.md +0 -150
- package/bundled-skills/monte-carlo-push-ingestion/references/push-lineage.md +0 -160
- package/bundled-skills/monte-carlo-push-ingestion/references/push-metadata.md +0 -158
- package/bundled-skills/monte-carlo-push-ingestion/references/push-query-logs.md +0 -219
- package/bundled-skills/monte-carlo-push-ingestion/references/validation.md +0 -257
- package/bundled-skills/monte-carlo-push-ingestion/scripts/sample_verify.py +0 -357
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_lineage.py +0 -70
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_metadata.py +0 -65
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_and_push_query_logs.py +0 -70
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_lineage.py +0 -214
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_metadata.py +0 -160
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/collect_query_logs.py +0 -164
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_lineage.py +0 -198
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_metadata.py +0 -193
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery/push_query_logs.py +0 -207
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_and_push_metadata.py +0 -71
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_and_push_query_logs.py +0 -64
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_metadata.py +0 -253
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/collect_query_logs.py +0 -149
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/push_metadata.py +0 -190
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/bigquery-iceberg/push_query_logs.py +0 -208
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_lineage.py +0 -83
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_metadata.py +0 -77
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_and_push_query_logs.py +0 -83
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_lineage.py +0 -240
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_metadata.py +0 -212
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/collect_query_logs.py +0 -204
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_lineage.py +0 -192
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_metadata.py +0 -178
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/databricks/push_query_logs.py +0 -200
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_lineage.py +0 -119
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_metadata.py +0 -119
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_and_push_query_logs.py +0 -117
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_lineage.py +0 -265
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_metadata.py +0 -313
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/collect_query_logs.py +0 -284
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_lineage.py +0 -309
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_metadata.py +0 -245
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/hive/push_query_logs.py +0 -255
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_lineage.py +0 -78
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_metadata.py +0 -80
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_and_push_query_logs.py +0 -88
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_lineage.py +0 -235
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_metadata.py +0 -219
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/collect_query_logs.py +0 -239
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_lineage.py +0 -178
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_metadata.py +0 -178
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/redshift/push_query_logs.py +0 -196
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_lineage.py +0 -154
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_metadata.py +0 -137
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_and_push_query_logs.py +0 -137
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_lineage.py +0 -349
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_metadata.py +0 -329
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/collect_query_logs.py +0 -254
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_lineage.py +0 -307
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_metadata.py +0 -228
- package/bundled-skills/monte-carlo-push-ingestion/scripts/templates/snowflake/push_query_logs.py +0 -248
- package/bundled-skills/monte-carlo-push-ingestion/scripts/test_template_sdk_usage.py +0 -340
- package/bundled-skills/skill-optimizer/SKILL.md +0 -271
- package/bundled-skills/using-superpowers/SKILL.md +0 -98
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: layered-design
|
|
3
|
+
description: Web and App implementation guide for Layered Design. Trigger when user wants multiple depth levels, floating panels, and overlapping content.
|
|
4
|
+
date_added: "2026-06-17"
|
|
5
|
+
risk: safe
|
|
6
|
+
source: self
|
|
7
|
+
source_type: self
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Layered Design
|
|
11
|
+
|
|
12
|
+
> "Stacking context. Interfaces built from overlapping, independent layers."
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the `design-it` skill and is not meant to be triggered directly.
|
|
17
|
+
|
|
18
|
+
## Core Principles
|
|
19
|
+
1. **Explicit Overlap**: Elements intentionally overlap each other to break the grid and show depth.
|
|
20
|
+
2. **Clear Stratification**: Every layer must be visually distinct via shadow, border, or contrasting color.
|
|
21
|
+
3. **Parallax Scrolling**: Background layers move slower than foreground layers during interaction/scrolling.
|
|
22
|
+
|
|
23
|
+
## Visual DNA
|
|
24
|
+
- **Colors**: **Monochromatic Brown** or **Sophisticated Neutral**. Layering works best when the background is distinct from the floating elements.
|
|
25
|
+
- **Typography**: Often large, overlapping text that spans across image and background layers.
|
|
26
|
+
- **Spacing**: Negative space is required around overlapping elements so they don't feel cluttered.
|
|
27
|
+
|
|
28
|
+
## Web Implementation
|
|
29
|
+
- Heavy use of `position: absolute`, negative margins, and `z-index`.
|
|
30
|
+
- **CSS Example**:
|
|
31
|
+
```css
|
|
32
|
+
.layer-container {
|
|
33
|
+
position: relative;
|
|
34
|
+
padding: 100px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.layer-bg-image {
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 0; right: 0;
|
|
40
|
+
width: 60%;
|
|
41
|
+
height: 400px;
|
|
42
|
+
object-fit: cover;
|
|
43
|
+
z-index: 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.layer-text-box {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 2; /* Sits above the image */
|
|
49
|
+
background: white;
|
|
50
|
+
padding: 40px;
|
|
51
|
+
width: 50%;
|
|
52
|
+
margin-top: 200px; /* Pulls it down over the image */
|
|
53
|
+
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
|
|
54
|
+
/* Optional: border to define edge */
|
|
55
|
+
border-left: 4px solid var(--cta-highlight);
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## App Implementation
|
|
60
|
+
|
|
61
|
+
### SwiftUI
|
|
62
|
+
```swift
|
|
63
|
+
struct LayeredDesignView: View {
|
|
64
|
+
var body: some View {
|
|
65
|
+
ScrollView {
|
|
66
|
+
ZStack(alignment: .top) {
|
|
67
|
+
// Background Image Layer (Back)
|
|
68
|
+
Image("architectural-bg")
|
|
69
|
+
.resizable()
|
|
70
|
+
.aspectRatio(contentMode: .fill)
|
|
71
|
+
.frame(height: 400)
|
|
72
|
+
.offset(x: 40, y: 0) // Shifted right
|
|
73
|
+
.zIndex(1)
|
|
74
|
+
|
|
75
|
+
// Content Card Layer (Front)
|
|
76
|
+
VStack(alignment: .leading, spacing: 16) {
|
|
77
|
+
Text("Stacking Context")
|
|
78
|
+
.font(.largeTitle).bold()
|
|
79
|
+
Text("This card intentionally overlaps the background image to create depth without relying on a grid.")
|
|
80
|
+
.foregroundColor(.secondary)
|
|
81
|
+
}
|
|
82
|
+
.padding(40)
|
|
83
|
+
.background(Color.white)
|
|
84
|
+
.shadow(color: Color.black.opacity(0.1), radius: 30, y: 20)
|
|
85
|
+
.offset(x: -40, y: 200) // Shifted left and pulled down
|
|
86
|
+
.zIndex(2)
|
|
87
|
+
}
|
|
88
|
+
.padding(.bottom, 200) // Account for the offset
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
- `ZStack` is the foundation of layered design in SwiftUI.
|
|
94
|
+
- Use `.offset()` to intentionally break the alignment and create overlapping compositions.
|
|
95
|
+
- Explicitly set `.zIndex()` if your offsets might cause unexpected paint orders.
|
|
96
|
+
|
|
97
|
+
### Flutter
|
|
98
|
+
```dart
|
|
99
|
+
class LayeredDesignScreen extends StatelessWidget {
|
|
100
|
+
@override
|
|
101
|
+
Widget build(BuildContext context) {
|
|
102
|
+
return Scaffold(
|
|
103
|
+
body: SingleChildScrollView(
|
|
104
|
+
child: SizedBox(
|
|
105
|
+
height: 600, // Fixed height stack or use constraints
|
|
106
|
+
child: Stack(
|
|
107
|
+
children: [
|
|
108
|
+
// Background Image Layer
|
|
109
|
+
Positioned(
|
|
110
|
+
top: 0,
|
|
111
|
+
right: -40, // Shifted offscreen right
|
|
112
|
+
width: MediaQuery.of(context).size.width * 0.8,
|
|
113
|
+
height: 400,
|
|
114
|
+
child: Image.asset('assets/architectural-bg.jpg', fit: BoxFit.cover),
|
|
115
|
+
),
|
|
116
|
+
|
|
117
|
+
// Content Card Layer
|
|
118
|
+
Positioned(
|
|
119
|
+
top: 250, // Overlaps the bottom of the image
|
|
120
|
+
left: 20, // Overlaps the left of the image
|
|
121
|
+
width: MediaQuery.of(context).size.width * 0.7,
|
|
122
|
+
child: Container(
|
|
123
|
+
padding: const EdgeInsets.all(40),
|
|
124
|
+
decoration: BoxDecoration(
|
|
125
|
+
color: Colors.white,
|
|
126
|
+
boxShadow: [
|
|
127
|
+
BoxShadow(color: Colors.black.withOpacity(0.1), blurRadius: 30, offset: const Offset(0, 20))
|
|
128
|
+
],
|
|
129
|
+
),
|
|
130
|
+
child: Column(
|
|
131
|
+
crossAxisAlignment: CrossAxisAlignment.start,
|
|
132
|
+
children: const [
|
|
133
|
+
Text('Stacking Context', style: TextStyle(fontSize: 32, fontWeight: FontWeight.bold)),
|
|
134
|
+
SizedBox(height: 16),
|
|
135
|
+
Text('This card intentionally overlaps the background image.', style: TextStyle(color: Colors.grey)),
|
|
136
|
+
],
|
|
137
|
+
),
|
|
138
|
+
),
|
|
139
|
+
),
|
|
140
|
+
],
|
|
141
|
+
),
|
|
142
|
+
),
|
|
143
|
+
),
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
- The `Stack` widget with `Positioned` children is required.
|
|
149
|
+
- You can use negative values in `Positioned` (e.g., `right: -40`) to bleed layers off the edge of the screen, which is a common trope in layered design.
|
|
150
|
+
|
|
151
|
+
### React Native
|
|
152
|
+
```jsx
|
|
153
|
+
const LayeredDesignScreen = () => {
|
|
154
|
+
return (
|
|
155
|
+
<ScrollView style={{ flex: 1, backgroundColor: '#F8F8F8' }}>
|
|
156
|
+
<View style={{ height: 600 }}>
|
|
157
|
+
|
|
158
|
+
{/* Background Image Layer */}
|
|
159
|
+
<Image
|
|
160
|
+
source={{ uri: 'https://example.com/architectural-bg.jpg' }}
|
|
161
|
+
style={{
|
|
162
|
+
position: 'absolute',
|
|
163
|
+
top: 0,
|
|
164
|
+
right: -40,
|
|
165
|
+
width: '80%',
|
|
166
|
+
height: 400,
|
|
167
|
+
zIndex: 1,
|
|
168
|
+
}}
|
|
169
|
+
/>
|
|
170
|
+
|
|
171
|
+
{/* Content Card Layer */}
|
|
172
|
+
<View style={{
|
|
173
|
+
position: 'absolute',
|
|
174
|
+
top: 250,
|
|
175
|
+
left: 20,
|
|
176
|
+
width: '70%',
|
|
177
|
+
backgroundColor: '#FFF',
|
|
178
|
+
padding: 40,
|
|
179
|
+
zIndex: 2,
|
|
180
|
+
// Deep shadow to separate the layers
|
|
181
|
+
shadowColor: '#000', shadowOffset: { width: 0, height: 20 },
|
|
182
|
+
shadowOpacity: 0.1, shadowRadius: 30, elevation: 15,
|
|
183
|
+
}}>
|
|
184
|
+
<Text style={{ fontSize: 32, fontWeight: 'bold', marginBottom: 16 }}>Stacking Context</Text>
|
|
185
|
+
<Text style={{ color: '#666' }}>This card intentionally overlaps the background image.</Text>
|
|
186
|
+
</View>
|
|
187
|
+
|
|
188
|
+
</View>
|
|
189
|
+
</ScrollView>
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
```
|
|
193
|
+
- Heavy use of `position: 'absolute'` inside a relative container.
|
|
194
|
+
- Manage `zIndex` explicitly. Note that on Android, `elevation` also controls Z-indexing, so the card must have a higher `elevation` than the image.
|
|
195
|
+
|
|
196
|
+
### Jetpack Compose
|
|
197
|
+
```kotlin
|
|
198
|
+
@Composable
|
|
199
|
+
fun LayeredDesignScreen() {
|
|
200
|
+
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
|
|
201
|
+
Box(modifier = Modifier.height(600.dp).fillMaxWidth()) {
|
|
202
|
+
|
|
203
|
+
// Background Image Layer
|
|
204
|
+
Image(
|
|
205
|
+
painter = painterResource(id = R.drawable.architectural_bg),
|
|
206
|
+
contentDescription = null,
|
|
207
|
+
contentScale = ContentScale.Crop,
|
|
208
|
+
modifier = Modifier
|
|
209
|
+
.align(Alignment.TopEnd)
|
|
210
|
+
.offset(x = 40.dp) // Bleed off right edge
|
|
211
|
+
.width(300.dp)
|
|
212
|
+
.height(400.dp)
|
|
213
|
+
.zIndex(1f)
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
// Content Card Layer
|
|
217
|
+
Box(
|
|
218
|
+
modifier = Modifier
|
|
219
|
+
.align(Alignment.TopStart)
|
|
220
|
+
.offset(x = 20.dp, y = 250.dp) // Overlap the image
|
|
221
|
+
.width(280.dp)
|
|
222
|
+
.zIndex(2f)
|
|
223
|
+
.shadow(30.dp)
|
|
224
|
+
.background(Color.White)
|
|
225
|
+
.padding(40.dp)
|
|
226
|
+
) {
|
|
227
|
+
Column {
|
|
228
|
+
Text("Stacking Context", fontSize = 32.sp, fontWeight = FontWeight.Bold)
|
|
229
|
+
Spacer(Modifier.height(16.dp))
|
|
230
|
+
Text("This card intentionally overlaps the background image.", color = Color.Gray)
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
- `Box` acts as your stack.
|
|
238
|
+
- Use `Modifier.align()` to set the baseline position, then `Modifier.offset()` to push it out of grid alignment.
|
|
239
|
+
- `Modifier.zIndex()` ensures the content card always renders on top of the image.
|
|
240
|
+
|
|
241
|
+
## Do's and Don'ts
|
|
242
|
+
- **DO**: Use contrasting colors or drop shadows where layers intersect so the boundary is clear.
|
|
243
|
+
- **DON'T**: Trap interactive elements (like buttons) underneath other layers where they cannot be clicked.
|
|
244
|
+
|
|
245
|
+
## Limitations
|
|
246
|
+
- This is a styling reference and does not replace environment-specific validation, accessibility testing, or expert review.
|
|
247
|
+
- Ensure appropriate contrast ratios and responsive behaviors are verified separately.
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: material-design
|
|
3
|
+
description: Web and App implementation guide for Material Design. Trigger when user wants Google's aesthetic, elevation, motion, and consistent components.
|
|
4
|
+
date_added: "2026-06-17"
|
|
5
|
+
risk: safe
|
|
6
|
+
source: self
|
|
7
|
+
source_type: self
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Material Design
|
|
11
|
+
|
|
12
|
+
> "Digital paper and ink. Interfaces built on the physical properties of stacked material."
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
Use this sub-style when the user's request matches the aesthetic described above. This is a child reference of the `design-it` skill and is not meant to be triggered directly.
|
|
17
|
+
|
|
18
|
+
## Core Principles
|
|
19
|
+
1. **Z-Axis Elevation**: Everything exists on a specific layer. Shadows communicate hierarchy and state.
|
|
20
|
+
2. **Meaningful Motion**: Animations are continuous, guiding the user's focus from one state to the next (e.g., ripple effects, shared element transitions).
|
|
21
|
+
3. **Structured Layout**: Strict adherence to an 8dp baseline grid and specific component anatomies (cards, FABs, app bars).
|
|
22
|
+
|
|
23
|
+
## Visual DNA
|
|
24
|
+
- **Colors**: Works excellently with **Desert Mirage** or **Minimalist Slate**. Utilize primary, secondary, surface, and error semantic mapping.
|
|
25
|
+
- **Typography**: `Roboto` or `Google Sans` (or equivalent clean geometric sans). Stick strictly to the Material Type Scale (H1-H6, Subtitle, Body, Caption, Overline).
|
|
26
|
+
- **Shapes**: Moderately rounded corners (4px to 16px).
|
|
27
|
+
|
|
28
|
+
## Web Implementation
|
|
29
|
+
- Do not reinvent the wheel: mimic standard Material elevations.
|
|
30
|
+
- **CSS Example**:
|
|
31
|
+
```css
|
|
32
|
+
.material-card {
|
|
33
|
+
background: var(--bg-surface);
|
|
34
|
+
border-radius: 8px;
|
|
35
|
+
padding: 16px;
|
|
36
|
+
/* Material Elevation 2 */
|
|
37
|
+
box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2),
|
|
38
|
+
0 2px 2px 0 rgba(0,0,0,0.14),
|
|
39
|
+
0 1px 5px 0 rgba(0,0,0,0.12);
|
|
40
|
+
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.material-btn {
|
|
44
|
+
text-transform: uppercase;
|
|
45
|
+
font-weight: 500;
|
|
46
|
+
letter-spacing: 1.25px;
|
|
47
|
+
padding: 0 16px;
|
|
48
|
+
height: 36px;
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
background: var(--cta-highlight);
|
|
51
|
+
color: #fff;
|
|
52
|
+
border: none;
|
|
53
|
+
/* Ripple effect is usually handled via JS, but structure is key */
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## App Implementation
|
|
58
|
+
|
|
59
|
+
### SwiftUI
|
|
60
|
+
```swift
|
|
61
|
+
struct MaterialCard: View {
|
|
62
|
+
var body: some View {
|
|
63
|
+
VStack(alignment: .leading, spacing: 12) {
|
|
64
|
+
Text("Material Card")
|
|
65
|
+
.font(.system(size: 20, weight: .medium))
|
|
66
|
+
Text("Digital paper and ink. Shadows communicate where this surface sits.")
|
|
67
|
+
.font(.system(size: 14))
|
|
68
|
+
.foregroundColor(.secondary)
|
|
69
|
+
HStack {
|
|
70
|
+
Spacer()
|
|
71
|
+
Button("ACTION") {}
|
|
72
|
+
.font(.system(size: 14, weight: .medium))
|
|
73
|
+
.foregroundColor(.accentColor)
|
|
74
|
+
.padding(.horizontal, 12)
|
|
75
|
+
.padding(.vertical, 8)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.padding(16)
|
|
79
|
+
.background(Color(.systemBackground))
|
|
80
|
+
.cornerRadius(8)
|
|
81
|
+
// Material Elevation 2 equivalent
|
|
82
|
+
.shadow(color: Color.black.opacity(0.12), radius: 3, x: 0, y: 1)
|
|
83
|
+
.shadow(color: Color.black.opacity(0.08), radius: 2, x: 0, y: 2)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Material FAB
|
|
88
|
+
struct MaterialFAB: View {
|
|
89
|
+
var body: some View {
|
|
90
|
+
Button(action: {}) {
|
|
91
|
+
Image(systemName: "plus")
|
|
92
|
+
.font(.system(size: 24))
|
|
93
|
+
.foregroundColor(.white)
|
|
94
|
+
.frame(width: 56, height: 56)
|
|
95
|
+
.background(Color.accentColor)
|
|
96
|
+
.cornerRadius(16)
|
|
97
|
+
.shadow(color: Color.black.opacity(0.2), radius: 6, x: 0, y: 3)
|
|
98
|
+
.shadow(color: Color.black.opacity(0.14), radius: 4, x: 0, y: 2)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
- Emulate Material elevation levels by stacking multiple `.shadow()` modifiers at different blur/offset values.
|
|
104
|
+
- Use `.cornerRadius(8...16)` — Material Design 3 uses more rounded shapes than M2.
|
|
105
|
+
- Animate shadow changes using `.animation(.easeInOut(duration: 0.28))` — Material uses 280ms transitions.
|
|
106
|
+
|
|
107
|
+
### Flutter
|
|
108
|
+
```dart
|
|
109
|
+
// Flutter IS Material Design — use it natively
|
|
110
|
+
class MaterialScreen extends StatelessWidget {
|
|
111
|
+
@override
|
|
112
|
+
Widget build(BuildContext context) {
|
|
113
|
+
return MaterialApp(
|
|
114
|
+
theme: ThemeData(
|
|
115
|
+
useMaterial3: true,
|
|
116
|
+
colorSchemeSeed: const Color(0xFF6750A4), // Material You seed
|
|
117
|
+
// Map your universal palette here
|
|
118
|
+
),
|
|
119
|
+
home: Scaffold(
|
|
120
|
+
appBar: AppBar(
|
|
121
|
+
title: const Text('Material Design'),
|
|
122
|
+
// M3 appbar elevation is 0 by default, scrolled = 3
|
|
123
|
+
),
|
|
124
|
+
body: Padding(
|
|
125
|
+
padding: const EdgeInsets.all(16),
|
|
126
|
+
child: Card(
|
|
127
|
+
elevation: 2,
|
|
128
|
+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
|
129
|
+
child: Padding(
|
|
130
|
+
padding: const EdgeInsets.all(16),
|
|
131
|
+
child: Column(
|
|
132
|
+
crossAxisAlignment: CrossAxisAlignment.start,
|
|
133
|
+
mainAxisSize: MainAxisSize.min,
|
|
134
|
+
children: [
|
|
135
|
+
Text('Material Card',
|
|
136
|
+
style: Theme.of(context).textTheme.titleLarge),
|
|
137
|
+
const SizedBox(height: 8),
|
|
138
|
+
Text('Digital paper and ink.',
|
|
139
|
+
style: Theme.of(context).textTheme.bodyMedium),
|
|
140
|
+
const SizedBox(height: 16),
|
|
141
|
+
Align(
|
|
142
|
+
alignment: Alignment.centerRight,
|
|
143
|
+
child: TextButton(
|
|
144
|
+
onPressed: () {},
|
|
145
|
+
child: const Text('ACTION'),
|
|
146
|
+
),
|
|
147
|
+
),
|
|
148
|
+
],
|
|
149
|
+
),
|
|
150
|
+
),
|
|
151
|
+
),
|
|
152
|
+
),
|
|
153
|
+
floatingActionButton: FloatingActionButton(
|
|
154
|
+
onPressed: () {},
|
|
155
|
+
child: const Icon(Icons.add),
|
|
156
|
+
// M3 FAB automatically gets correct elevation & shape
|
|
157
|
+
),
|
|
158
|
+
),
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
- **Flutter is the native home of Material Design.** Use `MaterialApp`, `ThemeData(useMaterial3: true)`, and standard widgets.
|
|
164
|
+
- Map the universal palette via `colorSchemeSeed` or manually build a `ColorScheme`.
|
|
165
|
+
- Use the Material type scale via `Theme.of(context).textTheme`.
|
|
166
|
+
- Ripple effects come free with `InkWell` and `ElevatedButton`.
|
|
167
|
+
|
|
168
|
+
### React Native
|
|
169
|
+
```jsx
|
|
170
|
+
import { Provider as PaperProvider, Card, Button, Title, Paragraph } from 'react-native-paper';
|
|
171
|
+
|
|
172
|
+
const materialTheme = {
|
|
173
|
+
...DefaultTheme,
|
|
174
|
+
roundness: 8,
|
|
175
|
+
colors: {
|
|
176
|
+
...DefaultTheme.colors,
|
|
177
|
+
primary: '#6750A4', // Material You purple
|
|
178
|
+
surface: '#FFFBFE',
|
|
179
|
+
background: '#FFFBFE',
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
const MaterialScreen = () => (
|
|
184
|
+
<PaperProvider theme={materialTheme}>
|
|
185
|
+
<ScrollView style={{ flex: 1, padding: 16 }}>
|
|
186
|
+
<Card style={{ marginBottom: 16 }} elevation={2}>
|
|
187
|
+
<Card.Content>
|
|
188
|
+
<Title>Material Card</Title>
|
|
189
|
+
<Paragraph>Digital paper and ink. Shadows communicate hierarchy.</Paragraph>
|
|
190
|
+
</Card.Content>
|
|
191
|
+
<Card.Actions>
|
|
192
|
+
<Button mode="text" onPress={() => {}}>ACTION</Button>
|
|
193
|
+
</Card.Actions>
|
|
194
|
+
</Card>
|
|
195
|
+
|
|
196
|
+
{/* Filled button — Material M3 style */}
|
|
197
|
+
<Button
|
|
198
|
+
mode="contained"
|
|
199
|
+
onPress={() => {}}
|
|
200
|
+
style={{ alignSelf: 'flex-start', borderRadius: 20 }}
|
|
201
|
+
labelStyle={{ fontWeight: '500', letterSpacing: 1.25 }}
|
|
202
|
+
>
|
|
203
|
+
Filled Button
|
|
204
|
+
</Button>
|
|
205
|
+
</ScrollView>
|
|
206
|
+
</PaperProvider>
|
|
207
|
+
);
|
|
208
|
+
```
|
|
209
|
+
- Use `react-native-paper` — it implements Material Design 3 natively for React Native.
|
|
210
|
+
- Configure the theme to map your universal palettes to Material semantic colors.
|
|
211
|
+
- Use `Card` (with `elevation` prop), `Button` (with `mode` prop), and `TextInput` for correct Material behavior.
|
|
212
|
+
- Ripple effects on Android come free via `Pressable`; on iOS, use `react-native-paper`'s `TouchableRipple`.
|
|
213
|
+
|
|
214
|
+
### Jetpack Compose
|
|
215
|
+
```kotlin
|
|
216
|
+
// Jetpack Compose IS Material Design — use it natively
|
|
217
|
+
@Composable
|
|
218
|
+
fun MaterialScreen() {
|
|
219
|
+
MaterialTheme(
|
|
220
|
+
colorScheme = lightColorScheme(
|
|
221
|
+
primary = Color(0xFF6750A4),
|
|
222
|
+
onPrimary = Color.White,
|
|
223
|
+
surface = Color(0xFFFFFBFE),
|
|
224
|
+
),
|
|
225
|
+
typography = Typography(
|
|
226
|
+
titleLarge = TextStyle(fontSize = 22.sp, fontWeight = FontWeight.Medium),
|
|
227
|
+
bodyMedium = TextStyle(fontSize = 14.sp, lineHeight = 20.sp),
|
|
228
|
+
),
|
|
229
|
+
) {
|
|
230
|
+
Scaffold(
|
|
231
|
+
topBar = {
|
|
232
|
+
TopAppBar(title = { Text("Material Design") })
|
|
233
|
+
},
|
|
234
|
+
floatingActionButton = {
|
|
235
|
+
FloatingActionButton(onClick = {}) {
|
|
236
|
+
Icon(Icons.Default.Add, contentDescription = "Add")
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
) { padding ->
|
|
240
|
+
Column(modifier = Modifier.padding(padding).padding(16.dp)) {
|
|
241
|
+
Card(
|
|
242
|
+
modifier = Modifier.fillMaxWidth(),
|
|
243
|
+
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp),
|
|
244
|
+
shape = RoundedCornerShape(12.dp),
|
|
245
|
+
) {
|
|
246
|
+
Column(modifier = Modifier.padding(16.dp)) {
|
|
247
|
+
Text("Material Card",
|
|
248
|
+
style = MaterialTheme.typography.titleLarge)
|
|
249
|
+
Spacer(Modifier.height(8.dp))
|
|
250
|
+
Text("Digital paper and ink.",
|
|
251
|
+
style = MaterialTheme.typography.bodyMedium)
|
|
252
|
+
Spacer(Modifier.height(16.dp))
|
|
253
|
+
TextButton(
|
|
254
|
+
onClick = {},
|
|
255
|
+
modifier = Modifier.align(Alignment.End),
|
|
256
|
+
) { Text("ACTION") }
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
- **Jetpack Compose is Material Design.** Use `MaterialTheme`, `Card`, `Scaffold`, `TopAppBar`, and `FloatingActionButton` as-is.
|
|
265
|
+
- Map the universal palette into `lightColorScheme()` or `darkColorScheme()`.
|
|
266
|
+
- Use `MaterialTheme.typography` for the complete type scale.
|
|
267
|
+
- Motion uses `animateFloatAsState` with Material easing: `FastOutSlowInEasing` (equivalent to `cubic-bezier(0.4, 0.0, 0.2, 1)`).
|
|
268
|
+
|
|
269
|
+
## Do's and Don'ts
|
|
270
|
+
- **DO**: Use the standard Material easing curves for animations (`cubic-bezier(0.4, 0.0, 0.2, 1)`).
|
|
271
|
+
- **DON'T**: Mix overlapping shadows arbitrarily. Elements should clearly sit 'above' or 'below' others.
|
|
272
|
+
|
|
273
|
+
## Limitations
|
|
274
|
+
- This is a styling reference and does not replace environment-specific validation, accessibility testing, or expert review.
|
|
275
|
+
- Ensure appropriate contrast ratios and responsive behaviors are verified separately.
|