You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesi贸n a prueba de IA

Antes: $249

Currency
$209
Suscr铆bete

Termina en:

1 D铆as
4 Hrs
13 Min
49 Seg
Curso de Figma

Curso de Figma

Santiago Camargo

Santiago Camargo

Variables y Estilos en Figma

15/22
Resources

What are variables in Figma and why are they important?

Variables in design are often a crucial issue for the reusability and consistency of elements in an interface. With Figma, it is possible to assign values that appear recurrently, such as colors, numbers or texts, which facilitates the designer's work. Here we will explore the four types of variables that can be created in Figma and how they contribute to a more efficient and flexible interface.

What are the types of variables in Figma?

In Figma, we can define:

  1. Color variables: Ideal for defining color palettes that are recurrently used in a project.
  2. Numerical variables: Useful for parameters such as padding, margins, borders, etc.
  3. Text variables (strings): Allow to assign specific recurring texts, such as a call to action.
  4. Boolean variables: Indicate states such as "on" or "off" in interactive elements.

How are variables created?

To begin with, it is essential to have a professional license active (such as the Platzi license). In the design properties bar, you can access the local variables menu to create new variables. By selecting "create variable", Figma will allow you to choose between variable types: color, number, string or boolean.

For example, by creating a color variable and calling it "white", you can easily apply it to different interface elements. If you then decide to change the color value to a reddish tone, this change will be automatically applied to all elements that used the variable "white".

How are variables assigned to elements?

Once variables are created, it is easy to assign them to elements such as rectangles or buttons in the design. When you apply a variable, the affected elements will show a small border in the fill in the properties bar, indicating that they are using a particular variable. If you need to change the variable, this action will take you directly to the library where that value comes from.

How are variables integrated into different display modes?

Variables make it easy to manage different display settings, such as dark and light modes. In dark mode, the background could be a dark color and the typography a light color. In light mode, this is reversed. Thanks to the variables, switching from one mode to another is simply a matter of reassigning these variables, and the values are updated automatically.

What are styles and how are they created in Figma?

Styles in Figma are a way of grouping multiple variables in one place. This allows you to have a quick and consistent design reference throughout the interface. For example, you could create a gradient style that combines multiple colors from your palette.

To create a style:

  1. Select the element you want to style.
  2. Apply the corresponding variables.
  3. In the "apply styles and variables" option, select "add new style".
  4. Name the style and save it.

Styles are not within the same library as variables, but they are saved as local styles within the file and can be applied to new elements easily.

How do these tools promote consistency in design?

Figma variables and styles are essential to generate consistency in an interface. They facilitate the control and management of colors, fonts, and sizes, which ensures that each component looks uniform throughout the interface. This not only saves time, but also improves the quality of the design and its ability to adapt to future changes.

With this knowledge, you can now integrate variables and styles into your Figma projects to optimize and professionalize your design workflow. Continuing to explore these tools will help you create high-level prototypes and prepare the interface for future iterations and growth.

Contributions 7

Questions 1

Sort by:

Want to see more contributions, questions and answers from the community?

Santiago, 驴cu谩ndo consideras que es m谩s conveniente usar estilos y cuando variables? para color o para textos
A pesar de que el curso es casi nuevo, e notado que algunos iconos y comandos han cambiado, en este caso el icono de cambiar de light a dark, me aparece como se ve en la imagen compartida. Y para que cambie de color el componente apenas este sobre un frame , hay que oprimir el boton (Auto) Espero sirva de ayuda :) ![](https://static.platzi.com/media/user_upload/image-fb4ba7d6-62ef-47ab-b0f0-c8d8f7ba2736.jpg)
Al parecer hay una clase que no se esta visualizando, al inicio se habla de variantes y propiedades, pero no logr贸 visualizar ese contenido en la ruta y en la clase pasada no est谩 este contenido.
Tambi茅n se pueden definir variables de la siguiente manera ![](https://static.platzi.com/media/user_upload/image-f540251d-e9b9-49bf-9ba8-6a3f9d74c997.jpg)
ojala se pueda en el community
* En el mundo de los componentes y en la misi贸n de reutilizar lo m谩s posible, siempre que dise帽amos software nos encontramos con este reto de saber exactamente qu茅 valor estamos utilizando * Ya sea color, n煤mero, texto que queremos utilizar varias veces en nuestra interfaz * Vamos a ver el tema de variables ojo no variantes * Que nos permite verificar los valores que va a ser recurrente a lo largo de la interfaz * Existen cuatro tipos diferentes en Figma: * Variables de color,聽 * num茅ricas,聽 * String o texto,聽 * Boolean o Boleanas * Podemos poner nuestra apariencia con fondo negro o blanco dependiendo de la necesidad para el trabajo * Mis variables se actualizan seg煤n el fondo, por ejemplo este bot贸n en modo negro se ve verde pero en modo blanco se ve oscuro * Ahora que ya comprendemos, Los diferentes tipos de variables Que podemos manipular, configurar, incluso Autor referenciar, hay otra cosa importante tener en cuenta * Los estilos: tener las variables en un solo lugar,tenemos un frame de ejemplo donde estamos dando la caracter铆sticas principales, en este caso del ejemplo vamos a crear un estilo donde siempre vamos a crear la gradiente que vamos a utilizar en nuestros dem谩s frames * En aplicar estilos y variables voy a decirle que quiero agregar una nueva * Esto es una variable degradante oscuro as铆 que en el nombre le pongo Dark, es importante llevar un orden desde el principio para que nuestro proyecto sea r谩pido, f谩cil y coherente * Voy a ver qu茅 est谩s variables con estos estilos se graban dentro del archivo * Van a aparecer aqu铆 como estilos locales, particularmente este gradient \_Dark * Fill o relleno, clic en los cuatro puntos * Le damos en los estilos locales, y podemos ver que ya te tenemos nuestra radiante aplicada que sigue el mismo flujo de variables * Es uno de ellos pero tal vez el m谩s importante, es el estilo de la tipograf铆a que estamos utilizando y para nuestro proyecto en particular tenemos estos estilos: Manrope * Como en todas las tipograf铆as puedo darles diferentes variantes, simplemente voy a llamar todas estas decisiones de tipos de tipograf铆a una decisi贸n global * Create new text style * Si quiero volver a la caracter铆stica de mi texto ya guardado o sea la variante, voy a Text Styles y selecciono mi estilo ya creado
Tengo un problema, en el min 7:53 cuando muevo el componente del frame light al frame dark el boton de descarga no se actualiza no se que hacer para que me funcione :c