Components

Colgroup

A themed native colgroup primitive.

Props

Native attributes and event handlers are forwarded to the underlying colgroup element unless handled by the component.

PropTypeDefaultDescription
children Snippet undefined Content snippet rendered by the component.
class string '' Tailwind classes merged with the theme and variants.
element HTMLTableColElement | null null Bindable reference to the underlying DOM element.
inTransition TransitionProps undefined Overrides the opening transition.
isVisible boolean true Bindable visibility state.
outTransition TransitionProps undefined Overrides the closing transition.
theme Theme global theme Optional local theme override.
transition TransitionProps [noopTransition, {}] A Svelte transition function and its options.
variants string[] [] Local variant names or theme references such as button.base.

Default usage

Import Colgroup from sveltewind/components. This example shows its default styling in a usable context.

Plan Starter
+page.svelte
Loading...

Use Colgroup inside Table before its row groups. It can contain Col components or use a span attribute.

Examples

Theme variants

Every variant available for Colgroup in the built-in themes is shown below.

narrow — Apply the narrow variant.

Plan Starter
+page.svelte
Loading...

wide — Apply the wide variant.

Plan Starter
+page.svelte
Loading...

compact — Apply the compact variant.

Plan Starter
+page.svelte
Loading...

Class overrides

Apply bg-primary-500/10 locally.

Plan Starter
+page.svelte
Loading...

Props and behavior

Change span while retaining the default component styling.

Plan Starter
+page.svelte
Loading...

Content and values

Provide different text, child content, or definitions inside the required parent context.

Your project content Starter
+page.svelte
Loading...