---
title: FilledButton
description: FilledButton API.
---

import CodeSnippetMD from '@slint/common-files/src/components/CodeSnippetMD.astro';
import SlintProperty from '@slint/common-files/src/components/SlintProperty.astro';

<CodeSnippetMD imagePath="/src/assets/generated/filledbutton.png" scale="3" imageWidth="300" imageHeight="200" imageAlt="">
```slint
import { FilledButton } from "@material";
export component Example inherits Window {
    width: 200px;
    height: 100px;
    background: transparent;
    FilledButton {
        text: "Click me";
        width: 120px;
        height: 40px;
    }
}
```
</CodeSnippetMD>

A `FilledButton` is a button with a solid background color that represents the primary action in a user interface. It's the most prominent button style and should be used sparingly.

## Properties

### enabled
<SlintProperty propName="enabled" typeName="bool" defaultValue="true">
Whether the button is enabled and can be interacted with.
</SlintProperty>

### icon
<SlintProperty propName="icon" typeName="image">
An optional icon displayed on the button.
</SlintProperty>

### text
<SlintProperty propName="text" typeName="string">
The text label displayed on the button.
</SlintProperty>

### tooltip
<SlintProperty propName="tooltip" typeName="string">
A tooltip text that appears when hovering over the button.
</SlintProperty>

## Callbacks

### clicked()
Invoked when the button is clicked.
