Layout Transitions logo

Layout Transitions

Community
joaquimftt-web
layout-transitions

Use when reordering a controlled list without losing input state, replacing an initial skeleton with ready content, highlighting a real controlled value change, or expanding controlled cards in the same page flow in React.

Overview

Publisherjoaquimftt-web
Repositoryterra-motion-skills
Skill namelayout-transitions
Stars
3
Forks
0
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by joaquimftt-web on GitHub. Read the source before you install it.

Installation

Install the Layout Transitions AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/joaquimftt-web/terra-motion-skills/tree/main/skills/layout-transitions
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/joaquimftt-web/terra-motion-skills.git /tmp/terra-motion-skills
mkdir -p .claude/skills
cp -r /tmp/terra-motion-skills/skills/layout-transitions .claude/skills/layout-transitions
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Layout Transitions in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Layout Transitions on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Layout Transitions is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Layout transitions

Aplicação

  1. Identifique a fonte de verdade no consumidor: ordem/ids, loading ou value. Escolha somente a recipe correspondente; a biblioteca não controla operações de negócio.
  2. Para uma lista que muda de posição, use M09 Layout Reflow com ids estáveis e reflowKey alterado somente por intenção de reorganização. Confirme a ordem real do DOM e a mesma identidade dos inputs após o movimento.
  3. Para a primeira disponibilidade de conteúdo, use M10 Skeleton-to-Content. Quando já houve conteúdo, reloading o conserva interativo e marca busy. Se o produto exigir ocultar dados anteriores, defina outra política explícita no produto; não retire foco por remount automático.
  4. Para uma alteração verdadeira de dado, use M11 Data Change Feedback. Passe o valor exato, formate no consumidor e verifique que a apresentação nova chega antes do efeito decorativo.
  5. Verifique os exports compilados e execute os cenários aplicáveis abaixo. Conclua somente quando os controles, o dado/DOM e o código demonstrado coincidirem.

Parâmetros

RecipeFonte controladaDefault visualLimite relevante
LayoutReflowitems e reflowKeyduration 240 msids strings únicos; ul/li; só posição
SkeletonToContentloadingduration 180 msduração só da borda decorativa; conteúdo imediato
DataChangeFeedbackvalue string/numberduration 220 mssem interpolação; Object.is identifica mudança

Todas aceitam reduceMotion e ref nativa; sistema reduzido prevalece, zero é imediato e durações negativas/não finitas são erro. Nenhum CSS externo é necessário. M10 aceita minBlockSize em px (number) ou unidade CSS conhecida (string); isso não elimina layout shift universal. M10 announcement é polite por padrão e off remove status/live; M11 announcement é off por padrão e polite usa somente o valor atual. Evite regiões de anúncio concorrentes.

Contratos completos: L3_CONTRACTS.md. Para as regras particulares, consulte M09, M10 e M11.

Exemplo

Exemplos completos, compilados em TypeScript strict contra dist e manifests públicos:

tsx
import { useState } from 'react';
import { LayoutReflow } from '@motion-skills-lab/motion-recipes/layout-reflow';

export function OrderedNotes() {
  const [ids, setIds] = useState(['a', 'b', 'c']);
  const [intent, setIntent] = useState(0);
  return (
    <>
      <button
        type="button"
        onClick={() => {
          setIds((v) => [...v].reverse());
          setIntent((v) => v + 1);
        }}
      >
        Reordenar
      </button>
      <LayoutReflow
        reflowKey={intent}
        aria-label="Notas"
        duration={240}
        items={ids.map((id) => ({
          id,
          content: (
            <label>
              Nota {id}
              <input defaultValue="" />
            </label>
          ),
        }))}
      />
    </>
  );
}
tsx
import { useState } from 'react';
import { SkeletonToContent } from '@motion-skills-lab/motion-recipes/skeleton-to-content';

export function ContentAvailability() {
  const [loading, setLoading] = useState(true);
  return (
    <>
      <button type="button" onClick={() => setLoading((v) => !v)}>
        Alternar disponibilidade
      </button>
      <SkeletonToContent
        loading={loading}
        skeleton={<p>Preparando conteúdo…</p>}
        minBlockSize={120}
        duration={180}
      >
        <label>
          Nota real
          <input defaultValue="Preservada em recargas" />
        </label>
      </SkeletonToContent>
    </>
  );
}
tsx
import { useState } from 'react';
import { DataChangeFeedback } from '@motion-skills-lab/motion-recipes/data-change-feedback';

export function ExactData() {
  const [value, setValue] = useState('R$ 1.234,56');
  return (
    <>
      <button
        type="button"
        onClick={() => setValue((v) => (v === 'R$ 1.234,56' ? 'R$ 9.876,54' : 'R$ 1.234,56'))}
      >
        Trocar dado de demonstração
      </button>
      <DataChangeFeedback value={value} duration={220} announcement="off" />
    </>
  );
}

