Web制作、Web開発の歩き方

エンジニアにも使いやすいFigma入門

■第3話:グループ、フレーム、コンポーネント

(最終更新日:2023.07.27)

Figmaのイメージ
この記事は5分で読めます!
(絵が小さい場合はスマホを横に)

「効率的に作りたい!」
場当たり的に作りたいデザインから作ってしまうと、統一感がなく、どうしても非効率な作り方になってしまいがちである。 前回のカラースタイルとテキストスタイルに関してもそうだが、 良くつかうものに関しては部品化、構成要素として保存しておくことがベターである。 今回はそんなデザインの構成要素を作成するための、グループ、フレーム、コンポーネントについて説明する。


1.レイアウトグリッドの表示

いよいよ、本格的に中身のデザインについて説明しよう。 とその前に一つだけ下準備をしておこう。 今の作製画面のままでは、コンテンツの位置が把握しにくい。そこでグリッド線を有効にする必要がある。 画面(iPhone14)のフレームを選択し、レイアウトグリッドの+ボタンを押す。 すると画面に格子状の線(グリッド線)が現れる。線の間隔は変更可能であるが、ひとまずデフォルトの10pxで大丈夫だろう。 これで、コンテンツの位置調節をバッチリできるはずだ。

レイアウトグリッドの表示

2.グループ化

グループ化はパワーポイントで使うグループ化とほぼ同じである。 マウスで複数箇所を選んで、右クリックでグループ化を選べばグループ化できる。 例えば、写真と文章をグループ化した場合、 その大きさを変更した際は、いずれも大きさに追従して大きさや文字配置が変化する。 それらの背景色を変えることはできない。

グループ化は中身の大きさを調整する

3.フレーム化

フレーム化もグループ化とほぼ同様の操作で行うことができる。 対象とする複数箇所をマウスで選択して、右クリックを押してフレーム化を選ぶだけである。 フレーム化の特徴としては、背景色を入れられるというのと、 フレームの大きさの変更に対して画像、文字が追従しないということである。 (設定により、追従させることもできるが、デフォルトはしない)

また、オートレイアウト機能により、フレーム中のコンテンツの位置を調整することができる。 下図は上下左右中央寄せした例である。右上寄せ、左下寄せなども可能で、数値で調整することもできる。 コンテンツの大きさを維持し、余白を付けたい場合はフレームが向いている。

Fontフレームを作成し、テキストスタイルを登録する

4.コンポーネント化

コンポーネントは、一言で言えばひな形である。繰り返し使う部品をコンポーネントとして定義することができる。 コンポーネント化は、まとめたいパーツを複数選択した後、上にあるコンポーネントボタンを押せばできる。 下図では、ペンギンの画像と「今日のメニュー」という文字、背景色をコンポーネントとして作成した。 コンポーネント化の良いところは、コピー(インスタンス)を生成できる点である。 下図右では、新たにインスタンスを作成し、画像をエビに、文字を「明日のメニュー」に変更した。 インスタンス化する利点は、元のフォーマットを維持しながら一部中身を変更できる点である。 もしこの状態で、コンポーネント側の背景色を緑にしたら、インスタンスであるエビの背景色も緑になる。 フォーマット自体を一括変更できるのが良い。

コンポーネント化し(左)、インスタンスを作成、画像を変更(右)

5.まとめ

今回はFigmaのグループ化、フレーム化、コンポーネント化について説明した。 特に最後のコンポーネント化は前回のカラースタイル、フォントスタイルと同様、 デザインに統一感をもたらすのに非常に重要な役割を果たす。簡単なものからで良いので使えるようになろう。

▼参考図書、サイト

   Figma公式サイト figma.com
   Figmaの使い方 「完全攻略」 基本編を分かりやすく解説!【2022年最新版】 Uチャンネル(YouTube)
   のんびり学ぶ Figma 〜コンポーネント編〜 SAKURA internet

Easy Figma Guide for Engineers ■Episode 3: Groups, Frames, and Components (Last updated: 2023.07.27) Figma illustration You can read this article in 5 minutes! (If the images are small, rotate your phone horizontally) "I want to work efficiently!" If you create your design impulsively without a plan, it tends to lack consistency and become inefficient. As mentioned in the previous episode about color and text styles, it’s better to save frequently used elements as reusable parts. In this episode, we’ll explain the design building blocks: Groups, Frames, and Components. [Table of Contents] Showing the Layout Grid Grouping Framing Componentization Summary 1. Showing the Layout Grid Let’s dive into the real design work. But first, a bit of preparation. With the current editing screen, it’s hard to align elements precisely. So we need to enable the grid lines. Select the iPhone 14 frame, then click the "+" button under Layout Grid. You’ll see a mesh of grid lines appear. You can change the spacing, but for now, the default 10px is fine. With this, positioning elements should become much easier. Layout Grid Display 2. Grouping Grouping in Figma is quite similar to grouping in PowerPoint. You can select multiple items with your mouse, right-click, and choose "Group". For example, if you group an image and text, resizing the group will cause both the image and the text to scale accordingly. However, you cannot set a background color on a group. Grouping adjusts the content size together 3. Framing Framing works almost the same way as grouping. Select multiple elements and right-click to choose "Frame". The key features of a frame are: you can add a background color, and the content inside does not resize with the frame by default (though you can change this in settings). Frames also support auto layout, which lets you control the alignment of inner elements—like centering them vertically and horizontally, or anchoring them to the top right or bottom left, with adjustable margins. If you want to maintain the content size while adding padding, frames are ideal. Create font frames and register text styles 4. Componentization Components are, simply put, templates. You can define reusable parts as components. To create one, select the parts you want to include and click the component button at the top. In the example below, the image of a penguin, the text "Today’s Menu", and a background color are made into a component. The best part about components is that you can create instances (copies) of them. On the right in the image, we’ve created an instance with the image replaced by a shrimp and the text changed to "Tomorrow’s Menu". The benefit of instances is that you can change the contents while keeping the overall format. If you later change the background color of the original component to green, the instance with the shrimp will also have a green background. This makes it easy to update designs uniformly. Component (left) and its instance with a modified image (right) 5. Summary In this episode, we covered grouping, framing, and componentization in Figma. Especially the last one—components—play an essential role in maintaining design consistency, just like color and text styles introduced in the previous article. Start with simple ones and make components a part of your workflow. ▼References    Official Figma Website – figma.com    Complete Beginner Guide to Figma [2022 Edition] – U Channel (YouTube)    Learn Figma Leisurely – Components – SAKURA internet