Avatar

Displays a user's profile image or initials.

Sizes

Fallback (Initials)


Button

A custom button element supporting variants, types, sizes, and states.

Variants

Primary Secondary Ghost Link Button

Sizes

Default Size Large Size Compact

States

Disabled Disabled Disabled Disabled

Icon Buttons

Button Types

Select Upload Visit Figma

Button Combo

Primary Secondary Disabled Action

Checkbox

A checkbox input for boolean selections.

States


Chit

A small visual indicator for colors, gradients, or images.

Types

Sizes

States


Combo Input

A text input with autocomplete suggestions from a predefined list.

Default

With Value


Dialog

A modal dialog window with optional dragging support.

Open Dialog

Open Dialog

Dialog Title

This is a draggable dialog. You can drag it by the header.

Cancel Save

Position Attribute

Use position attribute: center center, top left, top right, bottom left, bottom right, or combinations.

Center Top Left Top Right Bottom Left Bottom Right

Positioned Dialog

This dialog is positioned at a specific corner.

Close

Handle Attribute

Use the handle attribute to restrict dragging to a specific element. Pass a CSS selector like handle="fig-header". Dragging will only work when initiated from within that element. Interactive elements (buttons, inputs) within the handle are still excluded from triggering drag.

<dialog is="fig-dialog" drag="true" handle="fig-header">
  <fig-header>Drag only here</fig-header>
  <fig-content>Content won't trigger drag</fig-content>
</dialog>
Open Handle Demo

Drag Handle Demo

Try dragging from:

  • ✓ The header area (works)
  • ✗ This content area (won't drag)
  • ✗ The footer below (won't drag)
Close


Field

A form field container with label support.

Directions

Horizontal Fields with Different Inputs

Left Center Right

Fill Picker

A comprehensive fill picker supporting solid colors, gradients, images, video, and webcam.

Default (Auto-creates fig-chit)

With Initial Color

With Gradient

With fig-chit Child

Custom Trigger

Edit Fill

Without Alpha

Disabled

Mode Lockdown

Use the mode attribute to lock the picker to a single fill type. The dropdown is replaced with a label and tab switching is disabled.

Solid Only

Gradient Only

Image Only

Event Listening

Click the swatch above and change the color to see events.



Image

An image component with upload and download capabilities.

Sizes

With Upload

With Download


Input Angle

An angle input with a circular dial interface.

Default

With Text Display

Different Values


Input Color

A color picker input with optional text and alpha controls.

Swatch Only

With Text

With Alpha

Full Width

Various Colors

Picker Attribute

Use picker="figma" to use the FigFillPicker instead of the native color picker. Default is picker="native".

Native Picker (default)

Figma Picker

Figma Picker with Alpha

No Picker (text input only)

No Picker with Alpha

Width Test (Resizable)

Drag the right edge of each container to test at different widths.

Swatch Only

value="#FF5733"

Text Only

text="true"

Text + Alpha

text="true" alpha="true"

Picker="figma"

picker="figma"

Picker="figma" + Text

picker="figma" text="true"

Picker="figma" + Text + Alpha

picker="figma" text="true" alpha="true"

Picker="false" + Text

picker="false" text="true"

Picker="false" + Text + Alpha

picker="false" text="true" alpha="true"

Full Attribute

text="true" alpha="true" full

With Alpha in Value (#RRGGBBAA)

value="#8B008B80" text="true" alpha="true"

Picker="native" + Text + Alpha

picker="native" text="true" alpha="true"

Event Listening

Change the color above to see events.


Input Fill

A fill input that supports solid colors, gradients, images, and videos. The UI adapts based on the fill type.

Solid Color (default)

Solid Color with 50% Opacity

Linear Gradient

Radial Gradient

Angular Gradient

Image Fill

Image Fill (50% Opacity)

Video Fill

Webcam Fill

Disabled

Event Listening

Change the fill above to see events.


Input Joystick

A 2D joystick input for X/Y coordinate values.

Default (centered)

With Text Display

With Initial Value (25%, 75%)

Screen Coordinates (default: 0,0 = top-left)

Math Coordinates (0,0 = bottom-left)

With Field Label


Input Number

A numeric input with optional units and constraints.

Basic

With Units

With Transform

With Constraints

States

With Slots

% X

Input Text

A text input with various types and configurations.

Basic

With Value

Types

Multiline

States

With Slots

° 🔍

Full Width


Layer

A hierarchical layer component for displaying nested content with expand/collapse and visibility states.

Single Layer

Without Icon

Nested Layers (Expanded)

Collapsed Layers

Hidden Layer (Dimmed)

With Action Buttons

Deep Nesting

Selected Layers

Single Layer (Selected)

Without Icon (Selected)

Nested Layers (Selected Parent)

Collapsed Layers (Selected)

Hidden Layer (Selected)

With Action Buttons (Selected)

Deep Nesting (Selected Child)


Popover

A floating panel that appears on hover or click.

Hover Trigger

Hover me

Quick Info

Active Component

Click Trigger

Click me

Popover Title

With Form Content

Settings

Settings


Radio

Radio buttons for single selection from a group.

Radio Group

Another Group

Disabled


Segmented Control

A group of mutually exclusive options displayed as segments.

Default

One Two Three

Two Options

Left Right

Many Options

XS S M L XL

Shimmer

An animated gradient text effect for loading states or visual emphasis.

Horizontal (Default)

Loading content...

Vertical

Loading content...

Diagonal

Loading content...

Custom Duration (3s)

Slow shimmer effect

Paused

No animation

Slider

A range slider with various types and configurations.

Default

With Text Input

With Units

Variants

Opacity Type

Hue Type

Stepper Type

Delta Type

With Transform

Full Width


Spinner

A loading spinner indicator.

Default

In Context

Loading...

Switch

A toggle switch for on/off states.

States

Without Labels


Tabs

A tabbed interface for organizing content.

Default

Tab One Tab Two Tab Three

Content for Tab One. This is the default selected tab.

Content for Tab Two. Click the tab to see this content.

Content for Tab Three. Each tab can have different content.

Two Tabs

First Second First tab content Second tab content

Toast

A non-modal, time-based notification that appears at the bottom center of the screen.

Basic Toast

Show Toast

Your changes have been saved.

With Dismiss Button

Show Toast with Dismiss

File uploaded successfully.


With Action

Show Toast with Action

Item moved to trash.

Undo

No Auto-Dismiss

Show Persistent Toast

This toast won't auto-dismiss.

Close

Custom Duration (2 seconds)

Show Short Toast

This disappears quickly!

Custom Offset (64px)

Show Offset Toast

This toast is 64px from the bottom.

Themes

Dark (default) Light Danger Brand

Dark theme toast message.

Light theme toast message.

Danger theme toast message.

Brand theme toast message.


Tooltip

A small popup that appears on hover to provide additional information.

Default

Hover me

On Different Elements

Button Hover this text

Instant (No Delay)

No delay

Long Text

Long tooltip

Inline Usage

Some paragraph text with a tooltip for more information.


Icons

CSS mask-based icons using the .fig-mask-icon utility class. Icons inherit currentColor and can be sized with the --size variable.

Usage

Set the --icon CSS variable to any icon variable. Icons use currentColor so they inherit text color.

<span class="fig-mask-icon" style="--icon: var(--icon-add)"></span>

Available Icons

--icon-add --icon-minus --icon-back --icon-forward --icon-close --icon-rotate --icon-swap --icon-checkmark --icon-eyedropper --icon-steppers

Custom Size

Use the --size variable to adjust icon dimensions.

12px 16px 24px 32px

Color Inheritance

Icons inherit currentColor, so they match the parent's text color.

Inside Buttons

Add Item

HStack

A horizontal flex container for laying out elements in a row.

Basic Usage

Button 1 Button 2 Button 3

Mixed Elements

John Doe Follow

Form Controls

Apply

With Chips/Chits


VStack

A vertical flex container for laying out elements in a column.

Basic Usage

Button 1 Button 2 Button 3

Form Layout

Submit

Settings Panel

Nested Stacks

Alice Johnson Bob Smith Carol Williams

HR

A horizontal rule for visual separation of content.

Default

Content above the divider


Content below the divider

In a List

Item One
Item Two
Item Three

Section Separator

Section A

Some content for section A.


Section B

Some content for section B.


Code

Inline and block code formatting for displaying code snippets.

Inline Code

Use the fig-button component for buttons.

Code Block

<fig-button variant="primary">
  Click me
</fig-button>

Multiple Lines

const button = document.querySelector('fig-button');
button.addEventListener('click', () => {
  console.log('Button clicked!');
});

CSS Example

fig-button {
  --button-bg: var(--figma-color-bg-brand);
  --button-color: white;
  border-radius: 6px;
}

Details

A disclosure widget for expandable/collapsible content.

Default (Closed)

Click to expand

This is the hidden content that appears when the details element is expanded.

Default Open

Already expanded

This content is visible by default because of the open attribute.

Multiple Sections

Section One

Content for section one.

Section Two

Content for section two.

Section Three

Content for section three.

With Rich Content

Advanced Settings