REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.94 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/@adminjs/design-system/src/atoms/button/button.doc.md
Text
Base64
<img src="components/button.png" /> Buttons make common actions immediately visible and easy to perform with one click or tap. They can be used for any type of action. ### Usage ```jsx import { Button, ButtonCSS } from '@adminjs/design-system' // regular button return ( <Button>Click Me</Button> ) // Passing button body as a label return ( <Button label="My Button" /> ) // create a new Component looking like button const ButtonLikeComponent = styled.a` ${ButtonCSS}; ` return ( <ButtonLikeComponent href="#">My styled link</ButtonLikeComponent> ) ``` ### Props The Button Component takes 4 custom props: - `variant` - `size` - `rounded` - `label` Apart from them you can also pass {@link ColorProps}, {@link SpaceProps} and {@link TypographyProps}. See {@link ButtonProps} below. ### Examples 1 .Color variants ```reactComponent const variants = ['primary', 'danger', 'success', 'info', 'secondary', 'text', 'light'] return ( <Box py="lg"> <Button mb="default" mr="default">default</Button> {variants.map(variant => ( <Button mb="default" variant={variant} mr="default">{variant}</Button> ))} </Box> ) ``` 2. Size variants ```reactComponent return ( <Box py="lg"> <Button size="sm">Small</Button> <Button ml="default">Regular size</Button> <Button size="lg" ml="default">Large</Button> </Box> ) ``` 3. Icons ```reactComponent return ( <Box py="lg"> <Button mr="default"> <Icon icon="Settings" /> With icon </Button> <Button size="icon" mr="default"><Icon icon="Settings" /></Button> <Button rounded size="icon" mr="default"><Icon icon="Settings" /></Button> <Button color="danger" mr="default"> <Icon icon="Trash" /> Delete me </Button> <Button mr="default" variant="text" size="sm"> <Icon icon="Plus" /> Create new item </Button> </Box> ) ``` 4. State ```reactComponent return ( <Box py="lg"> <Button disabled>Disabled</Button> <Button ml="default" variant="primary" disabled>Disabled</Button> </Box> ) ```
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
button-css.tsx
4.96 KB
lrw-r--r--
2026-02-28 00:31:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
button-props.doc.md
148 B
lrw-r--r--
2026-02-28 00:31:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
button-props.ts
1.11 KB
lrw-r--r--
2026-02-28 00:31:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
button.doc.md
1.94 KB
lrw-r--r--
2026-02-28 00:31:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
button.stories.tsx
3.19 KB
lrw-r--r--
2026-02-28 00:31:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
button.tsx
863 B
lrw-r--r--
2026-02-28 00:31:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
96 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).