# CloseButton
`{% closebutton %}` is a **built-in** tag for a **dismiss button** —
the small ✕ you put on dialogs, alerts, chips, and panels. It renders a Mantine
CloseButton, which ships the ✕ glyph and an accessible default name ("Close button") for
free.
Use it as `{% closebutton %}` in Markdown, or call it from Python
logic (loops, snippets) via `component('aardvark', 'closebutton', …)`.
Source: Markdown
```aardvark
{% closebutton %}
```
Source: Python
```python
component('aardvark', 'closebutton')
```
## Size and radius
`size` accepts `xs`–`xl`; `radius` accepts `xs`–`xl` or any CSS value.
Source: Markdown
```aardvark
{% closebutton size='xs' %}
{% closebutton size='sm' %}
{% closebutton size='md' %}
{% closebutton size='lg' %}
{% closebutton size='xl' radius='xl' %}
```
Source: Python
```python
for s in ('xs', 'sm', 'md', 'lg'):
component('aardvark', 'closebutton', size=s)
component('aardvark', 'closebutton', size='xl', radius='xl')
```
## Variant and color
`variant` is `subtle` (default) or `transparent`; `color` takes any theme or CSS color.
Source: Markdown
```aardvark
{% closebutton variant='subtle' %}
{% closebutton variant='transparent' %}
{% closebutton color='red' %}
{% closebutton color='grape' %}
```
Source: Python
```python
component('aardvark', 'closebutton', variant='subtle')
component('aardvark', 'closebutton', variant='transparent')
component('aardvark', 'closebutton', color='red')
component('aardvark', 'closebutton', color='grape')
```
## Custom icon
By default the button is a ✕. Pass an `icon` — any
[`{% icon %}`](/components/data-display/icon/) spec — to replace it
(e.g. a trash can for a delete action). When the glyph changes meaning, set a `label` so
screen readers name it correctly. Add `filled` for the filled Tabler style of a bare
Tabler name.
Source: Markdown
```aardvark
{% closebutton icon='trash' label='Remove' %}
{% closebutton icon='x' label='Dismiss' %}
```
Source: Python
```python
component('aardvark', 'closebutton', icon='trash', label='Remove')
component('aardvark', 'closebutton', icon='x', label='Dismiss')
```
## Accessible name
Mantine names the button "Close button" by default. Pass a `label` to override it when the
button does something more specific (the example above names it "Remove").
## Disabled
Source: Markdown
```aardvark
{% closebutton disabled=true %}
```
Source: Python
```python
component('aardvark', 'closebutton', disabled=True)
```
## With other components
A close button belongs in the corner of a dismissible surface — here in the top-right of a
[callout](/components/feedback/callout/), laid out with a
`{% group %}`:
Heads up — you have unsaved changes.
Source: Markdown
```aardvark
{% callout severity='info' %}
{% group justify='space-between' %}
Heads up — you have unsaved changes.
{% closebutton label='Dismiss notice' %}
{% endGroup %}
{% endCallout %}
```
Source: Python
```python
component('aardvark', 'closebutton', label='Dismiss notice')
```
## Attributes
Omit any attribute to take its Mantine default. Bare boolean flags (`filled`, `disabled`)
set the option to `True`; in Python pass `=True`.
| Attribute | Valid values | Description |
| --- | --- | --- |
| `icon` | Tabler name / Font Awesome class / image path / emoji / inline `