I followed this documentation and published the component. It's not available in the component palette. Do you need to have a paid version to use this feature?
Here is the link: Build custom component libraries | Retool Docs
Hi @knightcoder - thanks for reaching out and welcome to the community!
The ability to build custom components is available to all users. After deploying your component via the command line, you should see something like:
You might need to subsequently refresh the browser, but your library should show up in the "App Settings -> Custom Components" menu. When searching for the component in the palette, it's name will be the same as the named export:
Let me know if you're still having challenges with this and I'd be happy to help you figure it out!
Hi Darren,
I deployed the component. It succeeded. See the screenshot below.
The custom component shows up on the settings page, like you have it in the first screenshot, but it doesn't show up in the "Components" section. Am I missing something?
Hi Darren,
I deployed the component. It succeeded. See the screenshot below.
The custom component shows up on the settings page, like you have it in the first screenshot, but it doesn't show up in the "Components" section. Am I missing something?
Thanks,
Rohit
Hmm nothing obvious comes to mind. A few things. you can try:
- refresh the Retool browser page
- double check that you're exporting the component from
/src/index.tsx
- if you are a member of multiple orgs, check that the
retool-ccl
library is authenticated with the correct one by running the commandnpx retool-ccl login
again
Run through that checklist and let me know if the issue persists!
Ran through it all and still no luck.
That seems very odd. Are you on a cloud or self-hosted instance? If the latter, which version? Do you see any errors in the Retool and/or browser console when opening the component palette?
It's whatever is the latest version of the cloud. Also no errors.
I wonder if the size of dist/components.js
is an issue. Can you see if it works with the simple template component?
import React from 'react'
import { type FC } from 'react'
import { Retool } from '@tryretool/custom-component-support'
export const HelloWorld: FC = () => {
const [name, _setName] = Retool.useStateString({
name: 'name'
})
return (
<div>
<div>Hello {name}!</div>
</div>
)
}
Figured out the issue. Looks like Retool expects a named export export const App
. I was doing export default App
, which didn't work.