Skip to content

make built-in-components extensible with custom CSS classes #7162

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

Open
Brodan opened this issue May 14, 2025 · 0 comments
Open

make built-in-components extensible with custom CSS classes #7162

Brodan opened this issue May 14, 2025 · 0 comments
Labels
feature/markdown-parsing Related to how Fern Docs processes markdown or MDX files product/docs Fern Docs which builds and hosts a developer documentation site

Comments

@Brodan
Copy link

Brodan commented May 14, 2025

Which Fern component?

Fern Docs

How important is this?

P2 - Medium (Would be helpful)

What's the feature?

The built-in components that Fern offers are fairly limited as soon as any customization is required because any classes applied to them are ignored.

Example, say I'm used a Card component and want to add a custom CSS class:

<Card className="red-card" title="Red Card" href="/docs/red">

with the following CSS class:

.red-card {
    color: red;
}

The red-card class is completely ignored. Ideally, I think it would make sense for classes to be allowed and for their styles to override the default Card component styles.

Any alternatives?

There are work-arounds which involve wrapping the built-in components in regular HTML components and using CSS selectors to apply styles but it's more hacky and time-consuming then it should be and additional CSS classes feel like something that should be supported out of the box.

@dannysheridan dannysheridan added product/docs Fern Docs which builds and hosts a developer documentation site feature/markdown-parsing Related to how Fern Docs processes markdown or MDX files labels May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/markdown-parsing Related to how Fern Docs processes markdown or MDX files product/docs Fern Docs which builds and hosts a developer documentation site
Development

No branches or pull requests

2 participants