-
Notifications
You must be signed in to change notification settings - Fork 25
Toolkit: Cocoa
Make sure to read how to turn Figma layers into views first to get a basic understanding about how FigmaSharp renders views. This page will build on top of that.
Spec version: 0.1
Cocoa has these special kinds of container views:
πΉ Window
πΉ Sheet
πΉ Popover
A Properties
group inside a component shows customization options that can be set or toggled. Hide/show layers to disable/enable these properties an example for a πΉ Window
:
πΉ Window
- Properties
π close
π min
π max
π· title
π modal
π resizable
π centered
π transparent
An Alert
is a very common composition of controls.
|
+---+ Alert
| |---- image "Icon"
| |---- text "Message"
| |---- text "Information"
| |---+ "Accessories"
| |--- πΉ Checkbox "Suppression"
| |---+ "Response Buttons"
| | |- πΉ Button
| | |- πΉ Button
| |--- πΉ Window
|
This is convenience group that gets translated into an Alert
with all its properties. Use "Accessories"
to add your custom controls.
πΉ Popover
has different component variations depending on the orientation of the balloon. Use the one you want depending on which side of the balloon you'd like to be anchored.
Some controls have Small
and Large
variations. These work exactly the same as their standard counterparts.
πΉ Button
πΉ Pop Up Button
πΉ Pull Down Button
πΉ Checkbox
πΉ Radio
πΉ Checkbox
and πΉ Radio
have π On
/ π Off
groups inside to set its default state.
πΉ Radio
components placed in the same group modify the same option.
πΉ Textfield
πΉ Multiline Textfield
πΉ Combo Box
The π· Placeholder
layer contains the placeholder text shown when no text is in the field.
πΉ Table
πΉ Progress Bar
πΉ Progress Spinner
πΉ Progress Bar
has a π Indeterminate
layer to reflect that state.
π· Interactive Label/Standard
π· Interactive Label/Small
π· Interactive Label/Large
π· Non-interactive Label/Standard
π· Non-interactive Label/Small
Every colour you pick from the colour styles will be converted to a named colour value on macOS. For example, Text/Label Secondary
is turned into NSColor.NSSecondaryLabelColor
, and System/Green
becomes NSColor.SystemGreen
.
This mainly specifies the geometry and constraints. A lookup is done for a matching NSImage on the system. This can also be overridden in code.
- image "NSComputer"
- label 1:https://www.microsoft.com/ 2:https://www.figma.com/
FigmaSharp will automatically replace underlined text with clickable links.
-
Design:
Code:
-
Toolkits
-
Development