Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown Button with Icon #905

Closed
buseselvi opened this issue Aug 22, 2024 · 3 comments · Fixed by #969
Closed

Dropdown Button with Icon #905

buseselvi opened this issue Aug 22, 2024 · 3 comments · Fixed by #969
Assignees
Labels
bl-dropdown Issues related with Dropdown Button component feature request Requesting a feature released on @beta

Comments

@buseselvi
Copy link
Contributor

buseselvi commented Aug 22, 2024

We decided to add icon attribute to the Dropdown Button component according to needs.
Here you can see the design documentation.

@buseselvi buseselvi converted this from a draft issue Aug 22, 2024
@buseselvi buseselvi added feature request Requesting a feature bl-dropdown Issues related with Dropdown Button component labels Sep 2, 2024
@mfurkan60
Copy link

Great work!

Icon Animations: Adding a subtle animation to the icon when the dropdown opens or closes can enhance the user experience.

Additionally, for the Icon Positioning section, incorporating a feature that allows users to adjust the icon size for the active state would provide flexibility.

@erbilnas
Copy link
Collaborator

erbilnas commented Dec 19, 2024

Adding Icon Attribute to Dropdown Button Component

Status

Accepted

Context

The dropdown button component needs to support an icon on its left side, which can be customized from the icon library. This enhancement will provide more flexibility in the visual representation of dropdown buttons and align with common UI patterns.

Decision

We will add a new icon attribute to the dropdown button component with the following characteristics:

  • The attribute will be optional
  • It will accept a string value representing the icon name from our icon library
  • The icon will be positioned on the left side of the button label
  • The right-side arrow icon will remain fixed and unchanged

Implementation Details

interface DropdownButtonProps {
  // ... existing props
  icon?: string; // Optional icon name from the icon library
}

Consequences

Positive

  • Enhanced visual customization options for dropdown buttons
  • Better alignment with modern UI patterns
  • Consistent with other button components that support icons
  • Improved user experience through visual indicators

Negative

  • Slight increase in component complexity
  • Additional documentation and maintenance required

Examples

<bl-dropdown icon="info">Dropdown with Info Icon</bl-dropdown>
<bl-dropdown icon="heart">Dropdown with Heart Icon</bl-dropdown>
<bl-dropdown icon="user">Dropdown with User Icon</bl-dropdown>

@erbilnas erbilnas moved this from ADR In Progress to Ready for Development in Baklava Design System Dec 20, 2024
@erbilnas erbilnas moved this from Ready for Development to In Review in Baklava Design System Dec 23, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in Baklava Design System Dec 23, 2024
@github-project-automation github-project-automation bot moved this from In Review to Done in Baklava Design System Dec 23, 2024
Copy link

🎉 This issue has been resolved in version 3.3.0-beta.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bl-dropdown Issues related with Dropdown Button component feature request Requesting a feature released on @beta
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants