Skip to content
Theme UI
GitHub

Close

Button with close (×) icon.

import { Close } from 'theme-ui'

The Close component renders as a <button> element by default. Pass any button attributes as props to the component.

Variants

Close component variants can be defined in the theme.buttons object. The Close component uses theme.buttons.close as its default variant style.

// example theme variants
{
buttons: {
close: {
color: 'primary',
}
}
}
Edit the page on GitHub
Previous:
Badge
Next:
Alert