Restrições

  • M09 não é drag-and-drop, shared element ou router. O consumidor transfere foco antes de excluir o próprio item focado; reordenação preserva nós, remoção não promete restauração de foco.
  • ReflowKey estável não solicita nova animação. Geometria sem suporte e contexto de SSR usam lista estática. Conteúdo interno pode ter seu próprio transform; o li de posição pertence à recipe.
  • M10 não espera animação para liberar conteúdo e não executa requests, timeout de sucesso ou presença de M03. Skeleton é decorativo, sem controle falso operável. Uma nova instância pode iniciar outro carregamento; preserve o estado da instância enquanto precisar conservar foco.
  • M11 não faz parsing financeiro, polling, arredondamento automático ou cópia de valor anterior. Mudança de formatador altera a apresentação; não representa um novo value. Uma região polite pode anunciar esse novo texto formatado; escolha off quando o produto já anuncia o dado.
  • Estas recipes são neutras e não importam showcase ou assets Terra Commerce. Nenhuma aplica identidade visual da landing.

Acessibilidade

Use nomes acessíveis e ordem de leitura real. Verifique foco visível, Tab e Shift+Tab antes/depois de reordenar; não mova um input focado para outro nó por key de índice. Conteúdo real deve ser legível sem JS ou com falha de animação. Reduced motion inicial ou ao vivo encerra a decoração sem ocultar informação. O indicador textual de M11 continua disponível; nunca dependa somente da cor. No reloading de M10, o produto decide se operações precisam ser desabilitadas, pois o conteúdo permanece disponível.

Validação

  1. Build/exports e exemplos: pnpm check:consumer e pnpm validate:skills. Confirmar erros de tipos para ids numéricos, loading não booleano e formatadores que retornam elementos.
  2. Em 320/390/1024/1440 px: trocar ordem repetidamente, incluir/remover item, alterar duração 0/default/800, mudar viewport sem mudar reflowKey e preservar input/foco.
  3. Em M10: primeira carga, ready imediato, reloading com foco, mensagens longas, reserva conhecida/sem reserva, announcement off e reduced motion ao vivo.
  4. Em M11: valor igual em rerender, valor novo, update rápido, novo formatador, duração durante efeito, unmount e marcador estático com reduced motion.
  5. Executar SSR/hidratação saudável e o controle negativo que injeta mismatch real, fixture independente, axe, StrictMode e cleanup. Separar verificações executadas de limitações de navegador, leitor de tela, dispositivo e zoom nativo.

Diagnóstico: se M09 parece estático, confira reflowKey, foco/reduced motion e geometria antes de aumentar duração. Se M10 mantém conteúdo em loading, isso é revalidação deliberada, não atraso do skeleton. Se M11 parece alterar dado, compare value/formatValue do consumidor; a recipe não interpola valores.

M13 — Expandable Cards

Use para expandir um card no próprio fluxo mantendo preview, formulário, ordem DOM e seleção controlada. Para apenas reordenar use LayoutReflow; para disclosure vertical simples use AccordionTransition. Não use como modal/drawer, Shared Element entre páginas ou roteador.

Parâmetros: items com id/title strings, media opcional e preview/details ReactNode; selectedId string|null e onSelectedIdChange obrigatórios; duration280ms e reduceMotion=false; ref HTMLUListElement. Zero imediato, sistema prevalece. Não existe CSS obrigatório. Contrato e atributos públicos.

Procedimento para agentes: valide ids/seleção/duração; use dados imutáveis e keys estáveis nos slots; dê nome ao ul e contexto h2 para os títulos h3; escreva CSS do consumidor por data-expanded/data-peer/data-lone; não anime transform/opacidade em concorrência. Em SSR, mesmos dados/seleção e identifierPrefix exclusivo por root. Não copie identidade mineral para biblioteca.

tsx
import { useState } from 'react';
import { ExpandableCards } from '@motion-skills-lab/motion-recipes/expandable-cards';
export function ProjectCards() {
  const [selectedId, setSelectedId] = useState<string | null>(null);
  return (
    <section>
      <h2>Projetos</h2>
      <ExpandableCards
        aria-label="Projetos"
        items={[
          {
            id: 'a',
            title: 'Projeto A',
            preview: <input aria-label="Nota A" defaultValue="" />,
            details: <p>Detalhes A</p>,
          },
          {
            id: 'b',
            title: 'Projeto B',
            preview: <p>Resumo B</p>,
            details: <a href="#next">Continuar</a>,
          },
        ]}
        selectedId={selectedId}
        onSelectedIdChange={setSelectedId}
        duration={280}
      />
    </section>
  );
}

Validação obrigatória: foco externo antes de hidden/removal, falha de focus conserva DOM acessível; A→B→C/Escape/Tab/ShiftTab; input persiste enquanto item existe; empty fallback nomeado; duração0/default/800 e mudança ao vivo; reduced motion inicial/ao vivo; 320/390/1024/1440 sem overflow; imagem tardia; projeção intermediária real; SSR/hidratação e negativo; duas instâncias/roots; StrictMode/cleanup e consumidor só dist. Nenhum teste planejado deve ser declarado executado. Conteúdo longo, imagens/traduções e zoom exigem validação real do produto.

Frequently asked questions

What does the Layout Transitions AI skill do?

Use when reordering a controlled list without losing input state, replacing an initial skeleton with ready content, highlighting a real controlled value change, or expanding controlled cards in the same page flow in React.

Why use Layout Transitions on TypingMind?

Because you install it once and use it with any model. Layout Transitions is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Layout Transitions in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/joaquimftt-web/terra-motion-skills/tree/main/skills/layout-transitions. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Layout Transitions?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Layout Transitions?

As many as you like. As long as a model supports skills, you can use Layout Transitions with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Layout Transitions AI skill free?

Yes. It is published on GitHub by joaquimftt-web under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