How can I change the size of an ExpensionPanel's expand and collapse button?

1 Answer 26 Views
ExpansionPanel
Tomy
Top achievements
Rank 1
Tomy asked on 04 Mar 2025, 05:30 PM

I'm trying to add a simple expansion panel to my page. I need to use extra-large chevron-up down expand and collapse icons. I've tried creating an SvgIcon react element and setting its size that way, but I get a typescript error saying the element is missing the name. Is there a simple way to change the expand and collapse svg icon sizes on an ExpansionPanel? This is something I've tried so far:

 


const expandIcon = (
	<SvgIcon className="k-mb-xs k-mx-sm" icon={chevronUpIcon} size="xxlarge" />
);

return (
	<ExpansionPanel
		title={title}
		expanded={expanded}
		expandSVGIcon={expandIcon}
		onAction={(event) => {
			setExpanded(!event.expanded);
		}}
	>
		<span />
		<Reveal>
			{expanded && <ExpansionPanelContent>{children}</ExpansionPanelContent>}
		</Reveal>
	</ExpansionPanel>
);

1 Answer, 1 is accepted

Sort by
0
Hetali
Telerik team
answered on 06 Mar 2025, 06:09 PM

Hello Tomy,

In order to change the size of the expand and collapse icons in the KendoReact ExpansionPanel, use the following CSS that is the value of xxlarge size:

.k-expander .k-svg-icon {
  font-size: 32px; 
  width: 32px; 
  height: 32px
}

Output:

In this StackBlitz example, I have increased the size of the icons in the ExpansionPanel.

I hope this helps. Please let me know if I can further assist you.

Regards,
Hetali
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

Tags
ExpansionPanel
Asked by
Tomy
Top achievements
Rank 1
Answers by
Hetali
Telerik team
Share this question
or