Introducci贸n a Figma y Dise帽o B谩sico
Crea el feature de tu app en 7min
Canvas y Navegaci贸n en Figma
Crea Formas y Estructuras B谩sicas en Figma
Introducci贸n a formas y l铆neas
Estructuras complejas: duplicaci贸n y edici贸n de formas en Figma
Rellenos, Im谩genes y Gradientes en Figma
Organizaci贸n de Proyectos
Creaci贸n de Vectores desde Cero
Utiliza vectores para crear una ruta
Frames, Grupos y Organizaci贸n de Dise帽o
Aplicaci贸n de Efectos y Escalado en Figma
Auto-Layout para Dise帽os Responsivos
Auto-Layout para Dise帽os Responsivos - Parte 2
Componentes y Estilos
Desarrolla tu proyecto con Apata
Creaci贸n y Gesti贸n de Componentes en Figma
Variables y Estilos en Figma
Prototipado B谩sico en Figma: Creaci贸n de Flujos Interactivos
Herramientas Avanzadas
Prototipado Avanzado: Animaciones y Transiciones
Protipado 3
Protipado 4
Simetr铆a rotacional
Gu铆as, ret铆culas y buenas pr谩cticas en Figma
AI en Figma: Automatizaci贸n y Mejora de Prototipos
You don't have access to this class
Keep learning! Join and start boosting your career
Welcome to the world of advanced prototyping in Figma! If you're already here, it's because you've mastered the basics and are ready to move up a level. In this lesson, we'll explore how to use components, variants, and variables to create multiple actions in a prototype. Get ready to take your design skills to amazing heights and experience more fluid and natural interactions.
A common case when designing interfaces is wanting a single click to trigger multiple actions. Imagine you have a button that not only saves a path, but also displays a confirmation notification.
// Assuming you have a component with two variants:'saved' and 'unsaved'const botonGuardar = document.getElementById('botonGuardar');// First action: switch from 'unsaved' to 'saved'botonGuardar.addEventListener('click', () => { changeButtonState('saved'); showToast('SavedPath');});function showToast(message) { const toast = document.createElement('div'); toast.innerText = message; document.body.appendChild(toast); setTimeout((() => { toast.remove(); }, 1200); // Time for message to disappear}
In this example, the button triggers a state change and displays a Toast message, all with a single click. Note that the time for the Toast to appear can be adjusted to provide a better user experience.
Variables allow you to dynamically manage the state of prototype elements. Suppose you are working with a filter that shows or hides paths that have or don't have trees.
// Using boolean variables to change visibilitylet showTreesOnly = true;function toggleFilterTrees() { showTreesOnly = !showTreesOnly; updatePathVisibility();}function updatePathVisibility() { const paths = document.querySelectorAll('.path'); paths.forEach((path) => { if (path.classList.contains('noTrees') && !showTreesOnly) { path.style.display = 'none'; } else { path.style.display = 'block'; } } } );} }
Thus, you can manage the visibility of trails by toggling between showing all or only those with trees, improving the interactivity and usability of your application.
By merging component states with variables, you can achieve a high level of control over interactions. Consider a scenario where clicking on a filter not only changes its graphical state, but also modifies a variable that controls which elements are visible.
// Generalizing a function that changes the state and sets a variablefunction changeStateAndVariable(button, variable, value) { button.addEventListener('click', () => { variable = value; updateInterface(); });}const filterTreesBtn = document.getElementById('filterTrees');changeStateAndVariable(filterTreesBtn, showOnlyWithTrees, true);function updateInterface() { // Updates elements according to the new value of variables // Here are functions that update the visibility of paths and change the graphical state of the filter updatePathVisibility();}
This code implements complex interactions that bring realism to the interactive simulation. With each click, the prototype responds to give more veracity to the user experience, simulating the operation of a real application.
Figma becomes, in your hands, a powerful tool that transcends from static to dynamic design, making tangible any interactive idea you can imagine.
Contributions 10
Questions 1
Want to see more contributions, questions and answers from the community?