Skip to content

TimelineItem "classes" object prop is not applied #1889

@alksily

Description

@alksily

Description

The TimelineItem component fails to apply styles passed through the modern classes object property. However, the deprecated h3Class property still works. This prevents migration to the new API and indicates that the component logic is not correctly prioritizing or merging the classes object.

Minimal Reproduction

{@const params = {
    class: 'mb-2 ms-1',
    h3Class: 'text-sm', // <-- This works (deprecated)
    classes: { h3: 'text-sm' }, // <-- This does not work
}}

<TimelineItem title="test" {...params}>
    Hello world!
</TimelineItem>

Steps to Reproduce

  1. Use the TimelineItem component.
  2. Pass a configuration object where h3Class is defined and a classes object with an h3 key is also defined.
  3. Observe which styles are applied to the h3 element.

Environment

System:
  OS: macOS 26.2
  CPU: (10) arm64 Apple M2 Pro
  Memory: 150.05 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 24.7.0 - /Users/alksily/.nvm/versions/node/v24.7.0/bin/node
  Yarn: 1.22.22 - /Users/alksily/.nvm/versions/node/v24.7.0/bin/yarn
  npm: 11.5.1 - /Users/alksily/.nvm/versions/node/v24.7.0/bin/npm
  pnpm: 8.15.4 - /opt/homebrew/bin/pnpm
Browsers:
  Safari: 26.2
npmPackages:
  @sveltejs/kit: ^2.49.2 => 2.49.2 
  flowbite: ^3.1.2 => 3.1.2 
  flowbite-svelte: 1.31.0 => 1.31.0 
  svelte: ^5.46.0 => 5.46.0 
  vite: ^7.3.0 => 7.3.0

Relevant Logs / Console Output

The following "TimelineItem" props are deprecated: "h3Class".
💡 Please use the "classes" prop instead.
Migration example: classes={{ h3: "text-sm" }}

Screenshots / GIF (optional)

No response

Additional Context (optional)

No response

Checklist

  • I have searched existing issues and discussions
  • I have provided a minimal and runnable reproduction
  • I am using the latest version of Flowbite-Svelte

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions