dsfr4drupal-1.x-dev/components/button/button.component.yml
components/button/button.component.yml
name: DSFR - Button
description: The button is an element of interaction with the interface allowing the user to perform an action.
status: stable
group: DSFR
variants:
primary:
title: Primary
description: Component primary style
secondary:
title: Secondary
description: Component secondary style
tertiary:
title: Tertiary
description: Component tertiary style
props:
properties:
attributes:
type: Drupal\Core\Template\Attribute
title: Attributes
button_type:
type: string
title: Button type
default: button
enum:
- button
- reset
- submit
disabled:
type: boolean
title: Is disabled?
default: false
icon:
type: string
title: Icon
description: 'Example: "checkbox-line"'
icon_position:
type: string
title: Icon position
enum:
- left
- right
label:
type: string
title: Label
target:
type: string
target: Target attribute
description: 'Without "_" on prefix. External links have a target "_blank" attribute by default.'
title:
type: string
title: Title attribute
url:
type: string
title: URL
description: If you want a link to look like a button.
required:
- label
libraryOverrides:
dependencies:
- dsfr4drupal/component.button
