Pular para o conteúdo principal

Accordion

Import

import { Accordion } from '@resultadosdigitais/tangram-components'

Properties

children

Typenode

Description

Sets the children.

title

Typestring | func | node

Description

Sets the title for the Accordion.

// Can be a string:
title="Title of my accordion"

// Can be a function:
title={() => <Text as="h3" token={Text.tokens.TEXT_MD_BOLD}>Title of my accordion</Text>}

// Or a node:
title={
<>
Title of my accordion
<Tag kind={Tag.kinds.primary}>My label</Tag>
</>
}

open

Typebool

Description

A boolean value to control if render opened or closed.

maxHeight

Typenumber | string

Description

Sets the max height of the container. If a number, the value will be automatically transformed into pixels. Unlimit if not set.

onChange

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.
ParamnewStateOrIndex boolean|number - When Accordion is trigged inside of the Accordion.Group

Description

Callback fired when the Accordion changes.

it is the current index of the Accordion. Otherwise, it is a boolean about the open state.

<AccordionGroup />

Import

import { AccordionGroup } from '@resultadosdigitais/tangram-components'

Properties

children

Typenode
Defaultnull
Description

Sets the children.

<AccordionTitle />

Import

import { AccordionTitle } from '@resultadosdigitais/tangram-components'

Properties

title 📍

Concerns
📍 Required
Typestring
Description

Sets the title.

Feedback