A labelled group. toggleable lets the legend hide the body.
Unlock it plus 108 pro blocks, widgets & layouts — $99 one-time. Lifetime updates, 14-day money-back guarantee.
<ply-fieldset legend="Shipping" toggleable> <p>Street, city, and postal code stay in this group.</p> </ply-fieldset>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add fieldset
// Paths are relative to aliases.components (default: src/app/components)
import { FieldsetComponent } from './fieldset/fieldset.component';
@Component({
selector: 'app-fieldset-example',
imports: [
FieldsetComponent
],
template: `...`
})
export class FieldsetExampleComponent {}Install
npx ply-ui-cli add fieldset
npx ply-ui-cli add fieldset
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.
npx -y ply-ui-mcp
Ply provides standalone components. Import the exact elements you want to use into your component.
// Install: npx ply-ui-cli add fieldset
// Paths are relative to aliases.components (default: src/app/components)
import { FieldsetComponent } from './fieldset/fieldset.component';
@Component({
selector: 'app-your-component',
imports: [
FieldsetComponent
],
template: `...`
})
export class YourComponent {} API for fieldset — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
ply-fieldset | class | string | '' | Extra host classes merged via `cn()`. |
ply-fieldset | legend | unknown | 'Details' | Legend text. |
ply-fieldset | toggleable | boolean | false | When true, the legend toggles the body. |
ply-fieldset | collapsed | boolean | false | Whether the body is hidden. Two-way bindable. |
Content