richfaces components are written on top of jsf components. so it is bascially jsf provides the flexability to write components.
go ahead and read core javaserver faces 3 rd editon, guiding you how you can create composite components.
There are three ways:
1) custom composit component with facelets 1.2
Take look at this article:
2) custom JSF 1.2 component - very painful development I should say =)
For one of examples look at this link:
3) You can also try RF CDK
which should simplify components developments and give you a more convenient schema of the components development.