List Button is intended to be used inside of the List React Component.
There are following components included:
ListButton
Name | Type | Default | Description |
---|---|---|---|
colors | object | Object with Tailwind CSS colors classes | |
colors.activeBgIos | string | 'active:bg-primary active:bg-opacity-15' | |
colors.activeBgMaterial | string | '' | |
colors.textIos | string | 'text-primary' | |
colors.textMaterial | string | 'text-md-light-primary dark:text-md-dark-primary' | |
colors.touchRipple | string | 'touch-ripple-primary' | |
component | string | 'li' | Component's HTML Element |
href | string | Button's link | |
linkComponent | string | 'a' | Button HTML Element |
linkProps | any | Object with additional props (attributes) to pass to the Link/Button | |
target | string | Button's link | |
touchRipple | boolean | true | Enables touch ripple effect in Material theme |
type | string | undefined | Button's |
value | any | Button's |
import React from 'react';import { Page, Navbar, NavbarBackLink, List, ListButton } from 'konsta/react';export default function ListButtonPage() {return (<Page><Navbartitle="List Button"/><List strong outlineIos><ListButton>Button 1</ListButton><ListButton>Button 2</ListButton><ListButton>Button 3</ListButton></List><List inset strong><ListButton>Button 1</ListButton><ListButton>Button 2</ListButton><ListButton>Button 3</ListButton></List><List inset strong><ListButton className="k-color-brand-red">Red Button</ListButton></List></Page>);}